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