Annotation of parser3/configure.ac, revision 1.75
1.48 moko 1: dnl Autoconf initialization
1.1 moko 2: AC_PREREQ(2.59)
1.69 moko 3: AC_INIT(parser, 3.5.2b)
1.1 moko 4: AC_CONFIG_SRCDIR(README)
1.68 moko 5: AC_CONFIG_MACRO_DIRS(src/lib/ltdl/m4)
1.1 moko 6:
7:
1.14 moko 8: dnl Automake Initialization
1.1 moko 9: AM_INIT_AUTOMAKE
10:
11:
12: dnl Expand srcdir
13: P3S=`cd $srcdir/src ; pwd`
14: AC_SUBST(P3S)
15:
16:
17: dnl Parser version update
18: AC_CANONICAL_HOST
19: AC_DEFINE_UNQUOTED(PARSER_VERSION,"$VERSION (compiled on $host)",parser version)
20:
21: AC_SUBST(host_os)
22: case $host_os in
23: *cygwin* ) AC_DEFINE(CYGWIN,,using cygwin building environment);;
24: esac
25:
26:
27: dnl Checks for programs
28: AC_PROG_INSTALL
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 //' -e 's/^bison (GNU Bison) //' -e 's/$/./'`
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: AC_PROG_CXX
46: AC_PROG_CC
47:
48: dnl most tests should be compiled with C compiler [especially qsort test]
1.68 moko 49: AC_LANG([C])
1.1 moko 50:
51:
52: dnl Dll extension
53: AC_MSG_CHECKING(for dynamic-link library extension)
54: case "$host_os" in
55: *cygwin* ) dll_extension=dll;;
56: * ) dll_extension=so
57: esac
58: AC_MSG_RESULT($dll_extension)
59: AC_SUBST(dll_extension)
60:
61:
62: dnl Misc arguments
63: AC_ARG_WITH(build-warnings, [ --with-build-warnings to enable build-time compiler warnings if gcc is used],
64: AC_MSG_WARN(enabling compiler warnings)
1.64 moko 65: CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2 -Wextra -Wall -Wno-parentheses"
1.1 moko 66: )
67:
1.15 moko 68: AC_ARG_WITH(coverage, [ --with-coverage to enable gcov code coverage support],
1.9 moko 69: AC_MSG_WARN(enabling gcov support)
70: CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
71: CXXFLAGS=`echo "$XXCFLAGS" | $SED -e 's/-O[0-9]*//g'`
72: CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
73: CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
74: LDFLAGS="$LDFLAGS -lgcov"
75: )
76:
1.15 moko 77: AC_ARG_WITH(profiler, [ --with-profiler to enable gprof code profiler support],
1.9 moko 78: AC_MSG_WARN(enabling gprof support)
1.24 moko 79: CFLAGS="$CFLAGS -O0 -pg -g"
80: CXXFLAGS="$CXXFLAGS -O0 -pg -g"
1.9 moko 81: )
82:
1.1 moko 83: AC_ARG_WITH(assertions, [ --with-assertions to enable assertions],
84: AC_MSG_WARN(enabling assertions)
85: ,
86: AC_DEFINE(NDEBUG,,assertions disabled)
87: )
88:
1.37 moko 89: AC_ARG_WITH(sjlj-exceptions, [ --with-sjlj-exceptions to enable simple 'throw' from dynamic library],
1.1 moko 90: AC_DEFINE(PA_WITH_SJLJ_EXCEPTIONS,,one can throw from dynamic library)
91: )
92:
93:
1.37 moko 94: AC_ARG_WITH(system-cfg, [ --with-system-cfg=FILE to specify system-wide auto.p],
95: AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_FILE,"$withval",system-wide auto.p)
1.35 moko 96: )
97:
98:
1.1 moko 99: dnl Safe mode argument
100: AC_ARG_ENABLE(safe-mode, [ --disable-safe-mode to enable reading and executing
101: files belonging to group+user other then effective],
102: [
103: SAFE_MODE=$enableval
104: ]
105: )
106:
107: if test "$SAFE_MODE" = "no"; then
108: AC_MSG_WARN(enabling reading of files belonging to group+user other then effective)
109: else
110: AC_DEFINE(PA_SAFE_MODE,,disabled reading of files belonging to group+user other then effective)
111: fi
112:
113:
114: dnl Disable execs argument
115: AC_ARG_ENABLE(execs, [ --disable-execs to disable any execs
116: (file::exec, file::cgi, unix mail:send)],
117: [
118: if test "$enableval" = "no"; then
119: AC_MSG_WARN(disabling file execs)
120: AC_DEFINE(NO_PA_EXECS,,pa_exec disabled)
121: fi
122: ]
123: )
124:
125:
126: dnl String stream argument
1.28 moko 127: AC_ARG_ENABLE(stringstream, [ --disable-stringstream to disable stringstream usage.
128: when disabled table.save uses more memory, but more compilers are supported],
1.1 moko 129: [
130: if test "$enableval" = "no"; then
131: AC_MSG_WARN(disabling stringstream usage)
132: AC_DEFINE(NO_STRINGSTREAM,,stringstream disabled)
133: fi
134: ]
135: )
136:
137:
138: dnl GC argument
1.35 moko 139: AC_ARG_WITH(gc,[ --with-gc[=DIR] DIR is the directory where
1.1 moko 140: Boehm garbage collecting library is installed],[
141:
142: GC=$withval
143: GC_LIBS="$GC/libgc.la"
144:
145: if test -f $GC_LIBS; then
146: GC_OK="yes"
147: else
148: GC_LIBS="-L$GC -lgc"
149: fi
150:
151: if test "$GC" = "yes"; then
152: GC=""
153: GC_LIBS="-lgc"
154: AC_MSG_WARN([--with-gc value was not specified, hoping linker would find it])
155: fi
156: ],[
157: GC_LIBS="-lgc"
158: AC_MSG_WARN([--with-gc was not specified, hoping linker would find it])
159: ])
160:
161: if test -z "$GC_OK"; then
162: AC_MSG_CHECKING(for libgc)
163: SAVE_LIBS=$LIBS
164: LIBS="$LIBS $GC_LIBS"
1.68 moko 165: PA_TRY_LINK([ extern int GC_dont_gc; ],[ GC_dont_gc=0; ],
1.1 moko 166: AC_MSG_RESULT(yes)
167: ,
168: AC_MSG_RESULT(no)
169: if test -z "$GC"; then
1.35 moko 170: AC_MSG_ERROR(please specify path to libgc: --with-gc=DIR)
1.1 moko 171: else
172: AC_MSG_ERROR($GC does not seem to be valid libgc installation directory)
173: fi
174: )
175: LIBS=$SAVE_LIBS
176: fi
177:
178: AC_SUBST(GC_LIBS)
179:
180:
181: dnl PCRE argument
1.35 moko 182: AC_ARG_WITH(pcre,[ --with-pcre=DIR DIR is the directory where
1.1 moko 183: PCRE library is installed],[
184: PCRE=$withval
185:
186: if test "$PCRE" = "yes"; then
187: PCRE=""
188: AC_MSG_WARN([--with-pcre value was not specified, hoping linker would find it])
1.55 moko 189: else
190: PCRE_INCLUDES="-I$PCRE/include"
191:
192: if test -f $PCRE/include/pcre.h -a -f $PCRE/lib/libpcre.la; then
193: PCRE_OK="yes"
194: PCRE_LIBS="$PCRE/lib/libpcre.la"
195: else
196: if test -f $PCRE/include/pcre2.h -a -f $PCRE/lib/libpcre2-8.la; then
197: PCRE_OK="yes"
198: PCRE_LIBS="$PCRE/lib/libpcre2-8.la"
199: AC_DEFINE(HAVE_PCRE2,,PCRE2 is available)
200: else
201: PCRE_LIBS="-L$PCRE/lib"
202: fi
203: fi
1.1 moko 204: fi
205: ],[
206: AC_MSG_WARN([--with-pcre was not specified, hoping linker would find it])
207: ])
208:
209: if test -z "$PCRE_OK"; then
1.55 moko 210: AC_MSG_CHECKING(for pcre2)
211: SAVE_LIBS=$LIBS
212: LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES -lpcre2-8"
1.68 moko 213: PA_TRY_LINK([ #define PCRE2_CODE_UNIT_WIDTH 8
1.55 moko 214: #include <pcre2.h> ],[ void *v=pcre2_general_context_create(0,0,0); ],
215: AC_MSG_RESULT(yes)
216: PCRE_LIBS="$PCRE_LIBS -lpcre2-8"
217: AC_DEFINE(HAVE_PCRE2,,PCRE2 is available)
218: PCRE_OK="yes"
219: ,
220: AC_MSG_RESULT(no)
221: )
222: LIBS=$SAVE_LIBS
223: fi
224:
225: if test -z "$PCRE_OK"; then
226: AC_MSG_CHECKING(for pcre)
227: PCRE_LIBS="$PCRE_LIBS -lpcre"
1.1 moko 228: SAVE_LIBS=$LIBS
229: LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES"
1.68 moko 230: PA_TRY_LINK([ #include <pcre.h> ],[ const char *v=pcre_version(); ],
1.1 moko 231: AC_MSG_RESULT(yes)
232: ,
233: AC_MSG_RESULT(no)
234: if test -z "$PCRE"; then
1.35 moko 235: AC_MSG_ERROR(please specify path to PCRE: --with-pcre=DIR)
1.1 moko 236: else
237: AC_MSG_ERROR($PCRE does not seem to be valid PCRE installation directory)
238: fi
239: )
240: LIBS=$SAVE_LIBS
241: fi
242:
243: AC_SUBST(PCRE_INCLUDES)
244: AC_SUBST(PCRE_LIBS)
245:
246:
247: dnl XML/XSLT argument
1.35 moko 248: AC_ARG_WITH(xml,[ --with-xml=DIR DIR is the directory where
1.1 moko 249: Gnome XML libraries are installed],[
250:
251: XML=$withval
252: XML_LIBS="-lxml2 -lxslt -lexslt"
253:
254: if test -z "$XML" -o "$XML" = "yes"; then
255: XML=""
256: XML_INCLUDES="-I/usr/include/libxml2"
257: AC_MSG_WARN([--with-xml value was not specified, hoping linker would find it])
258: else
259: XML_INCLUDES="-I$XML/include -I$XML/include/libxml2"
1.24 moko 260: XML_LIBS="-L$XML/lib $XML_LIBS"
1.1 moko 261:
262: if test -f $XML/include/libxslt/xslt.h -a -f $XML/lib/libxml2.la \
263: -a -f $XML/lib/libxslt.la -a -f $XML/lib/libexslt.la; then
264: XML_LIBS="$XML/lib/libxml2.la $XML/lib/libxslt.la $XML/lib/libexslt.la"
265: XML_OK="yes"
266: fi
267: fi
268:
269: if test -z "$XML_OK"; then
270: AC_MSG_CHECKING(for xml)
271: SAVE_LIBS=$LIBS
272: LIBS="$LIBS $XML_LIBS $XML_INCLUDES"
1.68 moko 273: PA_TRY_LINK([ #include <libxslt/xslt.h> ],[ const char *v=xsltEngineVersion; ],
1.1 moko 274: AC_MSG_RESULT(yes)
275: ,
276: AC_MSG_RESULT(no)
277: if test -z "$XML"; then
1.35 moko 278: AC_MSG_ERROR(please specify path to Gnome XML libraries: --with-xml=DIR)
1.1 moko 279: else
280: AC_MSG_ERROR($XML does not seem to be valid Gnome XML installation directory)
281: fi
282: )
283: LIBS=$SAVE_LIBS
284: fi
285: AC_DEFINE(XML,,xml-abled parser)
286: ])
287:
288: AC_SUBST(XML_INCLUDES)
289: AC_SUBST(XML_LIBS)
290:
291:
292: dnl Mail receive argument
1.35 moko 293: AC_ARG_WITH(mailreceive,[ --with-mailreceive=DIR is the directory where
1.1 moko 294: Gnome MIME library is installed],[
295: MIME=$withval
296: GLIB="glib-2.0"
297: GMIME="gmime-2.4"
298:
299: if test -z "$MIME" -o "$MIME" = "yes"; then
300: MIME=""
301: MIME_INCLUDES=`pkg-config --cflags $GMIME 2>/dev/null`
302: MIME_LIBS=`pkg-config --libs $GMIME 2>/dev/null`
1.26 moko 303: if test -z "$MIME_LIBS"; then
304: GMIME="gmime-3.0"
305: MIME_INCLUDES=`pkg-config --cflags $GMIME 2>/dev/null`
306: MIME_LIBS=`pkg-config --libs $GMIME 2>/dev/null`
307: fi
1.1 moko 308: AC_MSG_WARN([--with-mailreceive value was not specified, hoping linker would find Gnome MIME library])
309: else
310: MIME_INCLUDES="-I$MIME/include/$GMIME"
311: MIME_LIBS="-l$GMIME"
312: if test -f $MIME/include/$GMIME/gmime/gmime.h -a -f $MIME/lib/lib$GMIME.la; then
313: MIME_LIBS="$MIME/lib/lib$GMIME.la"
314: if test -f $MIME/lib/lib$GLIB.la; then
315: MIME_INCLUDES="$MIME_INCLUDES -I$MIME/include/$GLIB -I$MIME/lib/$GLIB/include"
316: else
317: GLIB_INCLUDES=`pkg-config --cflags $GLIB 2>/dev/null`
318: MIME_INCLUDES="$MIME_INCLUDES $GLIB_INCLUDES"
319: fi
320: MIME_OK="yes"
321: fi
322: fi
323:
324: if test -z "$MIME_OK"; then
325: AC_MSG_CHECKING(for mime)
326: SAVE_LIBS=$LIBS
327: LIBS="$LIBS $MIME_LIBS $MIME_INCLUDES"
1.68 moko 328: PA_TRY_LINK([ #include <gmime/gmime.h> ],[ guint v=gmime_major_version; ],
1.1 moko 329: AC_MSG_RESULT(yes)
330: ,
331: AC_MSG_RESULT(no)
332: if test -z "$MIME"; then
1.35 moko 333: AC_MSG_ERROR(please specify path to Gnome MIME library: --with-mailreceive=DIR)
1.1 moko 334: else
335: AC_MSG_ERROR($MIME does not seem to be valid Gnome MIME installation directory)
336: fi
337: )
338: LIBS=$SAVE_LIBS
339: fi
340: AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received)
341: ])
342:
343: AC_SUBST(MIME_INCLUDES)
344: AC_SUBST(MIME_LIBS)
345:
346:
1.71 moko 347: dnl RabbitMQ library argument
348: AC_ARG_WITH(amqp,[ --with-amqp=DIR DIR is the directory where
349: RabbitMQ C library (librabbitmq) is installed],[
350: AMQP=$withval
351:
352: if test -z "$AMQP" -o "$AMQP" = "yes"; then
353: AMQP_INCLUDES=""
354: AMQP_LIBS="-lrabbitmq"
355: AC_MSG_WARN([--with-amqp value was not specified, hoping linker would find it])
356: else
357: AMQP_INCLUDES="-I$AMQP/include"
358: if test -f $AMQP/lib/librabbitmq.la; then
359: AMQP_LIBS="$AMQP/lib/librabbitmq.la"
360: else
361: AMQP_LIBS="-L$AMQP/lib -lrabbitmq"
362: fi
363: fi
364:
365: AC_MSG_CHECKING(for librabbitmq)
366: SAVE_LIBS=$LIBS
367: LIBS="$LIBS $AMQP_LIBS $AMQP_INCLUDES"
368: PA_TRY_LINK([ #include <amqp.h> ],[ amqp_connection_state_t c = 0; ],
369: AC_MSG_RESULT(yes)
370: ,
371: AC_MSG_RESULT(no)
372: if test -z "$AMQP"; then
373: AC_MSG_ERROR(please specify path to librabbitmq: --with-amqp=DIR)
374: else
375: AC_MSG_ERROR($AMQP does not seem to be valid librabbitmq installation directory)
376: fi
377: )
378: LIBS=$SAVE_LIBS
379: AC_DEFINE(WITH_AMQP,,has amqp)
380: ])
381:
382: AC_SUBST(AMQP_INCLUDES)
383: AC_SUBST(AMQP_LIBS)
384:
1.1 moko 385: dnl Sendmail argument
386: AC_ARG_WITH(sendmail,[ \"--with-sendmail=COMMAND\" forces this command to send mail.
387: example: \"--with-sendmail=/usr/sbin/sendmail -t\"
388: (makes parser ignore user-defined sendmail commands)],
389: AC_DEFINE_UNQUOTED(PA_FORCED_SENDMAIL,"$withval",parser uses this command instead of user-defined sendmail commands)
390: )
391:
392:
393: dnl Apache module argument
394: AC_ARG_WITH(apache,[ --with-apache=FILE FILE is the full path for APXS
395: builds apache DSO module using apxs],[
396: APXS=$withval
397:
398: if test -z "$APXS" -o "$APXS" = "yes"; then
399: APXS=`which apxs 2>/dev/null`
400: if test -z "$APXS"; then
401: APXS=`which apxs2 2>/dev/null`
402: fi
403: fi
404:
405: APACHE=`$APXS -q TARGET 2>/dev/null`
406:
407: if test -z "$APACHE"; then
408: AC_MSG_ERROR($APXS does not seem to be valid apache apxs utility path)
409: fi
410:
411: APACHE_MAIN_INC=`$APXS -q INCLUDEDIR`
412: APACHE_EXTRA_INC=`$APXS -q EXTRA_INCLUDES 2>/dev/null`
413: APACHE_INC="-I$APACHE_MAIN_INC $APACHE_EXTRA_INC"
414: APACHE_CFLAGS=`$APXS -q CFLAGS`
415: ])
416: AC_SUBST(APACHE)
417: AC_SUBST(APACHE_INC)
418: AC_SUBST(APACHE_CFLAGS)
419: AM_CONDITIONAL(COMPILE_APACHE_MODULE, test -n "$APACHE")
420:
421:
422: dnl Enable building of the convenience library
423: LT_CONFIG_LTDL_DIR(src/lib/ltdl)
424: LT_INIT(dlopen win32-dll no-pic)
425: LTDL_INIT
426:
427:
428: dnl Checks for typedefs, structures, and compiler characteristics
429: AC_C_BIGENDIAN(
430: AC_DEFINE(PA_BIG_ENDIAN,,compile for sparc processor)
431: ,
432: AC_DEFINE(PA_LITTLE_ENDIAN,,compile for intel processor or compatible)
433: ,
434: AC_MSG_ERROR(word endianness not determined for some obscure reason)
435: )
436:
437: AC_TYPE_SIZE_T
438: AC_TYPE_SSIZE_T
439: AC_TYPE_UINT8_T
440: AC_TYPE_UINT16_T
441: AC_TYPE_UINT32_T
442: AC_TYPE_UINT64_T
1.73 moko 443: AC_TYPE_INT64_T
1.1 moko 444:
445: AC_STRUCT_DIRENT_D_TYPE
446:
447: AC_SYS_LARGEFILE
448:
449: dnl Checks for C header files
450: AC_CHECK_HEADERS(stdio.h sys/types.h sys/stat.h stdlib.h stddef.h memory.h string.h strings.h inttypes.h stdint.h unistd.h)
1.68 moko 451: AC_CHECK_HEADERS(time.h sys/time.h assert.h limits.h ctype.h math.h process.h stdarg.h setjmp.h signal.h pthread.h)
1.1 moko 452: AC_CHECK_HEADERS(errno.h dirent.h fcntl.h io.h sys/file.h sys/locking.h sys/select.h sys/resource.h sys/wait.h)
453: AC_CHECK_HEADERS(sys/socket.h netinet/in.h arpa/inet.h netdb.h)
454:
455:
456: dnl Checks for libraries
457: case "$host" in
458: *-freebsd4*)
1.28 moko 459: AC_DEFINE(FREEBSD4,,FreeBSD4.X target platform)
460: ;;
461: *-freebsd1*)
462: AC_DEFINE(FREEBSD1X,,FreeBSD1X.X target platform)
1.1 moko 463: ;;
464: *-sunos5.6* | *-solaris2.6*)
465: AC_CHECK_LIB(xnet, main)
466: ;;
467: *-sunos5* | *-solaris2*)
468: AC_CHECK_LIB(socket, main)
469: AC_CHECK_LIB(nsl, main)
470: ;;
471: *-nec-sysv4*)
472: AC_CHECK_LIB(nsl, gethostbyname)
473: AC_CHECK_LIB(socket, socket)
474: ;;
475: *-cygwin*)
476: AC_DEFINE(WIN32,,Windows32 target platform)
477: ;;
478: esac
479:
480: AC_CHECK_LIB(m, sin)
481: AC_CHECK_LIB(crypt, crypt)
482:
483:
484: dnl Checks for functions
1.59 moko 485: AC_CHECK_FUNCS(flock fcntl lockf ftruncate fchmod)
1.66 moko 486: AC_CHECK_FUNCS(getrusage gettimeofday crypt sigsetjmp siglongjmp unsetenv syslog)
1.1 moko 487:
488:
489: dnl on some linux[seen on 2.4] it's a macro
490: PA_CHECK_SIGSETJMP
491:
492:
493: dnl see comment above
494: AC_LANG_PUSH(C++)
1.19 moko 495: PA_CHECK_MATH_FUNCS_ONE_ARG(trunc round sign isfinite)
1.1 moko 496: AC_LANG_POP
497:
498:
499: dnl We require qsort(3)
500: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
501:
502:
503: dnl For build-in date implementation we need to know local offset from GMT
504:
505: AC_LANG_PUSH(C++)
506: AC_MSG_CHECKING(for timezone variable)
1.68 moko 507: PA_TRY_COMPILE([#include <time.h>], [int test=timezone;], AC_DEFINE(HAVE_TIMEZONE) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
1.1 moko 508: AC_LANG_POP
509:
510: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
1.68 moko 511: PA_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
1.1 moko 512:
513: AC_MSG_CHECKING(for tm_tzadj in struct tm)
1.68 moko 514: PA_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj=0;], AC_DEFINE(HAVE_TM_TZADJ) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
1.1 moko 515:
1.41 moko 516: AC_MSG_CHECKING(for gettid)
1.68 moko 517: PA_TRY_COMPILE([
1.41 moko 518: #include <sys/types.h>
519: #include <sys/syscall.h>
520: ], [uint tid=syscall(__NR_gettid);], AC_DEFINE(HAVE_GETTID) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
521:
1.45 moko 522: AC_MSG_CHECKING(for TLS)
1.68 moko 523: PA_TRY_COMPILE([__thread int i=0;], [], AC_DEFINE(HAVE_TLS) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
1.45 moko 524:
1.1 moko 525: AC_MSG_CHECKING(for 0..9999 year date range support)
1.68 moko 526: AC_RUN_IFELSE([AC_LANG_SOURCE([
1.1 moko 527: #include <string.h>
528: #include <time.h>
529:
530: int main() {
531: struct tm tmL,tmH;
532: memset(&tmL, 0, sizeof(tmL));
533: memset(&tmH, 0, sizeof(tmH));
534: tmL.tm_year=-1900;
535: tmL.tm_mon=-1;
536: tmH.tm_year=9999-1900;
537: tmH.tm_mon=12-1;
538: tmH.tm_mday=31;
539: return mktime(&tmL)==-1 || mktime(&tmH)==-1;
540: }
1.68 moko 541: ])], AC_DEFINE(PA_DATE64) AC_MSG_RESULT(yes), AC_MSG_RESULT(no), AC_MSG_RESULT(no))
1.1 moko 542:
543: dnl Output header and makefiles
544: AH_TEMPLATE([HAVE_TIMEZONE],[Define if you have timezone external variable in <time.h>])
545: AH_TEMPLATE([HAVE_TM_GMTOFF],[Define if you have tm_gmtoff member of tm structure in <time.h>])
546: AH_TEMPLATE([HAVE_TM_TZADJ],[Define if you have tm_tzadj member of tm structure in <time.h>])
1.41 moko 547: AH_TEMPLATE([HAVE_GETTID],[Define if you have gettid()])
1.45 moko 548: AH_TEMPLATE([HAVE_TLS],[Define if you have Thread-Local Storage])
1.1 moko 549: AH_TEMPLATE([PA_DATE64],[Define if you have 0..9999 year date range support])
550:
1.68 moko 551: AC_CONFIG_HEADERS(src/include/pa_config_auto.h)
1.1 moko 552:
1.68 moko 553: AC_CONFIG_FILES([
554: Makefile
555: src/Makefile
556: src/types/Makefile
557: src/classes/Makefile
558: src/include/Makefile
559: src/main/Makefile
560: src/sql/Makefile
561: src/lib/Makefile
562: src/lib/gd/Makefile
563: src/lib/smtp/Makefile
564: src/lib/gc/Makefile
1.1 moko 565: src/lib/gc/include/Makefile
1.68 moko 566: src/lib/pcre/Makefile
1.1 moko 567: src/lib/cord/Makefile
568: src/lib/cord/include/Makefile
569: src/lib/cord/include/private/Makefile
570: src/lib/md5/Makefile
571: src/lib/sdbm/Makefile
572: src/lib/sdbm/pa-include/Makefile
573: src/lib/json/Makefile
574: src/lib/curl/Makefile
575: src/lib/punycode/Makefile
576: src/lib/memcached/Makefile
577: src/targets/Makefile
578: src/targets/cgi/Makefile
579: src/targets/apache/Makefile
580: src/targets/isapi/Makefile
581: etc/Makefile
582: etc/parser3.charsets/Makefile
1.68 moko 583: etc/auto.p])
584: AC_OUTPUT
E-mail: