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