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