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