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