Annotation of parser3/configure.in, revision 1.51
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:
1.51 ! paf 388: dnl PAF added fake to make makefiles look more clean [actually we don't use libtool in this project]
! 389: AC_PROG_LIBTOOL
! 390:
1.1 paf 391: dnl Checks for typedefs, structures, and compiler characteristics.
392:
393: AC_TYPE_SIZE_T
1.34 paf 394: dnl gmime
395: AC_CHECK_TYPE(off_t, long)
396: AC_CHECK_TYPE(ssize_t, int)
397:
1.1 paf 398:
399: dnl Checks for header files.
400:
1.10 paf 401: AC_HEADER_TIME
402:
1.1 paf 403: AC_CHECK_HEADERS(
1.48 paf 404: signal.h \
1.1 paf 405: unistd.h \
406: process.h \
407: stddef.h \
408: stdarg.h \
409: fcntl.h \
410: sys/stat.h \
411: io.h \
412: stdio.h \
413: errno.h \
414: ctype.h \
415: math.h \
1.35 paf 416: crypt.h \
1.3 paf 417: time.h sys/time.h \
1.1 paf 418: stdlib.h \
419: string.h \
420: direct.h \
421: setjmp.h \
422: memory.h \
423: new \
424: sys/file.h \
425: sys/locking.h \
1.3 paf 426: sys/types.h \
1.5 paf 427: sys/select.h \
1.39 paf 428: sys/resource.h \
1.49 paf 429: winsock.h \
430: sys/socket.h \
431: netinet/in.h \
432: arpa/inet.h \
433: netdb.h
1.1 paf 434: )
435:
436: dnl Checks for libraries.
437:
438: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
439: case "$host" in
440: *-sunos5.6* | *-solaris2.6*)
441: AC_CHECK_LIB(xnet, main)
442: ;;
443: *-sunos5* | *-solaris2*)
444: AC_CHECK_LIB(socket, main)
445: AC_CHECK_LIB(nsl, main)
446: ;;
447: *-nec-sysv4*)
448: AC_CHECK_LIB(nsl, gethostbyname)
449: AC_CHECK_LIB(socket, socket)
450: ;;
451: *-cygwin*)
452: AC_DEFINE(WIN32,,Windows32 target platform)
453: AC_CHECK_LIB(wsock32, socket)
454: ;;
1.24 paf 455: # never tested this, only theoretically by letter from demos about parser2 build
1.25 paf 456: *-hpux*)
1.24 paf 457: AC_CHECK_LIB(nsl, main)
458: ;;
1.1 paf 459: esac
460:
461: AC_CHECK_LIB(m, sin)
462:
1.35 paf 463: AC_CHECK_LIB(crypt, crypt)
464:
1.1 paf 465: dnl Checks for functions.
466:
467: AC_CHECK_FUNCS(
468: trunc \
469: round \
470: sign \
471: flock \
472: _locking \
1.7 paf 473: fcntl \
1.4 paf 474: lockf \
1.35 paf 475: getrusage \
1.47 paf 476: gettimeofday \
1.49 paf 477: crypt \
478: sigsetjmp siglongjmp
1.1 paf 479: )
1.3 paf 480:
481: dnl We require qsort(3) and select(2).
482:
483: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
484: AC_CHECK_FUNCS(select, , AC_MSG_ERROR([No select library function.]))
1.1 paf 485:
1.46 paf 486: dnl For correct mail receiving we need to know local offset from GMT
487: dnl it be timezone+(daylight?60*60*sign(timezone):0)
488: dnl or it can be tm.tm_gmtoff
489: dnl or it can be tm.tm_tzadj
490:
491: AC_MSG_CHECKING(for timezone variable)
492: AC_TRY_COMPILE([#include <time.h>],
493: [
494: time_t test=timezone;
495: ],
496: AC_DEFINE(HAVE_TIMEZONE)
497: AC_MSG_RESULT(yes),
498: AC_MSG_RESULT(no))
499:
500: AC_MSG_CHECKING(for daylight variable)
501: AC_TRY_COMPILE([#include <time.h>],
502: [
503: int test=daylight;
504: ],
505: AC_DEFINE(HAVE_DAYLIGHT)
506: AC_MSG_RESULT(yes),
507: AC_MSG_RESULT(no))
508:
509: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
510: AC_TRY_COMPILE([#include <time.h>],
511: [struct tm tm;
512: tm.tm_gmtoff=0;
513: ],
514: AC_DEFINE(HAVE_TM_GMTOFF)
515: AC_MSG_RESULT(yes),
516: AC_MSG_RESULT(no))
517:
518: AC_MSG_CHECKING(for tm_tzadj in struct tm)
519: AC_TRY_COMPILE([#include <time.h>],
520: [struct tm tm;
521: tm.tm_tzadj=0;
522: ],
523: AC_DEFINE(HAVE_TM_TZADJ)
524: AC_MSG_RESULT(yes),
525: AC_MSG_RESULT(no))
526:
527:
1.1 paf 528: AC_MSG_CHECKING(whether compiler supports pragma pack)
529: AC_TRY_COMPILE(
530: #pragma pack(1)
1.28 paf 531: struct _1_byte {
1.1 paf 532: char c;
1.28 paf 533: };
1.1 paf 534: #pragma pack()
1.28 paf 535: ,,[
1.1 paf 536: AC_MSG_RESULT(yes)
537: AC_DEFINE(HAVE_PRAGMA_PACK,,compiler supports pragma pack)
538: ],
539: AC_MSG_RESULT(no)
540: )
541:
542: AC_MSG_CHECKING(for set_new_handler)
543: AC_TRY_COMPILE(
544: #ifdef HAVE_NEW
545: #include <new>
546: #endif
547: void failed_new() {}
548: ,
549: std::set_new_handler(failed_new);
550: ,[
551: AC_MSG_RESULT(yes)
552: AC_DEFINE(HAVE_SET_NEW_HANDLER,,library has set_new_handler func)
553: ],
554: AC_MSG_RESULT(no)
555: )
556:
557:
558: dnl AC_ARG_ENABLE(db, [ --enable-db to enable 'hashfile' parser class],
559: dnl [
560: dnl if test "$enableval" != "no"; then
561: dnl AC_CHECK_HEADERS(db.h)
562: dnl AC_CHECK_LIB(db, __db_open)
563: dnl fi
564: dnl ]
565: dnl )
1.17 paf 566:
1.1 paf 567:
568: dnl Apache libs
1.10 paf 569: APACHE_LIBS="$LIBS $LIBADD_DL"
1.9 paf 570: dnl append stdc++ to libs list commented
571: dnl 1. because binary seem to work without it
572: dnl purpose of this: remove strange name dependance
573: dnl for linker creates reference not for libstc++.xx but
574: dnl for something specific to local system,
575: dnl thus reducing binary compatibility
576: dnl 2. for same reason linker of targets/cgi/parser3 changed to
577: dnl "C" compiler from "C++" compiler
578: dnl AC_CHECK_LIB(stdc++, __builtin_new,
579: dnl APACHE_LIBS="$APACHE_LIBS -lstdc++"
580: dnl )
1.1 paf 581: AC_SUBST(APACHE_LIBS)
582:
583:
584: dnl install directories
585:
586: # expand apostrophed
1.6 paf 587: e_prefix=$prefix
588: test "x$e_prefix" = xNONE && e_prefix=$ac_default_prefix
589:
1.1 paf 590: e_sysconfdir=$sysconfdir
1.6 paf 591: test "$e_sysconfdir" = "\${prefix}/etc" && e_sysconfdir="${e_prefix}/etc"
1.1 paf 592:
593: dnl these are used to fill in etc/parser3.conf
594:
595: charsetsdir=$e_sysconfdir/parser3.charsets
596: AC_SUBST(charsetsdir)
597:
598: # expand apostrophed
599: e_libdir=$libdir
600: if test "$e_libdir" = "\${exec_prefix}/lib"; then
601:
602: # Let make expand exec_prefix.
603: e_exec_prefix=$exec_prefix
1.12 paf 604: test "x$e_exec_prefix" = xNONE && e_exec_prefix=$e_prefix
1.1 paf 605:
606: # expand apostrophed
607: test "$e_libdir" = "\${exec_prefix}/lib" && e_libdir="${e_exec_prefix}/lib"
608: fi
609:
610: sqldriversdir=$e_libdir
611: AC_SUBST(sqldriversdir)
612:
613:
614: dnl Output makefiles
615:
616: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.51 ! paf 617: 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: