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