# HG changeset patch # User Carl Byington # Date 1234022252 28800 # Node ID 2ec889a79e51ffade83282a5cb6e133869d69906 # Parent 5e4d6faada34ff0b49e0c5b7e235844dab25d7da patch from Fridrich Strba, some systems need extra library for regex diff -r 5e4d6faada34 -r 2ec889a79e51 configure.in --- a/configure.in Fri Feb 06 20:38:04 2009 -0800 +++ b/configure.in Sat Feb 07 07:57:32 2009 -0800 @@ -167,6 +167,13 @@ AC_LANG_POP([C++]) +AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec, + [REGEXLIB=-lregex + AC_DEFINE(HAVE_REGEXEC,1,[Define to 1 if you have the regexec function.])], + [AC_MSG_ERROR([No regex library found])])]) +AC_SUBST(REGEXLIB) + + # The following lines adds the --enable-pst-debug option to configure: # # Give the user the choice to enter one of these: diff -r 5e4d6faada34 -r 2ec889a79e51 src/Makefile.am --- a/src/Makefile.am Fri Feb 06 20:38:04 2009 -0800 +++ b/src/Makefile.am Sat Feb 07 07:57:32 2009 -0800 @@ -93,7 +93,7 @@ # the library search path. lspst_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) -readpst_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) +readpst_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) $(REGEXLIB) readpstlog_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) pst2ldif_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) pst2dii_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) -lgd diff -r 5e4d6faada34 -r 2ec889a79e51 src/common.h --- a/src/common.h Fri Feb 06 20:38:04 2009 -0800 +++ b/src/common.h Sat Feb 07 07:57:32 2009 -0800 @@ -36,6 +36,7 @@ // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html #include #else + #include #define BYTE_ORDER LITTLE_ENDIAN #endif diff -r 5e4d6faada34 -r 2ec889a79e51 src/define.h --- a/src/define.h Fri Feb 06 20:38:04 2009 -0800 +++ b/src/define.h Sat Feb 07 07:57:32 2009 -0800 @@ -14,16 +14,10 @@ #include "vbuf.h" - #ifdef HAVE_CONFIG_H #include "config.h" #endif -#ifdef _WIN32 - #undef HAVE_UNISTD_H - #define HAVE_DIRECT_H - #define HAVE_WINDOWS_H -#endif #define DEBUG_MODE_GEN #define DEBUGPRINT @@ -96,7 +90,7 @@ #define PERM_DIRS 0777 #ifdef _WIN32 - #include // win32 + #include #define D_MKDIR(x) mkdir(x) #define chdir _chdir @@ -127,15 +121,13 @@ #else #include "XGetopt.h" #endif - - #include #else #ifdef HAVE_UNISTD_H #include - #define D_MKDIR(x) mkdir(x, PERM_DIRS) #else #include "XGetopt.h" #endif + #define D_MKDIR(x) mkdir(x, PERM_DIRS) #endif #ifdef HAVE_SYS_STAT_H