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