Annotation of parser3/configure.ac, revision 1.57

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

E-mail: