Annotation of parser3/configure.in, revision 1.100
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.98 misha 5: AM_INIT_AUTOMAKE(parser, 3.2.4b, 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)],[
269: GC_LIBS="-L$withval -Wl,-Bstatic -l$GC_LIB_NAME -Wl,-Bdynamic"
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.12 paf 294: AC_ARG_WITH(shared-xml,[ --with-shared-xml=D D is the directory where
295: Gnome XML libraries are installed (shared libs)],[
1.63 paf 296: GNOME_XML=$withval
297: XMLBIN="$GNOME_XML/bin"
298: XMLINC="$GNOME_XML/include"
299: XMLLIB="$GNOME_XML/lib"
300:
301: if test \! -d $XMLBIN -o \! -d $XMLINC -o \! -d $XMLLIB; then
302: AC_MSG_ERROR($GNOME_XML does not seem to be valid Gnome installation directory)
303: fi
304:
305: AC_DEFINE(XML,,xml-abled parser (uses shared library))
306:
307: LIBXML2_SO_NAME=`cd $XMLLIB ; ls libxml2.?? libxml2.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
308: LIBXSLT_SO_NAME=`cd $XMLLIB ; ls libxslt.?? libxslt.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
309: LIBEXSLT_SO_NAME=`cd $XMLLIB ; ls libexslt.?? libexslt.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
310:
1.91 paf 311: XML_INCLUDES="$GLIB_CFLAGS -I$XMLINC -I$XMLINC/libxml2"
312: XML_LIBS="-L$XMLLIB -l$LIBXML2_SO_NAME -l$LIBXSLT_SO_NAME -l$LIBEXSLT_SO_NAME"
1.63 paf 313: if test \! -z "$LD_PATHLINK"; then
1.13 paf 314: XML_LIBS="$XML_LIBS -Wl,$LD_PATHLINK -Wl,$XMLLIB"
1.63 paf 315: fi
1.1 paf 316: ])
1.12 paf 317: AC_ARG_WITH(static-xml,[ --with-static-xml=D D is the directory where
318: Gnome XML libraries are installed (static libs)],[
1.63 paf 319: GNOME_XML=$withval
320: XMLBIN="$GNOME_XML/bin"
321: XMLINC="$GNOME_XML/include"
322: XMLLIB="$GNOME_XML/lib"
323:
324: if test \! -d $XMLBIN -o \! -d $XMLINC -o \! -d $XMLLIB; then
325: AC_MSG_ERROR($GNOME_XML does not seem to be valid Gnome installation directory)
326: fi
327:
328: AC_DEFINE(XML,,xml-abled parser (uses static library))
329:
1.91 paf 330: XML_INCLUDES="$GLIB_CFLAGS -I$XMLINC -I$XMLINC/libxml2"
331: XML_LIBS="$XMLLIB/libxslt.a $XMLLIB/libexslt.a $XMLLIB/libxml2.a"
1.12 paf 332: ])
1.1 paf 333: AC_SUBST(XML_INCLUDES)
334: AC_SUBST(XML_LIBS)
1.33 paf 335:
1.91 paf 336: AC_ARG_WITH(glib-config,[ --with-glib-config=FILE FILE is glib library
337: configuration file (search for glib*-config)],
338: GLIB_CONFIG=$withval
339: )
340:
1.33 paf 341: AC_ARG_WITH(shared-mailreceive,[ --with-shared-mailreceive=D is the directory where
1.63 paf 342: Gnome MIME library is installed (shared lib)],[
343: GNOME_MIME=$withval
344: MIMEBIN="$GNOME_MIME/bin"
345: MIMEINC="$GNOME_MIME/include"
346: MIMELIB="$GNOME_MIME/lib"
347:
348: if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
349: AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
350: fi
351:
352: AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses shared library))
353:
354: LIBMIME_SO_NAME=`cd $MIMELIB ; ls libgmime.?? libgmime.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
355:
356: if test -z "$GLIB_CONFIG"; then
1.91 paf 357: GLIB_CONFIG=$XMLBIN/glib-config
1.63 paf 358: if test \! -x $GLIB_CONFIG; then
1.91 paf 359: GLIB_CONFIG=$XMLBIN/glib2-config
360: if test \! -x $GLIB_CONFIG; then
361: GLIB_CONFIG=glib-config
362: fi
1.63 paf 363: fi
364: fi
365: GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
366: GLIB_LIBS=`$GLIB_CONFIG --libs`
367:
368: MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
369: MIME_LIBS="$GLIB_LIBS -L$MIMELIB -l$LIBMIME_SO_NAME"
370: if test \! -z "$LD_PATHLINK"; then
1.33 paf 371: MIME_LIBS="$MIME_LIBS -Wl,$LD_PATHLINK -Wl,$MIMELIB"
1.63 paf 372: fi
1.33 paf 373: ])
374: AC_ARG_WITH(static-mailreceive,[ --with-static-mailreceive=D is the directory where
375: Gnome MIME library is installed (static lib)],[
1.63 paf 376: GNOME_MIME=$withval
377: MIMEBIN="$GNOME_MIME/bin"
378: MIMEINC="$GNOME_MIME/include"
379: MIMELIB="$GNOME_MIME/lib"
380:
381: if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
382: AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
383: fi
384:
385: AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses static library))
386:
387: if test -z "$GLIB_CONFIG"; then
1.91 paf 388: GLIB_CONFIG=$XMLBIN/glib-config
1.63 paf 389: if test \! -x $GLIB_CONFIG; then
1.91 paf 390: GLIB_CONFIG=$XMLBIN/glib2-config
391: if test \! -x $GLIB_CONFIG; then
392: GLIB_CONFIG=glib-config
393: fi
1.63 paf 394: fi
395: fi
396: GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
1.33 paf 397:
398: dnl '-L/usr/local/lib -lglib' -> /usr/local/lib
399: changequote(, )dnl
1.63 paf 400: GLIB_DIR=`$GLIB_CONFIG --libs | sed 's/.*-L\([^ ]*\).*/\1/'`
401: GLIB_NAME=`$GLIB_CONFIG --libs | sed 's/.*-l\([^ ]*\).*/\1/'`
1.33 paf 402: changequote([, ])dnl
1.63 paf 403: MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
404: MIME_LIBS="$MIMELIB/libgmime.a $GLIB_DIR/lib$GLIB_NAME.a"
1.33 paf 405: ])
406: AC_SUBST(MIME_INCLUDES)
407: AC_SUBST(MIME_LIBS)
1.18 paf 408:
409:
410: AC_ARG_WITH(sendmail,[ \"--with-sendmail=COMMAND\" forces this command to send mail.
411: example: \"--with-sendmail=/usr/sbin/sendmail -t\"
412: (makes parser ignore user-defined sendmail commands)],
413: AC_DEFINE_UNQUOTED(PA_FORCED_SENDMAIL,"$withval",parser uses this command instead of user-defined sendmail commands)
414: )
415:
1.14 paf 416:
417: AC_ARG_WITH(apache13,[ --with-apache13=D D is the Apache13 source distribution directory
418: builds library for apache_module using that dir
419: (do not add /src)],
420: APACHE13=$withval
1.63 paf 421: if test \! -f "$APACHE13/src/include/httpd.h"; then
422: AC_MSG_ERROR($APACHE13 does not seem to be valid Apache13 source distribution directory)
423: fi
1.14 paf 424: )
425: AC_SUBST(APACHE13)
426: AM_CONDITIONAL(COMPILE_APACHE13_MODULE, test -n "$APACHE13")
427:
1.1 paf 428:
429: dnl Enable building of the convenience library
430: dnl and set LIBLTDL accordingly
1.51 paf 431: AC_LIBLTDL_CONVENIENCE(src/lib/ltdl)
1.1 paf 432: dnl Substitute INCLTDL and LIBLTDL in the Makefiles
433: AC_SUBST(INCLTDL)
434: AC_SUBST(LIBLTDL)
435:
436: dnl Configure libltdl
1.51 paf 437: AC_CONFIG_SUBDIRS(src/lib/ltdl)
1.60 paf 438:
439: dnl detecting which libraries are needed to dynamic open
440: AC_LTDL_DLLIB
1.10 paf 441: AC_SUBST(LIBADD_DL)
1.1 paf 442:
443: dnl Checks for typedefs, structures, and compiler characteristics.
444:
1.79 paf 445: AC_C_BIGENDIAN(
446: AC_DEFINE(PA_BIG_ENDIAN,,compile for sparc processor)
447: ,
448: AC_DEFINE(PA_LITTLE_ENDIAN,,compile for intel processor or compatible)
449: ,
450: AC_MSG_ERROR(word endianness not determined for some obscure reason)
451: )
452:
1.1 paf 453: AC_TYPE_SIZE_T
1.34 paf 454: dnl gmime
455: AC_CHECK_TYPE(off_t, long)
456: AC_CHECK_TYPE(ssize_t, int)
457:
1.1 paf 458:
1.62 paf 459: dnl Checks for C header files.
1.1 paf 460:
1.10 paf 461: AC_HEADER_TIME
462:
1.1 paf 463: AC_CHECK_HEADERS(
1.63 paf 464: assert.h \
1.48 paf 465: signal.h \
1.1 paf 466: unistd.h \
467: process.h \
468: stddef.h \
469: stdarg.h \
470: fcntl.h \
471: sys/stat.h \
472: io.h \
473: stdio.h \
474: errno.h \
475: ctype.h \
476: math.h \
1.35 paf 477: crypt.h \
1.3 paf 478: time.h sys/time.h \
1.1 paf 479: string.h \
480: direct.h \
481: setjmp.h \
482: memory.h \
483: sys/file.h \
484: sys/locking.h \
1.3 paf 485: sys/types.h \
1.5 paf 486: sys/select.h \
1.39 paf 487: sys/resource.h \
1.49 paf 488: winsock.h \
489: sys/socket.h \
490: netinet/in.h \
491: arpa/inet.h \
492: netdb.h
1.1 paf 493: )
494:
495: dnl Checks for libraries.
496:
497: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
498: case "$host" in
499: *-sunos5.6* | *-solaris2.6*)
1.63 paf 500: AC_CHECK_LIB(xnet, main)
1.1 paf 501: ;;
502: *-sunos5* | *-solaris2*)
1.63 paf 503: AC_CHECK_LIB(socket, main)
504: AC_CHECK_LIB(nsl, main)
1.1 paf 505: ;;
506: *-nec-sysv4*)
1.63 paf 507: AC_CHECK_LIB(nsl, gethostbyname)
508: AC_CHECK_LIB(socket, socket)
1.1 paf 509: ;;
510: *-cygwin*)
1.63 paf 511: AC_DEFINE(WIN32,,Windows32 target platform)
512: AC_CHECK_LIB(wsock32, socket)
1.1 paf 513: ;;
1.24 paf 514: # never tested this, only theoretically by letter from demos about parser2 build
1.25 paf 515: *-hpux*)
1.63 paf 516: AC_CHECK_LIB(nsl, main)
1.24 paf 517: ;;
1.1 paf 518: esac
519:
520: AC_CHECK_LIB(m, sin)
521:
1.35 paf 522: AC_CHECK_LIB(crypt, crypt)
523:
1.1 paf 524: dnl Checks for functions.
525:
526: AC_CHECK_FUNCS(
527: flock \
528: _locking \
1.7 paf 529: fcntl \
1.4 paf 530: lockf \
1.53 paf 531: ftruncate \
1.35 paf 532: getrusage \
1.47 paf 533: gettimeofday \
1.49 paf 534: crypt \
1.80 paf 535: sigsetjmp \
1.94 misha 536: siglongjmp \
537: unsetenv
1.63 paf 538: )
539:
540: dnl on some linux[seen on 2.4] it's a macro
541: PA_CHECK_SIGSETJMP
542:
543: dnl see comment above
544: AC_LANG_PUSH(C++)
545: PA_CHECK_MATH_FUNCS_ONE_ARG(
546: trunc \
547: round \
548: sign
1.1 paf 549: )
1.63 paf 550: AC_LANG_POP
1.3 paf 551:
1.75 paf 552: dnl We require qsort(3)
1.3 paf 553:
554: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
1.1 paf 555:
1.46 paf 556: dnl For correct mail receiving we need to know local offset from GMT
557: dnl it be timezone+(daylight?60*60*sign(timezone):0)
558: dnl or it can be tm.tm_gmtoff
559: dnl or it can be tm.tm_tzadj
560:
561: AC_MSG_CHECKING(for timezone variable)
1.63 paf 562: AC_TRY_COMPILE([#include <time.h>],
1.46 paf 563: [
564: time_t test=timezone;
1.63 paf 565: ],
566: AC_DEFINE(HAVE_TIMEZONE)
1.46 paf 567: AC_MSG_RESULT(yes),
568: AC_MSG_RESULT(no))
569:
570: AC_MSG_CHECKING(for daylight variable)
1.63 paf 571: AC_TRY_COMPILE([#include <time.h>],
1.46 paf 572: [
573: int test=daylight;
1.63 paf 574: ],
575: AC_DEFINE(HAVE_DAYLIGHT)
1.46 paf 576: AC_MSG_RESULT(yes),
577: AC_MSG_RESULT(no))
578:
579: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
1.63 paf 580: AC_TRY_COMPILE([#include <time.h>],
581: [struct tm tm;
582: tm.tm_gmtoff=0;
583: ],
584: AC_DEFINE(HAVE_TM_GMTOFF)
1.46 paf 585: AC_MSG_RESULT(yes),
586: AC_MSG_RESULT(no))
587:
588: AC_MSG_CHECKING(for tm_tzadj in struct tm)
1.63 paf 589: AC_TRY_COMPILE([#include <time.h>],
590: [struct tm tm;
591: tm.tm_tzadj=0;
592: ],
593: AC_DEFINE(HAVE_TM_TZADJ)
1.46 paf 594: AC_MSG_RESULT(yes),
595: AC_MSG_RESULT(no))
596:
597:
1.63 paf 598: dnl AC_ARG_ENABLE(db, [ --enable-db to enable 'hashfile' parser class],
1.1 paf 599: dnl [
600: dnl if test "$enableval" != "no"; then
601: dnl AC_CHECK_HEADERS(db.h)
602: dnl AC_CHECK_LIB(db, __db_open)
603: dnl fi
604: dnl ]
605: dnl )
1.17 paf 606:
1.58 paf 607: dnl Output header and makefiles
608:
609: AH_TEMPLATE([HAVE_DLD],[Define if you have the GNU dld library])
610:
611: AH_TEMPLATE([HAVE_LIBDL],
612: [Define if you have the libdl library or equivalent.])
613:
614: AH_TEMPLATE([HAVE_SHL_LOAD],
615: [Define if you have the shl_load function. ])
616:
617:
618: AH_TEMPLATE([size_t],
619: [Define to `unsigned int' if <sys/types.h> does not define.])
620:
621: AH_TEMPLATE([ssize_t],
622: [Define to `int' if <sys/types.h> does not define.])
623:
624: AH_TEMPLATE([HAVE_DAYLIGHT],
625: [Define if you have daylight external variable in <time.h>])
626:
627: AH_TEMPLATE([HAVE_TIMEZONE],
628: [Define if you have timezone external variable in <time.h>])
629:
630: AH_TEMPLATE([HAVE_TM_GMTOFF],
631: [Define if you have tm_gmtoff member of tm structure in <time.h>])
632:
633: AH_TEMPLATE([HAVE_TM_TZADJ],
634: [Define if you have tm_tzadj member of tm structure in <time.h>])
635:
1.1 paf 636:
637: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.66 paf 638: AC_OUTPUT(
639: Makefile
640: src/Makefile
641: src/types/Makefile
642: src/classes/Makefile
643: src/include/Makefile
644: src/main/Makefile
645: src/sql/Makefile
646: src/lib/Makefile
1.71 paf 647: src/lib/gd/Makefile
648: src/lib/smtp/Makefile
1.66 paf 649: src/lib/gc/Makefile
650: src/lib/gc/include/Makefile
651: src/lib/cord/Makefile
652: src/lib/cord/include/Makefile
653: src/lib/cord/include/private/Makefile
654: src/lib/ltdl/Makefile
655: src/lib/pcre/Makefile
656: src/lib/md5/Makefile
657: src/lib/sdbm/Makefile
658: src/lib/sdbm/apr-include/Makefile
659: src/targets/Makefile
660: src/targets/cgi/Makefile
661: src/targets/apache13core/Makefile
662: src/targets/apache13/Makefile
663: src/targets/apache13/p3runConfigure
664: src/targets/isapi/Makefile
665: etc/Makefile
666: etc/parser3.charsets/Makefile
1.67 paf 667: bin/Makefile
668: bin/auto.p.dist)
E-mail: