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