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