Annotation of parser3/configure.in, revision 1.136
1.1 paf 1: dnl Process this file with autoconf to produce a configure script.
2: AC_INIT(README)
1.59 paf 3: AC_PREREQ(2.57)
4:
1.135 misha 5: AM_INIT_AUTOMAKE(parser, 3.4.2b, nodefine)
1.1 paf 6:
1.8 paf 7: dnl expand srcdir
1.14 paf 8: P3S=`cd $srcdir/src ; pwd`
1.1 paf 9: AC_SUBST(P3S)
10:
1.81 paf 11: dnl AC_CANONICAL_SYSTEM
12: AC_CANONICAL_HOST
13:
14: PARSER_VERSION="$VERSION (compiled on $host)"
1.8 paf 15: echo "/* automatically generated by configure */" > $srcdir/src/include/pa_version.h.new
16: echo "/* edit configure.in to change version number */" >> $srcdir/src/include/pa_version.h.new
17: echo "#define PARSER_VERSION \"$PARSER_VERSION\"" >> $srcdir/src/include/pa_version.h.new
18: cmp $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h >/dev/null 2>&1
1.1 paf 19: if test $? -ne 0 ; then
1.63 paf 20: rm -f $srcdir/src/include/pa_version.h && mv $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h && \
21: echo Updated $srcdir/src/include/pa_version.h
1.1 paf 22: else
1.8 paf 23: rm -f $srcdir/src/include/pa_version.h.new
1.1 paf 24: fi
25:
1.58 paf 26:
1.63 paf 27:
1.41 paf 28: AC_SUBST(host_os)
1.63 paf 29: case $host_os in
30: *cygwin* ) AC_DEFINE(CYGWIN,,using cygwin building environment);;
31: esac
1.41 paf 32:
33: dnl Checks for programs.
1.1 paf 34: AC_PROG_INSTALL
1.41 paf 35: AC_PROG_MAKE_SET
36: AC_PROG_RANLIB
37: AC_PROG_AWK
38:
39: AC_PROG_YACC
40: if test "$YACC" != "bison -y"; then
1.63 paf 41: AC_MSG_WARN(to regenerate Parser grammar YOU WOULD NEED BISON)
1.41 paf 42: else
1.63 paf 43: AC_MSG_CHECKING(bison version)
44: oldIFS=$IFS; IFS=.
45: set `bison -V | sed -e 's/^GNU Bison version //' -e 's/^bison (GNU Bison) //' -e 's/$/./'`
46: IFS=$oldIFS
47: if test "$1" = "1" -a "$2" -lt "25"; then
48: AC_MSG_WARN(Bison 1.25 or newer needed to regenerate Parser compiler (found $1.$2).)
49: fi
50: AC_MSG_RESULT($1.$2 (ok))
1.41 paf 51: fi
52:
1.62 paf 53: AC_PROG_CXX
1.1 paf 54: AC_PROG_CC
1.63 paf 55: dnl most tests should be compiled with C compiler [especially qsort test]
56: AC_LANG_C
57: AC_C_INLINE
1.1 paf 58:
59: dnl Arguments
60:
1.69 paf 61: AC_ARG_WITH(build-warnings, [ --with-build-warnings to enable build-time compiler warnings if gcc is used],
62: AC_MSG_WARN(enabling compiler warnings)
63: CXXFLAGS="$CXXFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes"
64: )
65:
66:
1.63 paf 67: AC_ARG_WITH(assertions, [ --with-assertions to enable assertions],
68: AC_MSG_WARN(enabling assertions)
69: ,
70: AC_DEFINE(NDEBUG,,assertions disabled)
71: )
72:
1.96 misha 73:
1.63 paf 74: AC_ARG_ENABLE(safe-mode, [ --disable-safe-mode to enable reading and executing
1.56 paf 75: files belonging to group+user other then effective],
1.1 paf 76: [
1.63 paf 77: SAFE_MODE=$enableval
1.1 paf 78: ]
79: )
1.56 paf 80: if test "$SAFE_MODE" = "no"; then
81: AC_MSG_WARN(enabling reading of files belonging to group+user other then effective)
82: else
1.57 paf 83: AC_DEFINE(PA_SAFE_MODE,,disabled reading of files belonging to group+user other then effective)
1.56 paf 84: fi
1.1 paf 85:
1.96 misha 86:
87: AC_ARG_ENABLE(execs, [ --disable-execs to disable any execs
1.15 paf 88: (file::exec, file::cgi, unix mail:send)],
89: [
90: if test "$enableval" = "no"; then
1.16 paf 91: AC_MSG_WARN(disabling file execs)
1.15 paf 92: AC_DEFINE(NO_PA_EXECS,,pa_exec disabled)
1.16 paf 93: fi
94: ]
95: )
96:
1.56 paf 97:
1.96 misha 98: AC_ARG_ENABLE(stringstream, [ --disable-stringstream to disable stringstream usage.
99: when disabled table.save use more memory but it's safer on freebsd 4.x],
100: [
101: if test "$enableval" = "no"; then
102: AC_MSG_WARN(disabling stringstream usage)
103: AC_DEFINE(NO_STRINGSTREAM,,stringstream disabled)
104: fi
105: ]
106: )
107:
108:
1.20 paf 109: srccharsetsdir=$srcdir/etc/parser3.charsets
1.19 paf 110: CHARSETS_REQUESTED="windows-1251"
111: AC_ARG_WITH(charsets, [ --with-charsets=CHARSET[,CHARSET,...] Enables charsets in root config (windows-1251,
112: windows-1250 windows-1257 koi8-r; Default is windows-1251)],
113: [CHARSETS_REQUESTED=`echo $withval | sed -e 's/,/ /g'`])
114:
1.20 paf 115: # Checking whether all requested charsets have corresponding .cfg files
116: for c in $CHARSETS_REQUESTED; do
117: if test \! -f $srccharsetsdir/$c.cfg; then
118: AC_MSG_ERROR(bad charset requested "$c" - file $srccharsetsdir/$c.cfg not found)
119: fi
120: done
121:
122: # Switching on commentcharset_XXX='#'
1.86 paf 123: AC_DEFUN([PA_SUBSTCHARSET], [
1.19 paf 124: commentcharset_$2='#'
1.20 paf 125: for c in $CHARSETS_REQUESTED; do
1.19 paf 126: if test "$1" = "$c"; then
1.56 paf 127: AC_MSG_WARN(enabling charset $1)
1.20 paf 128: commentcharset_$2=
1.19 paf 129: fi
130: done
131: AC_SUBST(commentcharset_$2)
132: ])
133: PA_SUBSTCHARSET(windows-1251,windows1251)
134: PA_SUBSTCHARSET(windows-1250,windows1250)
135: PA_SUBSTCHARSET(windows-1257,windows1257)
136: PA_SUBSTCHARSET(koi8-r,koi8r)
137:
138:
1.40 paf 139: AC_MSG_CHECKING(for dynamic-link library extension)
140: case "$host_os" in
141: hpux9* | hpux10* | hpux11*)
1.63 paf 142: dll_extension=sl
143: ;;
1.40 paf 144: cygwin)
1.63 paf 145: dll_extension=dll
146: ;;
1.40 paf 147: *)
1.63 paf 148: dll_extension=so
1.40 paf 149: esac
150: AC_MSG_RESULT($dll_extension)
151: AC_SUBST(dll_extension)
152:
1.19 paf 153: AC_ARG_WITH(mysql-client,[ --with-mysql-client=mysqlclientlib?withparams
154: MySQL client dynamic library to root config],
155: mysql_client=$withval
156: ,
157: AC_MSG_CHECKING(for mysql client)
158: for lib in \
1.40 paf 159: /usr/local/lib/mysql/libmysqlclient.$dll_extension \
160: /usr/local/lib/libmysqlclient.$dll_extension \
161: /usr/lib/libmysqlclient.$dll_extension; do
1.19 paf 162: if test -f $lib; then mysql_client=$lib; fi
163: done
164:
165: if test -z "$mysql_client"; then
166: mysql_client="-configure could not guess-"
1.62 paf 167: AC_MSG_RESULT(could not guess)
1.19 paf 168: else
169: AC_MSG_RESULT($mysql_client)
170: fi
171:
172: )
173: AC_SUBST(mysql_client)
174:
1.93 misha 175:
1.19 paf 176: AC_ARG_WITH(pgsql-client,[ --with-pgsql-client=pgsqlclientlib?withparams
177: PgSQL client dynamic library to root config],
1.93 misha 178: pgsql_client=$withval
1.19 paf 179: ,
180: AC_MSG_CHECKING(for pgsql client)
181: for lib in \
1.40 paf 182: /usr/local/pgsql/lib/libpq.$dll_extension \
183: /usr/local/lib/libpq.$dll_extension \
184: /usr/lib/libpq.$dll_extension; do
1.19 paf 185: if test -f $lib; then pgsql_client=$lib; fi
186: done
187:
188: if test -z "$pgsql_client"; then
189: pgsql_client="-configure could not guess-"
1.62 paf 190: AC_MSG_RESULT(could not guess)
1.19 paf 191: else
192: AC_MSG_RESULT($pgsql_client)
193: fi
194:
195: )
196: AC_SUBST(pgsql_client)
197:
1.93 misha 198:
1.19 paf 199: AC_ARG_WITH(oracle-client,[ --with-oracle-client=oracleclientlib?withparams
200: Oracle client dynamic library],
201: oracle_client=$withval
202: ,
203: AC_MSG_CHECKING(for oracle client)
1.40 paf 204: lib=$ORACLE_HOME/lib/libclntsh.$dll_extension
1.19 paf 205: if test -f $lib; then oracle_client=$lib; fi
206:
207: if test -z "$oracle_client"; then
208: oracle_client="-configure could not guess-"
1.62 paf 209: AC_MSG_RESULT(could not guess)
1.19 paf 210: else
211: oracle_client="$oracle_client?ORACLE_HOME=$ORACLE_HOME&ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data"
212: AC_MSG_RESULT($oracle_client)
213: fi
214:
215: )
216: AC_SUBST(oracle_client)
217:
218:
1.93 misha 219: AC_ARG_WITH(sqlite-client,[ --with-sqlite-client=sqliteclientlib?withparams
220: SQLite client dynamic library to root config],
221: sqlite_client=$withval
222: ,
223: AC_MSG_CHECKING(for sqlite_client client)
224: for lib in \
225: /usr/local/sqlite/lib/sqlite3.$dll_extension \
226: /usr/local/lib/sqlite3.$dll_extension \
227: /usr/lib/sqlite3.$dll_extension; do
228: if test -f $lib; then sqlite_client=$lib; fi
229: done
230:
231: if test -z "$sqlite_client"; then
232: sqlite_client="-configure could not guess-"
233: AC_MSG_RESULT(could not guess)
234: else
235: AC_MSG_RESULT($sqlite_client)
236: fi
237:
238: )
239: AC_SUBST(sqlite_client)
240:
241:
1.15 paf 242:
1.9 paf 243: AC_ARG_WITH(pathlink,[ --with-pathlink=LKEY put dynamic libraries paths to binary
1.1 paf 244: using linker key (-R, -rpath-link)],
245: LD_PATHLINK=$withval
246: )
1.63 paf 247: AC_ARG_WITH(dynamic-stdcpp, [ --with-dynamic-stdcpp link libstdc++ dynamically
248: by default, libstdc++ is linked statically],[
249: AC_MSG_WARN(libstdc++ will be linked dynamically: this is probably incompatible with other platforms)
250: # this is for apache, it's linked with gcc and need to know
251: # and it would not harm linking with c++ toolchain
252: CPP_LIBS="-lstdc++"
253: ],[
254: CPP_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"
255: ])
256: AC_SUBST(CPP_LIBS)
257:
258: AC_ARG_WITH(sjlj-exceptions,[ --with-sjlj-exceptions enable simple 'throw' from dynamic library],
259: AC_DEFINE(PA_WITH_SJLJ_EXCEPTIONS,,one can throw from dynamic library)
1.55 paf 260: )
261:
1.63 paf 262: GC_LIB_NAME=gc
263: AC_ARG_WITH(shared-gc,[ --with-shared-gc[=D] D is the directory where
264: Boehm garbage collecting library is installed (shared lib)],[
265: GC_LIBS="-L$withval -l$GC_LIB_NAME"
266: ])
267: AC_ARG_WITH(static-gc,[ --with-static-gc[=D] D is the directory where
268: Boehm garbage collecting library is installed (static lib)],[
1.131 moko 269: GC_LIBS="$withval/lib$GC_LIB_NAME.a"
1.63 paf 270: ])
271: if test -z "$GC_LIBS"; then
272: #undefined? use any found in system
273: GC_LIBS="-l$GC_LIB_NAME"
274: AC_MSG_WARN([neither --with-shared/static-gc were specified, hoping linker would find it])
275: fi
1.55 paf 276:
1.63 paf 277: AC_MSG_CHECKING(for libgc)
278: SAVE_LIBS=$LIBS
279: LIBS="$LIBS $GC_LIBS"
280: AC_TRY_LINK([
281: extern int GC_dont_gc;
282: ],[
283: GC_dont_gc=0;
284: ],
285: AC_MSG_RESULT(yes)
286: ,
287: AC_MSG_RESULT(no)
288: AC_MSG_ERROR(please specify path to libgc: --with-shared-gc OR --with-static-gc)
1.38 paf 289: )
1.63 paf 290: AC_SUBST(GC_LIBS)
291: LIBS=$SAVE_LIBS
1.1 paf 292:
1.17 paf 293:
1.125 misha 294: AC_ARG_WITH(static-pcre,[ --with-static-pcre=D D is the directory where
1.103 misha 295: PCRE library is installed (static lib)],[
296: PCRE=$withval
297: PCREINC="$PCRE/include"
298: PCRELIB="$PCRE/lib"
299:
300: if test \! -d $PCREINC -o \! -d $PCRELIB; then
301: AC_MSG_ERROR($PCRE does not seem to be valid PCRE installation directory)
302: fi
303:
304: PCRE_INCLUDES="-I$PCREINC"
305: PCRE_LIBS="$PCRELIB/libpcre.a"
306: ])
307: AC_SUBST(PCRE_INCLUDES)
308: AC_SUBST(PCRE_LIBS)
309:
310:
1.12 paf 311: AC_ARG_WITH(shared-xml,[ --with-shared-xml=D D is the directory where
312: Gnome XML libraries are installed (shared libs)],[
1.63 paf 313: GNOME_XML=$withval
314: XMLBIN="$GNOME_XML/bin"
315: XMLINC="$GNOME_XML/include"
316: XMLLIB="$GNOME_XML/lib"
317:
318: if test \! -d $XMLBIN -o \! -d $XMLINC -o \! -d $XMLLIB; then
319: AC_MSG_ERROR($GNOME_XML does not seem to be valid Gnome installation directory)
320: fi
321:
322: AC_DEFINE(XML,,xml-abled parser (uses shared library))
323:
324: LIBXML2_SO_NAME=`cd $XMLLIB ; ls libxml2.?? libxml2.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
325: LIBXSLT_SO_NAME=`cd $XMLLIB ; ls libxslt.?? libxslt.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
326: LIBEXSLT_SO_NAME=`cd $XMLLIB ; ls libexslt.?? libexslt.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
327:
1.91 paf 328: XML_INCLUDES="$GLIB_CFLAGS -I$XMLINC -I$XMLINC/libxml2"
329: XML_LIBS="-L$XMLLIB -l$LIBXML2_SO_NAME -l$LIBXSLT_SO_NAME -l$LIBEXSLT_SO_NAME"
1.63 paf 330: if test \! -z "$LD_PATHLINK"; then
1.13 paf 331: XML_LIBS="$XML_LIBS -Wl,$LD_PATHLINK -Wl,$XMLLIB"
1.63 paf 332: fi
1.1 paf 333: ])
1.12 paf 334: AC_ARG_WITH(static-xml,[ --with-static-xml=D D is the directory where
335: Gnome XML libraries are installed (static libs)],[
1.63 paf 336: GNOME_XML=$withval
337: XMLBIN="$GNOME_XML/bin"
338: XMLINC="$GNOME_XML/include"
339: XMLLIB="$GNOME_XML/lib"
340:
341: if test \! -d $XMLBIN -o \! -d $XMLINC -o \! -d $XMLLIB; then
342: AC_MSG_ERROR($GNOME_XML does not seem to be valid Gnome installation directory)
343: fi
344:
345: AC_DEFINE(XML,,xml-abled parser (uses static library))
346:
1.91 paf 347: XML_INCLUDES="$GLIB_CFLAGS -I$XMLINC -I$XMLINC/libxml2"
348: XML_LIBS="$XMLLIB/libxslt.a $XMLLIB/libexslt.a $XMLLIB/libxml2.a"
1.12 paf 349: ])
1.1 paf 350: AC_SUBST(XML_INCLUDES)
351: AC_SUBST(XML_LIBS)
1.33 paf 352:
1.125 misha 353: AC_ARG_WITH(curl,[ --with-curl=D D is the curl includes directory],[
354: CURLINC=$withval
355:
356: if test \! -d $CURLINC -o \! -r $CURLINC/curl.h; then
357: AC_MSG_ERROR($CURLINC does not seem to be valid curl includes directory)
358: fi
359:
360: AC_DEFINE(HAVE_CURL,,curl enabled parser)
361:
1.127 misha 362: CURL_INCLUDES="-I$CURLINC -I$CURLINC/../"
1.125 misha 363: ])
364: AC_SUBST(CURL_INCLUDES)
365:
1.91 paf 366: AC_ARG_WITH(glib-config,[ --with-glib-config=FILE FILE is glib library
367: configuration file (search for glib*-config)],
368: GLIB_CONFIG=$withval
369: )
370:
1.33 paf 371: AC_ARG_WITH(shared-mailreceive,[ --with-shared-mailreceive=D is the directory where
1.63 paf 372: Gnome MIME library is installed (shared lib)],[
373: GNOME_MIME=$withval
374: MIMEBIN="$GNOME_MIME/bin"
375: MIMEINC="$GNOME_MIME/include"
376: MIMELIB="$GNOME_MIME/lib"
377:
378: if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
379: AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
380: fi
381:
382: AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses shared library))
383:
384: LIBMIME_SO_NAME=`cd $MIMELIB ; ls libgmime.?? libgmime.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
385:
386: if test -z "$GLIB_CONFIG"; then
1.91 paf 387: GLIB_CONFIG=$XMLBIN/glib-config
1.63 paf 388: if test \! -x $GLIB_CONFIG; then
1.91 paf 389: GLIB_CONFIG=$XMLBIN/glib2-config
390: if test \! -x $GLIB_CONFIG; then
391: GLIB_CONFIG=glib-config
392: fi
1.63 paf 393: fi
394: fi
395: GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
396: GLIB_LIBS=`$GLIB_CONFIG --libs`
397:
398: MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
399: MIME_LIBS="$GLIB_LIBS -L$MIMELIB -l$LIBMIME_SO_NAME"
400: if test \! -z "$LD_PATHLINK"; then
1.33 paf 401: MIME_LIBS="$MIME_LIBS -Wl,$LD_PATHLINK -Wl,$MIMELIB"
1.63 paf 402: fi
1.33 paf 403: ])
404: AC_ARG_WITH(static-mailreceive,[ --with-static-mailreceive=D is the directory where
405: Gnome MIME library is installed (static lib)],[
1.63 paf 406: GNOME_MIME=$withval
407: MIMEBIN="$GNOME_MIME/bin"
408: MIMEINC="$GNOME_MIME/include"
409: MIMELIB="$GNOME_MIME/lib"
410:
411: if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
412: AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
413: fi
414:
415: AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses static library))
416:
417: if test -z "$GLIB_CONFIG"; then
1.91 paf 418: GLIB_CONFIG=$XMLBIN/glib-config
1.63 paf 419: if test \! -x $GLIB_CONFIG; then
1.91 paf 420: GLIB_CONFIG=$XMLBIN/glib2-config
421: if test \! -x $GLIB_CONFIG; then
422: GLIB_CONFIG=glib-config
423: fi
1.63 paf 424: fi
425: fi
426: GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
1.33 paf 427:
428: dnl '-L/usr/local/lib -lglib' -> /usr/local/lib
429: changequote(, )dnl
1.63 paf 430: GLIB_DIR=`$GLIB_CONFIG --libs | sed 's/.*-L\([^ ]*\).*/\1/'`
431: GLIB_NAME=`$GLIB_CONFIG --libs | sed 's/.*-l\([^ ]*\).*/\1/'`
1.33 paf 432: changequote([, ])dnl
1.63 paf 433: MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
434: MIME_LIBS="$MIMELIB/libgmime.a $GLIB_DIR/lib$GLIB_NAME.a"
1.33 paf 435: ])
436: AC_SUBST(MIME_INCLUDES)
437: AC_SUBST(MIME_LIBS)
1.18 paf 438:
439:
440: AC_ARG_WITH(sendmail,[ \"--with-sendmail=COMMAND\" forces this command to send mail.
441: example: \"--with-sendmail=/usr/sbin/sendmail -t\"
442: (makes parser ignore user-defined sendmail commands)],
443: AC_DEFINE_UNQUOTED(PA_FORCED_SENDMAIL,"$withval",parser uses this command instead of user-defined sendmail commands)
444: )
445:
1.14 paf 446:
1.131 moko 447: AC_ARG_WITH(apache,[ --with-apache=FILE is the full path for APXS
448: builds apache DSO module using apxs],[
449: APXS=$withval
450:
451: if test -z "$APXS" -o "$APXS" = "yes"; then
452: APXS=`which apxs 2>/dev/null`
453: fi;
454:
455: APACHE=`$APXS -q TARGET 2>/dev/null`
456:
457: if test -z "$APACHE"; then
458: AC_MSG_ERROR($APXS does not seem to be valid apache apxs utility path)
1.63 paf 459: fi
1.131 moko 460:
461: APACHE_MAIN_INC=`$APXS -q INCLUDEDIR`
462: APACHE_EXTRA_INC=`$APXS -q EXTRA_INCLUDES 2>/dev/null`
463: APACHE_INC="-I$APACHE_MAIN_INC $APACHE_EXTRA_INC"
464: APACHE_CFLAGS=`$APXS -q CFLAGS`
465: ])
466: AC_SUBST(APACHE)
467: AC_SUBST(APACHE_INC)
468: AC_SUBST(APACHE_CFLAGS)
469: AM_CONDITIONAL(COMPILE_APACHE_MODULE, test -n "$APACHE")
1.14 paf 470:
1.1 paf 471:
472: dnl Enable building of the convenience library
473: dnl and set LIBLTDL accordingly
1.51 paf 474: AC_LIBLTDL_CONVENIENCE(src/lib/ltdl)
1.1 paf 475: dnl Substitute INCLTDL and LIBLTDL in the Makefiles
476: AC_SUBST(INCLTDL)
477: AC_SUBST(LIBLTDL)
478:
479: dnl Configure libltdl
1.51 paf 480: AC_CONFIG_SUBDIRS(src/lib/ltdl)
1.60 paf 481:
482: dnl detecting which libraries are needed to dynamic open
483: AC_LTDL_DLLIB
1.10 paf 484: AC_SUBST(LIBADD_DL)
1.1 paf 485:
486: dnl Checks for typedefs, structures, and compiler characteristics.
487:
1.79 paf 488: AC_C_BIGENDIAN(
489: AC_DEFINE(PA_BIG_ENDIAN,,compile for sparc processor)
490: ,
491: AC_DEFINE(PA_LITTLE_ENDIAN,,compile for intel processor or compatible)
492: ,
493: AC_MSG_ERROR(word endianness not determined for some obscure reason)
494: )
495:
1.1 paf 496: AC_TYPE_SIZE_T
1.34 paf 497: dnl gmime
498: AC_CHECK_TYPE(off_t, long)
499: AC_CHECK_TYPE(ssize_t, int)
500:
1.1 paf 501:
1.62 paf 502: dnl Checks for C header files.
1.1 paf 503:
1.10 paf 504: AC_HEADER_TIME
505:
1.1 paf 506: AC_CHECK_HEADERS(
1.63 paf 507: assert.h \
1.48 paf 508: signal.h \
1.1 paf 509: unistd.h \
510: process.h \
511: stddef.h \
512: stdarg.h \
513: fcntl.h \
514: sys/stat.h \
515: io.h \
516: stdio.h \
517: errno.h \
518: ctype.h \
519: math.h \
1.35 paf 520: crypt.h \
1.3 paf 521: time.h sys/time.h \
1.1 paf 522: string.h \
523: direct.h \
524: setjmp.h \
525: memory.h \
526: sys/file.h \
527: sys/locking.h \
1.3 paf 528: sys/types.h \
1.5 paf 529: sys/select.h \
1.39 paf 530: sys/resource.h \
1.49 paf 531: winsock.h \
532: sys/socket.h \
533: netinet/in.h \
534: arpa/inet.h \
535: netdb.h
1.1 paf 536: )
537:
538: dnl Checks for libraries.
539:
540: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
541: case "$host" in
1.114 misha 542: *-freebsd4*)
543: AC_DEFINE(FREEBSD4,,FreeBSD4X target platform)
544: ;;
1.1 paf 545: *-sunos5.6* | *-solaris2.6*)
1.63 paf 546: AC_CHECK_LIB(xnet, main)
1.1 paf 547: ;;
548: *-sunos5* | *-solaris2*)
1.63 paf 549: AC_CHECK_LIB(socket, main)
550: AC_CHECK_LIB(nsl, main)
1.1 paf 551: ;;
552: *-nec-sysv4*)
1.63 paf 553: AC_CHECK_LIB(nsl, gethostbyname)
554: AC_CHECK_LIB(socket, socket)
1.1 paf 555: ;;
556: *-cygwin*)
1.63 paf 557: AC_DEFINE(WIN32,,Windows32 target platform)
558: AC_CHECK_LIB(wsock32, socket)
1.1 paf 559: ;;
1.24 paf 560: # never tested this, only theoretically by letter from demos about parser2 build
1.25 paf 561: *-hpux*)
1.63 paf 562: AC_CHECK_LIB(nsl, main)
1.24 paf 563: ;;
1.1 paf 564: esac
565:
566: AC_CHECK_LIB(m, sin)
567:
1.35 paf 568: AC_CHECK_LIB(crypt, crypt)
569:
1.1 paf 570: dnl Checks for functions.
571:
572: AC_CHECK_FUNCS(
573: flock \
574: _locking \
1.7 paf 575: fcntl \
1.4 paf 576: lockf \
1.53 paf 577: ftruncate \
1.119 misha 578: fchmod \
1.35 paf 579: getrusage \
1.47 paf 580: gettimeofday \
1.49 paf 581: crypt \
1.80 paf 582: sigsetjmp \
1.94 misha 583: siglongjmp \
584: unsetenv
1.63 paf 585: )
586:
587: dnl on some linux[seen on 2.4] it's a macro
588: PA_CHECK_SIGSETJMP
589:
590: dnl see comment above
591: AC_LANG_PUSH(C++)
592: PA_CHECK_MATH_FUNCS_ONE_ARG(
593: trunc \
594: round \
595: sign
1.1 paf 596: )
1.63 paf 597: AC_LANG_POP
1.3 paf 598:
1.75 paf 599: dnl We require qsort(3)
1.3 paf 600:
601: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
1.1 paf 602:
1.46 paf 603: dnl For correct mail receiving we need to know local offset from GMT
604: dnl it be timezone+(daylight?60*60*sign(timezone):0)
605: dnl or it can be tm.tm_gmtoff
606: dnl or it can be tm.tm_tzadj
607:
608: AC_MSG_CHECKING(for timezone variable)
1.63 paf 609: AC_TRY_COMPILE([#include <time.h>],
1.46 paf 610: [
611: time_t test=timezone;
1.63 paf 612: ],
613: AC_DEFINE(HAVE_TIMEZONE)
1.46 paf 614: AC_MSG_RESULT(yes),
615: AC_MSG_RESULT(no))
616:
617: AC_MSG_CHECKING(for daylight variable)
1.63 paf 618: AC_TRY_COMPILE([#include <time.h>],
1.46 paf 619: [
620: int test=daylight;
1.63 paf 621: ],
622: AC_DEFINE(HAVE_DAYLIGHT)
1.46 paf 623: AC_MSG_RESULT(yes),
624: AC_MSG_RESULT(no))
625:
626: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
1.63 paf 627: AC_TRY_COMPILE([#include <time.h>],
628: [struct tm tm;
629: tm.tm_gmtoff=0;
630: ],
631: AC_DEFINE(HAVE_TM_GMTOFF)
1.46 paf 632: AC_MSG_RESULT(yes),
633: AC_MSG_RESULT(no))
634:
635: AC_MSG_CHECKING(for tm_tzadj in struct tm)
1.63 paf 636: AC_TRY_COMPILE([#include <time.h>],
637: [struct tm tm;
638: tm.tm_tzadj=0;
639: ],
640: AC_DEFINE(HAVE_TM_TZADJ)
1.46 paf 641: AC_MSG_RESULT(yes),
642: AC_MSG_RESULT(no))
643:
644:
1.63 paf 645: dnl AC_ARG_ENABLE(db, [ --enable-db to enable 'hashfile' parser class],
1.1 paf 646: dnl [
647: dnl if test "$enableval" != "no"; then
648: dnl AC_CHECK_HEADERS(db.h)
649: dnl AC_CHECK_LIB(db, __db_open)
650: dnl fi
651: dnl ]
652: dnl )
1.17 paf 653:
1.58 paf 654: dnl Output header and makefiles
655:
656: AH_TEMPLATE([HAVE_DLD],[Define if you have the GNU dld library])
657:
658: AH_TEMPLATE([HAVE_LIBDL],
659: [Define if you have the libdl library or equivalent.])
660:
661: AH_TEMPLATE([HAVE_SHL_LOAD],
662: [Define if you have the shl_load function. ])
663:
664:
665: AH_TEMPLATE([size_t],
666: [Define to `unsigned int' if <sys/types.h> does not define.])
667:
668: AH_TEMPLATE([ssize_t],
669: [Define to `int' if <sys/types.h> does not define.])
670:
671: AH_TEMPLATE([HAVE_DAYLIGHT],
672: [Define if you have daylight external variable in <time.h>])
673:
674: AH_TEMPLATE([HAVE_TIMEZONE],
675: [Define if you have timezone external variable in <time.h>])
676:
677: AH_TEMPLATE([HAVE_TM_GMTOFF],
678: [Define if you have tm_gmtoff member of tm structure in <time.h>])
679:
680: AH_TEMPLATE([HAVE_TM_TZADJ],
681: [Define if you have tm_tzadj member of tm structure in <time.h>])
682:
1.1 paf 683:
684: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.66 paf 685: AC_OUTPUT(
686: Makefile
687: src/Makefile
688: src/types/Makefile
689: src/classes/Makefile
690: src/include/Makefile
691: src/main/Makefile
692: src/sql/Makefile
693: src/lib/Makefile
1.71 paf 694: src/lib/gd/Makefile
695: src/lib/smtp/Makefile
1.66 paf 696: src/lib/gc/Makefile
697: src/lib/gc/include/Makefile
1.108 misha 698: src/lib/pcre/Makefile
1.66 paf 699: src/lib/cord/Makefile
700: src/lib/cord/include/Makefile
701: src/lib/cord/include/private/Makefile
702: src/lib/ltdl/Makefile
703: src/lib/md5/Makefile
704: src/lib/sdbm/Makefile
1.133 moko 705: src/lib/sdbm/pa-include/Makefile
1.128 misha 706: src/lib/json/Makefile
1.66 paf 707: src/targets/Makefile
708: src/targets/cgi/Makefile
1.131 moko 709: src/targets/apache/Makefile
1.66 paf 710: src/targets/isapi/Makefile
711: etc/Makefile
712: etc/parser3.charsets/Makefile
1.67 paf 713: bin/Makefile
714: bin/auto.p.dist)
E-mail: