Annotation of parser3/configure.in, revision 1.70
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.66 paf 5: AM_INIT_AUTOMAKE(parser, 3.1.2beta, 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:
423: AC_TYPE_SIZE_T
1.34 paf 424: dnl gmime
425: AC_CHECK_TYPE(off_t, long)
426: AC_CHECK_TYPE(ssize_t, int)
427:
1.1 paf 428:
1.62 paf 429: dnl Checks for C header files.
1.1 paf 430:
1.10 paf 431: AC_HEADER_TIME
432:
1.1 paf 433: AC_CHECK_HEADERS(
1.63 paf 434: assert.h \
1.48 paf 435: signal.h \
1.1 paf 436: unistd.h \
437: process.h \
438: stddef.h \
439: stdarg.h \
440: fcntl.h \
441: sys/stat.h \
442: io.h \
443: stdio.h \
444: errno.h \
445: ctype.h \
446: math.h \
1.35 paf 447: crypt.h \
1.3 paf 448: time.h sys/time.h \
1.1 paf 449: string.h \
450: direct.h \
451: setjmp.h \
452: memory.h \
453: sys/file.h \
454: sys/locking.h \
1.3 paf 455: sys/types.h \
1.5 paf 456: sys/select.h \
1.39 paf 457: sys/resource.h \
1.49 paf 458: winsock.h \
459: sys/socket.h \
460: netinet/in.h \
461: arpa/inet.h \
462: netdb.h
1.1 paf 463: )
464:
465: dnl Checks for libraries.
466:
467: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
468: case "$host" in
469: *-sunos5.6* | *-solaris2.6*)
1.63 paf 470: AC_CHECK_LIB(xnet, main)
1.1 paf 471: ;;
472: *-sunos5* | *-solaris2*)
1.63 paf 473: AC_CHECK_LIB(socket, main)
474: AC_CHECK_LIB(nsl, main)
1.1 paf 475: ;;
476: *-nec-sysv4*)
1.63 paf 477: AC_CHECK_LIB(nsl, gethostbyname)
478: AC_CHECK_LIB(socket, socket)
1.1 paf 479: ;;
480: *-cygwin*)
1.63 paf 481: AC_DEFINE(WIN32,,Windows32 target platform)
482: AC_CHECK_LIB(wsock32, socket)
1.1 paf 483: ;;
1.24 paf 484: # never tested this, only theoretically by letter from demos about parser2 build
1.25 paf 485: *-hpux*)
1.63 paf 486: AC_CHECK_LIB(nsl, main)
1.24 paf 487: ;;
1.1 paf 488: esac
489:
490: AC_CHECK_LIB(m, sin)
491:
1.35 paf 492: AC_CHECK_LIB(crypt, crypt)
493:
1.1 paf 494: dnl Checks for functions.
495:
496: AC_CHECK_FUNCS(
497: flock \
498: _locking \
1.7 paf 499: fcntl \
1.4 paf 500: lockf \
1.53 paf 501: ftruncate \
1.35 paf 502: getrusage \
1.47 paf 503: gettimeofday \
1.49 paf 504: crypt \
1.63 paf 505: siglongjmp
506: )
507:
508: dnl on some linux[seen on 2.4] it's a macro
509: PA_CHECK_SIGSETJMP
510:
511: dnl see comment above
512: AC_LANG_PUSH(C++)
513: PA_CHECK_MATH_FUNCS_ONE_ARG(
514: trunc \
515: round \
516: sign
1.1 paf 517: )
1.63 paf 518: AC_LANG_POP
1.3 paf 519:
520: dnl We require qsort(3) and select(2).
521:
522: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
1.70 ! paf 523:
! 524: AC_MSG_CHECKING(for select)
! 525: AC_TRY_RUN([
! 526:
! 527: #ifdef HAVE_SYS_SELECT_H
! 528: # include <sys/select.h>
! 529: #endif
! 530:
! 531: #ifdef HAVE_SYS_SOCKET_H
! 532: # include <sys/socket.h>
! 533: #endif
! 534:
! 535: #if TIME_WITH_SYS_TIME
! 536: # include <sys/time.h>
! 537: # include <time.h>
! 538: #else
! 539: # ifdef HAVE_SYS_TIME_H
! 540: # include <sys/time.h>
! 541: # else
! 542: # include <time.h>
! 543: # endif
! 544: #endif
! 545:
! 546: #ifdef __STDC__
! 547: int (*f)(int, fd_set *, fd_set *, fd_set *, struct timeval *)=select;
! 548: #else
! 549: int (*f)()=select;
! 550: #endif /* __STDC__ */
! 551:
! 552: int
! 553: main ()
! 554: {
! 555: return f != select;
! 556: }
! 557: ],
! 558: AC_DEFINE(HAVE_SELECT,,have 'select' library function)
! 559: AC_MSG_RESULT(yes),
! 560: AC_MSG_ERROR([No select library function.])
! 561: )
1.1 paf 562:
1.46 paf 563: dnl For correct mail receiving we need to know local offset from GMT
564: dnl it be timezone+(daylight?60*60*sign(timezone):0)
565: dnl or it can be tm.tm_gmtoff
566: dnl or it can be tm.tm_tzadj
567:
568: AC_MSG_CHECKING(for timezone variable)
1.63 paf 569: AC_TRY_COMPILE([#include <time.h>],
1.46 paf 570: [
571: time_t test=timezone;
1.63 paf 572: ],
573: AC_DEFINE(HAVE_TIMEZONE)
1.46 paf 574: AC_MSG_RESULT(yes),
575: AC_MSG_RESULT(no))
576:
577: AC_MSG_CHECKING(for daylight variable)
1.63 paf 578: AC_TRY_COMPILE([#include <time.h>],
1.46 paf 579: [
580: int test=daylight;
1.63 paf 581: ],
582: AC_DEFINE(HAVE_DAYLIGHT)
1.46 paf 583: AC_MSG_RESULT(yes),
584: AC_MSG_RESULT(no))
585:
586: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
1.63 paf 587: AC_TRY_COMPILE([#include <time.h>],
588: [struct tm tm;
589: tm.tm_gmtoff=0;
590: ],
591: AC_DEFINE(HAVE_TM_GMTOFF)
1.46 paf 592: AC_MSG_RESULT(yes),
593: AC_MSG_RESULT(no))
594:
595: AC_MSG_CHECKING(for tm_tzadj in struct tm)
1.63 paf 596: AC_TRY_COMPILE([#include <time.h>],
597: [struct tm tm;
598: tm.tm_tzadj=0;
599: ],
600: AC_DEFINE(HAVE_TM_TZADJ)
1.46 paf 601: AC_MSG_RESULT(yes),
602: AC_MSG_RESULT(no))
603:
604:
1.63 paf 605: dnl AC_ARG_ENABLE(db, [ --enable-db to enable 'hashfile' parser class],
1.1 paf 606: dnl [
607: dnl if test "$enableval" != "no"; then
608: dnl AC_CHECK_HEADERS(db.h)
609: dnl AC_CHECK_LIB(db, __db_open)
610: dnl fi
611: dnl ]
612: dnl )
1.17 paf 613:
1.1 paf 614: dnl install directories
615:
616: # expand apostrophed
1.6 paf 617: e_prefix=$prefix
618: test "x$e_prefix" = xNONE && e_prefix=$ac_default_prefix
619:
1.1 paf 620: e_sysconfdir=$sysconfdir
1.6 paf 621: test "$e_sysconfdir" = "\${prefix}/etc" && e_sysconfdir="${e_prefix}/etc"
1.1 paf 622:
623: dnl these are used to fill in etc/parser3.conf
624:
625: charsetsdir=$e_sysconfdir/parser3.charsets
626: AC_SUBST(charsetsdir)
627:
628: # expand apostrophed
629: e_libdir=$libdir
630: if test "$e_libdir" = "\${exec_prefix}/lib"; then
631:
1.63 paf 632: # Let make expand exec_prefix.
633: e_exec_prefix=$exec_prefix
634: test "x$e_exec_prefix" = xNONE && e_exec_prefix=$e_prefix
1.1 paf 635:
1.63 paf 636: # expand apostrophed
637: test "$e_libdir" = "\${exec_prefix}/lib" && e_libdir="${e_exec_prefix}/lib"
1.1 paf 638: fi
639:
640: sqldriversdir=$e_libdir
641: AC_SUBST(sqldriversdir)
642:
643:
1.58 paf 644: dnl Output header and makefiles
645:
646: AH_TEMPLATE([HAVE_DLD],[Define if you have the GNU dld library])
647:
648: AH_TEMPLATE([HAVE_LIBDL],
649: [Define if you have the libdl library or equivalent.])
650:
651: AH_TEMPLATE([HAVE_SHL_LOAD],
652: [Define if you have the shl_load function. ])
653:
654:
655: AH_TEMPLATE([size_t],
656: [Define to `unsigned int' if <sys/types.h> does not define.])
657:
658: AH_TEMPLATE([ssize_t],
659: [Define to `int' if <sys/types.h> does not define.])
660:
661: AH_TEMPLATE([HAVE_DAYLIGHT],
662: [Define if you have daylight external variable in <time.h>])
663:
664: AH_TEMPLATE([HAVE_TIMEZONE],
665: [Define if you have timezone external variable in <time.h>])
666:
667: AH_TEMPLATE([HAVE_TM_GMTOFF],
668: [Define if you have tm_gmtoff member of tm structure in <time.h>])
669:
670: AH_TEMPLATE([HAVE_TM_TZADJ],
671: [Define if you have tm_tzadj member of tm structure in <time.h>])
672:
1.1 paf 673:
674: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.66 paf 675: AC_OUTPUT(
676: Makefile
677: src/Makefile
678: src/types/Makefile
679: src/classes/Makefile
680: src/classes/gd/Makefile
681: src/classes/smtp/Makefile
682: src/include/Makefile
683: src/main/Makefile
684: src/sql/Makefile
685: src/lib/Makefile
686: src/lib/patches/Makefile
687: src/lib/gc/Makefile
688: src/lib/gc/include/Makefile
689: src/lib/cord/Makefile
690: src/lib/cord/include/Makefile
691: src/lib/cord/include/private/Makefile
692: src/lib/ltdl/Makefile
693: src/lib/pcre/Makefile
694: src/lib/md5/Makefile
695: src/lib/sdbm/Makefile
696: src/lib/sdbm/apr-include/Makefile
697: src/targets/Makefile
698: src/targets/cgi/Makefile
699: src/targets/apache13core/Makefile
700: src/targets/apache13/Makefile
701: src/targets/apache13/p3runConfigure
702: src/targets/isapi/Makefile
703: etc/Makefile
704: etc/parser3.charsets/Makefile
1.67 paf 705: bin/Makefile
706: bin/auto.p.dist)
E-mail: