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