Annotation of parser3/configure.in, revision 1.162

1.142     moko        1: dnl Autoconf initialisation
                      2: AC_PREREQ(2.59)
1.162   ! moko        3: AC_INIT(parser, 3.4.2 RC)
1.142     moko        4: AC_CONFIG_SRCDIR(README)
1.59      paf         5: 
1.1       paf         6: 
1.142     moko        7: dnl Automake Initialisation
                      8: AM_INIT_AUTOMAKE
                      9: 
                     10: 
                     11: dnl Expand srcdir
1.14      paf        12: P3S=`cd $srcdir/src ; pwd`
1.1       paf        13: AC_SUBST(P3S)
                     14: 
1.142     moko       15: 
                     16: dnl Update pa_version.h
1.81      paf        17: AC_CANONICAL_HOST
                     18: 
                     19: PARSER_VERSION="$VERSION (compiled on $host)"
1.8       paf        20: echo "/* automatically generated by configure */" > $srcdir/src/include/pa_version.h.new
                     21: echo "/* edit configure.in to change version number */" >> $srcdir/src/include/pa_version.h.new
                     22: echo "#define PARSER_VERSION \"$PARSER_VERSION\"" >> $srcdir/src/include/pa_version.h.new
                     23: cmp $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h >/dev/null 2>&1
1.1       paf        24: if test $? -ne 0 ; then
1.162   ! moko       25:        mv $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h
        !            26:        AC_MSG_WARN(Updated $srcdir/src/include/pa_version.h)
1.1       paf        27: else
1.8       paf        28:        rm -f $srcdir/src/include/pa_version.h.new
1.1       paf        29: fi
                     30: 
1.41      paf        31: AC_SUBST(host_os)
1.63      paf        32: case $host_os in
                     33:   *cygwin* ) AC_DEFINE(CYGWIN,,using cygwin building environment);;
                     34: esac
1.41      paf        35: 
1.142     moko       36: 
                     37: dnl Checks for programs
1.1       paf        38: AC_PROG_INSTALL
1.41      paf        39: AC_PROG_AWK
                     40: 
                     41: AC_PROG_YACC
                     42: if test "$YACC" != "bison -y"; then
1.63      paf        43:        AC_MSG_WARN(to regenerate Parser grammar YOU WOULD NEED BISON)
1.41      paf        44: else
1.63      paf        45:        AC_MSG_CHECKING(bison version)
                     46:        oldIFS=$IFS; IFS=.
                     47:        set `bison -V | sed -e 's/^GNU Bison version //' -e 's/^bison (GNU Bison) //' -e 's/$/./'`
                     48:        IFS=$oldIFS
                     49:        if test "$1" = "1" -a "$2" -lt "25"; then
                     50:                AC_MSG_WARN(Bison 1.25 or newer needed to regenerate Parser compiler (found $1.$2).)
                     51:        fi
                     52:        AC_MSG_RESULT($1.$2 (ok))
1.41      paf        53: fi
                     54: 
1.62      paf        55: AC_PROG_CXX
1.1       paf        56: AC_PROG_CC
1.142     moko       57: 
1.63      paf        58: dnl most tests should be compiled with C compiler [especially qsort test]
1.142     moko       59: AC_LANG_C
                     60: 
1.1       paf        61: 
1.141     moko       62: dnl Dll extension
                     63: AC_MSG_CHECKING(for dynamic-link library extension)
                     64: case "$host_os" in
                     65: cygwin)
                     66:        dll_extension=dll
                     67:        ;;
                     68: *)
                     69:        dll_extension=so
                     70: esac
                     71: AC_MSG_RESULT($dll_extension)
                     72: AC_SUBST(dll_extension)
1.1       paf        73: 
1.141     moko       74: 
                     75: dnl Misc arguments
1.69      paf        76: AC_ARG_WITH(build-warnings, [  --with-build-warnings   to enable build-time compiler warnings if gcc is used],
                     77:        AC_MSG_WARN(enabling compiler warnings)
                     78:        CXXFLAGS="$CXXFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes"
                     79: )
                     80: 
1.63      paf        81: AC_ARG_WITH(assertions, [  --with-assertions       to enable assertions],
                     82:        AC_MSG_WARN(enabling assertions)
                     83: ,
                     84:        AC_DEFINE(NDEBUG,,assertions disabled)
                     85: )
                     86: 
1.141     moko       87: AC_ARG_WITH(pathlink,[  --with-pathlink=LKEY    put dynamic libraries paths to binary
                     88:                           using linker key (-R, -rpath-link)],
                     89:        LD_PATHLINK=$withval
                     90: )
                     91: 
                     92: AC_ARG_WITH(sjlj-exceptions,[  --with-sjlj-exceptions  enable simple 'throw' from dynamic library],
                     93:        AC_DEFINE(PA_WITH_SJLJ_EXCEPTIONS,,one can throw from dynamic library)
                     94: )
1.96      misha      95: 
1.141     moko       96: 
                     97: dnl Safe mode argument
1.63      paf        98: AC_ARG_ENABLE(safe-mode, [  --disable-safe-mode          to enable reading and executing
1.56      paf        99:                           files belonging to group+user other then effective],
1.1       paf       100: [
1.63      paf       101:        SAFE_MODE=$enableval
1.1       paf       102: ]
                    103: )
1.141     moko      104: 
1.56      paf       105: if test "$SAFE_MODE" = "no"; then
                    106:        AC_MSG_WARN(enabling reading of files belonging to group+user other then effective)
                    107: else
1.57      paf       108:        AC_DEFINE(PA_SAFE_MODE,,disabled reading of files belonging to group+user other then effective)
1.56      paf       109: fi
1.1       paf       110: 
1.96      misha     111: 
1.141     moko      112: dnl Disable execs argument
1.96      misha     113: AC_ARG_ENABLE(execs, [  --disable-execs              to disable any execs
1.15      paf       114:                           (file::exec, file::cgi, unix mail:send)],
                    115: [
                    116: if test "$enableval" = "no"; then
1.16      paf       117:        AC_MSG_WARN(disabling file execs)
1.15      paf       118:        AC_DEFINE(NO_PA_EXECS,,pa_exec disabled)
1.16      paf       119: fi
                    120: ]
                    121: )
                    122: 
1.56      paf       123: 
1.141     moko      124: dnl String stream argument
1.96      misha     125: AC_ARG_ENABLE(stringstream, [  --disable-stringstream  to disable stringstream usage.
                    126:                           when disabled table.save use more memory but it's safer on freebsd 4.x],
                    127: [
                    128: if test "$enableval" = "no"; then
                    129:        AC_MSG_WARN(disabling stringstream usage)
                    130:        AC_DEFINE(NO_STRINGSTREAM,,stringstream disabled)
                    131: fi
                    132: ]
                    133: )
                    134: 
                    135: 
1.141     moko      136: dnl GC argument
1.158     moko      137: AC_ARG_WITH(gc,[  --with-gc[=D]      D is the directory where
                    138:                           Boehm garbage collecting library is installed],[
                    139: 
                    140:        GC=$withval
                    141:        GC_LIBS="$GC/libgc.la"
                    142: 
                    143:        if test -f $GC_LIBS; then
                    144:                GC_OK="yes"
                    145:        else
                    146:                GC_LIBS="-L$GC -lgc"
                    147:        fi
                    148: ],[
                    149:        GC_LIBS="-lgc"
                    150:        AC_MSG_WARN([--with-gc was not specified, hoping linker would find it])
1.63      paf       151: ])
1.153     moko      152: 
1.158     moko      153: if test -z "$GC_OK"; then
1.153     moko      154:        AC_MSG_CHECKING(for libgc)
                    155:        SAVE_LIBS=$LIBS
                    156:        LIBS="$LIBS $GC_LIBS"
1.158     moko      157:        AC_TRY_LINK([ extern int GC_dont_gc; ],[ GC_dont_gc=0; ],
1.153     moko      158:                AC_MSG_RESULT(yes)
                    159:        ,
                    160:                AC_MSG_RESULT(no)
1.158     moko      161:                if test -z "$GC"; then
                    162:                        AC_MSG_ERROR(please specify path to libgc: --with-gc)
                    163:                else
                    164:                        AC_MSG_ERROR($GC does not seem to be valid libgc installation directory)
                    165:                fi
1.153     moko      166:        )
                    167:        LIBS=$SAVE_LIBS
1.63      paf       168: fi
1.158     moko      169: 
1.63      paf       170: AC_SUBST(GC_LIBS)
1.1       paf       171: 
1.17      paf       172: 
1.141     moko      173: dnl PCRE argument
1.158     moko      174: AC_ARG_WITH(pcre,[  --with-pcre=D    D is the directory where
                    175:                           PCRE library is installed],[
1.103     misha     176:        PCRE=$withval
1.158     moko      177:        PCRE_INCLUDES="-I$PCRE/include"
                    178:        PCRE_LIBS="$PCRE/lib/libpcre.la"
1.103     misha     179: 
1.159     moko      180:        if test -f $PCRE/include/pcre.h -a -f $PCRE_LIBS; then
                    181:                PCRE_OK="yes"
1.158     moko      182:        else
                    183:                PCRE_LIBS="-L$PCRE -lpcre"
1.103     misha     184:        fi
                    185: 
1.158     moko      186: ],[
                    187:        PCRE_LIBS="-lpcre"
                    188:        AC_MSG_WARN([--with-pcre was not specified, hoping linker would find it])
1.103     misha     189: ])
1.158     moko      190: 
1.159     moko      191: if test -z "$PCRE_OK"; then
1.158     moko      192:        AC_MSG_CHECKING(for prce)
                    193:        SAVE_LIBS=$LIBS
                    194:        LIBS="$LIBS $PCRE_LIBS $PCRE_INCLUDES"
1.159     moko      195:        AC_TRY_LINK([ #include <pcre.h> ],[ const char *v=pcre_version(); ],
1.158     moko      196:                AC_MSG_RESULT(yes)
                    197:        ,
                    198:                AC_MSG_RESULT(no)
                    199:                if test -z "$PCRE"; then
1.159     moko      200:                        AC_MSG_ERROR(please specify path to PCRE: --with-pcre)
1.158     moko      201:                else
                    202:                        AC_MSG_ERROR($PCRE does not seem to be valid PCRE installation directory)
                    203:                fi
                    204:        )
                    205:        LIBS=$SAVE_LIBS
                    206: fi
                    207: 
1.103     misha     208: AC_SUBST(PCRE_INCLUDES)
                    209: AC_SUBST(PCRE_LIBS)
                    210: 
                    211: 
1.141     moko      212: dnl XML/XSLT argument
1.159     moko      213: AC_ARG_WITH(xml,[  --with-xml=D     D is the directory where
                    214:                           Gnome XML libraries are installed],[
1.63      paf       215: 
1.159     moko      216:        XML=$withval
                    217:        XML_LIBS="-lxml2 -lxslt -lexslt"
1.63      paf       218: 
1.159     moko      219:        if test -z "$XML" -o "$XML" = "yes"; then
                    220:                XML=""
                    221:                XML_INCLUDES="-I/usr/include/libxml2"
                    222:                AC_MSG_WARN([--with-xml value was not specified, hoping linker would find it])
                    223:        else
                    224:                XML_INCLUDES="-I$XML/include -I$XML/include/libxml2"
1.63      paf       225: 
1.159     moko      226:                if test -f $XML/include/libxslt/xslt.h -a -f $XML/lib/libxml2.la \
                    227:                        -a -f $XML/lib/libxslt.la -a -f $XML/lib/libexslt.la; then
                    228:                        XML_LIBS="$XML/lib/libxml2.la $XML/lib/libxslt.la $XML/lib/libexslt.la"
                    229:                        XML_OK="yes"
                    230:                fi
1.63      paf       231:        fi
                    232: 
1.159     moko      233:        if test -z "$XML_OK"; then
                    234:                AC_MSG_CHECKING(for xml)
                    235:                SAVE_LIBS=$LIBS
                    236:                LIBS="$LIBS $XML_LIBS $XML_INCLUDES"
                    237:                AC_TRY_LINK([ #include <libxslt/xslt.h> ],[ const char *v=xsltEngineVersion; ],
                    238:                        AC_MSG_RESULT(yes)
                    239:                ,
                    240:                        AC_MSG_RESULT(no)
                    241:                        if test -z "$XML"; then
                    242:                                AC_MSG_ERROR(please specify path to Gnome XML libraries: --with-xml)
                    243:                        else
                    244:                                AC_MSG_ERROR($XML does not seem to be valid Gnome XML installation directory)
                    245:                        fi
                    246:                )
                    247:                LIBS=$SAVE_LIBS
1.63      paf       248:        fi
1.159     moko      249:        AC_DEFINE(XML,,xml-abled parser)
                    250: ])
1.63      paf       251: 
1.1       paf       252: AC_SUBST(XML_INCLUDES)
                    253: AC_SUBST(XML_LIBS)
1.33      paf       254: 
1.141     moko      255: dnl Mail receive argument
1.91      paf       256: AC_ARG_WITH(glib-config,[  --with-glib-config=FILE FILE is glib library
                    257:                           configuration file (search for glib*-config)],
                    258:        GLIB_CONFIG=$withval
                    259: )
                    260: 
1.33      paf       261: AC_ARG_WITH(shared-mailreceive,[  --with-shared-mailreceive=D is the directory where
1.63      paf       262:                           Gnome MIME library is installed (shared lib)],[
                    263:        GNOME_MIME=$withval
                    264:        MIMEBIN="$GNOME_MIME/bin"
                    265:        MIMEINC="$GNOME_MIME/include"
                    266:        MIMELIB="$GNOME_MIME/lib"
                    267: 
                    268:        if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
                    269:                AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
                    270:        fi
                    271: 
                    272:        AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses shared library))
                    273:        
                    274:        LIBMIME_SO_NAME=`cd $MIMELIB ; ls libgmime.?? libgmime.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
                    275: 
                    276:        if test -z "$GLIB_CONFIG"; then
1.91      paf       277:                GLIB_CONFIG=$XMLBIN/glib-config
1.63      paf       278:                if test \! -x $GLIB_CONFIG; then
1.91      paf       279:                        GLIB_CONFIG=$XMLBIN/glib2-config
                    280:                        if test \! -x $GLIB_CONFIG; then
                    281:                                GLIB_CONFIG=glib-config
                    282:                        fi
1.63      paf       283:                fi
                    284:        fi
                    285:        GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
                    286:        GLIB_LIBS=`$GLIB_CONFIG --libs`
                    287: 
                    288:        MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
                    289:        MIME_LIBS="$GLIB_LIBS -L$MIMELIB -l$LIBMIME_SO_NAME"
                    290:        if test \! -z "$LD_PATHLINK"; then
1.33      paf       291:        MIME_LIBS="$MIME_LIBS -Wl,$LD_PATHLINK -Wl,$MIMELIB"
1.63      paf       292:        fi
1.33      paf       293: ])
                    294: AC_ARG_WITH(static-mailreceive,[  --with-static-mailreceive=D is the directory where
                    295:                           Gnome MIME library is installed (static lib)],[
1.63      paf       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: 
                    305:        AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses static library))
                    306: 
                    307:        if test -z "$GLIB_CONFIG"; then
1.91      paf       308:                GLIB_CONFIG=$XMLBIN/glib-config
1.63      paf       309:                if test \! -x $GLIB_CONFIG; then
1.91      paf       310:                        GLIB_CONFIG=$XMLBIN/glib2-config
                    311:                        if test \! -x $GLIB_CONFIG; then
                    312:                                GLIB_CONFIG=glib-config
                    313:                        fi
1.63      paf       314:                fi
                    315:        fi
                    316:        GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
1.33      paf       317: 
                    318: dnl  '-L/usr/local/lib -lglib' -> /usr/local/lib
                    319: changequote(, )dnl
1.63      paf       320:        GLIB_DIR=`$GLIB_CONFIG --libs | sed 's/.*-L\([^ ]*\).*/\1/'`
                    321:        GLIB_NAME=`$GLIB_CONFIG --libs | sed 's/.*-l\([^ ]*\).*/\1/'`
1.33      paf       322: changequote([, ])dnl
1.63      paf       323:        MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
1.153     moko      324:        MIME_LIBS="$MIMELIB/libgmime.la $GLIB_DIR/lib$GLIB_NAME.la"
1.33      paf       325: ])
                    326: AC_SUBST(MIME_INCLUDES)
                    327: AC_SUBST(MIME_LIBS)
1.18      paf       328: 
                    329: 
1.141     moko      330: dnl Sendmail argument
1.18      paf       331: AC_ARG_WITH(sendmail,[  \"--with-sendmail=COMMAND\" forces this command to send mail.
                    332:                           example: \"--with-sendmail=/usr/sbin/sendmail -t\"
                    333:                           (makes parser ignore user-defined sendmail commands)],
                    334:        AC_DEFINE_UNQUOTED(PA_FORCED_SENDMAIL,"$withval",parser uses this command instead of user-defined sendmail commands)
                    335: )
                    336: 
1.14      paf       337: 
1.141     moko      338: dnl Apache module argument
1.131     moko      339: AC_ARG_WITH(apache,[  --with-apache=FILE is the full path for APXS
                    340:                           builds apache DSO module using apxs],[
                    341:        APXS=$withval
                    342: 
                    343:        if test -z "$APXS" -o "$APXS" = "yes"; then
                    344:                APXS=`which apxs 2>/dev/null`
1.157     moko      345:                if test -z "$APXS"; then
                    346:                        APXS=`which apxs2 2>/dev/null`
                    347:                fi
                    348:        fi
1.131     moko      349: 
                    350:        APACHE=`$APXS -q TARGET 2>/dev/null`
                    351: 
                    352:        if test -z "$APACHE"; then
1.157     moko      353:                AC_MSG_ERROR($APXS does not seem to be valid apache apxs utility path)
1.63      paf       354:        fi
1.131     moko      355: 
                    356:        APACHE_MAIN_INC=`$APXS -q INCLUDEDIR`
                    357:        APACHE_EXTRA_INC=`$APXS -q EXTRA_INCLUDES 2>/dev/null`
                    358:        APACHE_INC="-I$APACHE_MAIN_INC $APACHE_EXTRA_INC"
                    359:        APACHE_CFLAGS=`$APXS -q CFLAGS`
                    360: ])
                    361: AC_SUBST(APACHE)
                    362: AC_SUBST(APACHE_INC)
                    363: AC_SUBST(APACHE_CFLAGS)
                    364: AM_CONDITIONAL(COMPILE_APACHE_MODULE, test -n "$APACHE")
1.14      paf       365: 
1.1       paf       366: 
                    367: dnl Enable building of the convenience library
1.142     moko      368: LT_CONFIG_LTDL_DIR(src/lib/ltdl)
1.162   ! moko      369: LT_INIT(dlopen win32-dll no-pic)
1.142     moko      370: LTDL_INIT
1.1       paf       371: 
1.60      paf       372: 
1.1       paf       373: dnl Checks for typedefs, structures, and compiler characteristics.
1.79      paf       374: AC_C_BIGENDIAN(
                    375:        AC_DEFINE(PA_BIG_ENDIAN,,compile for sparc processor)
                    376: ,
                    377:        AC_DEFINE(PA_LITTLE_ENDIAN,,compile for intel processor or compatible)
                    378: ,
                    379:        AC_MSG_ERROR(word endianness not determined for some obscure reason)
                    380: )
                    381: 
1.1       paf       382: AC_TYPE_SIZE_T
1.141     moko      383: 
1.142     moko      384: 
1.34      paf       385: dnl gmime
                    386: AC_CHECK_TYPE(off_t, long)
                    387: AC_CHECK_TYPE(ssize_t, int)
                    388: 
1.1       paf       389: 
1.62      paf       390: dnl Checks for C header files.
1.10      paf       391: AC_HEADER_TIME
                    392: 
1.1       paf       393: AC_CHECK_HEADERS(
1.63      paf       394: assert.h \
1.48      paf       395: signal.h \
1.1       paf       396: unistd.h \
                    397: process.h \
                    398: stddef.h \
                    399: stdarg.h \
                    400: fcntl.h \
                    401: sys/stat.h \
                    402: io.h \
                    403: stdio.h \
                    404: errno.h \
                    405: ctype.h \
                    406: math.h \
1.35      paf       407: crypt.h \
1.3       paf       408: time.h sys/time.h \
1.1       paf       409: string.h \
                    410: direct.h \
                    411: setjmp.h \
                    412: memory.h \
1.140     moko      413: limits.h \
1.1       paf       414: sys/file.h \
                    415: sys/locking.h \
1.3       paf       416: sys/types.h \
1.5       paf       417: sys/select.h \
1.39      paf       418: sys/resource.h \
1.49      paf       419: winsock.h \
                    420: sys/socket.h \
                    421: netinet/in.h \
                    422: arpa/inet.h \
                    423: netdb.h
1.1       paf       424: )
                    425: 
1.142     moko      426: 
                    427: dnl Checks for libraries
                    428: 
1.1       paf       429: 
                    430: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
                    431: case "$host" in
1.114     misha     432:   *-freebsd4*)
                    433:          AC_DEFINE(FREEBSD4,,FreeBSD4X target platform)
                    434:   ;;
1.1       paf       435:   *-sunos5.6* | *-solaris2.6*)
1.63      paf       436:          AC_CHECK_LIB(xnet, main)
1.1       paf       437:   ;;
                    438:   *-sunos5* | *-solaris2*)
1.63      paf       439:          AC_CHECK_LIB(socket, main)
                    440:          AC_CHECK_LIB(nsl, main)
1.1       paf       441:   ;;
                    442:   *-nec-sysv4*)
1.63      paf       443:          AC_CHECK_LIB(nsl, gethostbyname)
                    444:          AC_CHECK_LIB(socket, socket)
1.1       paf       445:   ;;
                    446:   *-cygwin*)
1.63      paf       447:          AC_DEFINE(WIN32,,Windows32 target platform)
                    448:          AC_CHECK_LIB(wsock32, socket)
1.1       paf       449:   ;;
                    450: esac
                    451: 
                    452: AC_CHECK_LIB(m, sin)
1.35      paf       453: AC_CHECK_LIB(crypt, crypt)
                    454: 
1.1       paf       455: dnl Checks for functions.
                    456: 
                    457: AC_CHECK_FUNCS(
                    458: flock \
                    459: _locking \
1.7       paf       460: fcntl \
1.4       paf       461: lockf \
1.53      paf       462: ftruncate \
1.119     misha     463: fchmod \
1.35      paf       464: getrusage \
1.47      paf       465: gettimeofday \
1.49      paf       466: crypt \
1.80      paf       467: sigsetjmp \
1.94      misha     468: siglongjmp \
                    469: unsetenv
1.63      paf       470: )
                    471: 
1.142     moko      472: dnl on some linux[seen on 2.4] it's a macro
1.63      paf       473: PA_CHECK_SIGSETJMP
                    474: 
                    475: dnl see comment above
                    476: AC_LANG_PUSH(C++)
                    477: PA_CHECK_MATH_FUNCS_ONE_ARG(
                    478: trunc \
                    479: round \
                    480: sign
1.1       paf       481: )
1.63      paf       482: AC_LANG_POP
1.3       paf       483: 
1.75      paf       484: dnl We require qsort(3)
1.3       paf       485: 
                    486: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
1.1       paf       487: 
1.46      paf       488: dnl For correct mail receiving we need to know local offset from GMT
                    489: dnl it be timezone+(daylight?60*60*sign(timezone):0)
                    490: dnl or it can be tm.tm_gmtoff
                    491: dnl or it can be tm.tm_tzadj
                    492: 
                    493: AC_MSG_CHECKING(for timezone variable)
1.141     moko      494: AC_TRY_COMPILE([#include <time.h>],
1.46      paf       495: [
                    496: time_t test=timezone;
1.141     moko      497: ],
                    498: AC_DEFINE(HAVE_TIMEZONE)
                    499: AC_MSG_RESULT(yes),
                    500: AC_MSG_RESULT(no))
1.46      paf       501: 
                    502: AC_MSG_CHECKING(for daylight variable)
1.141     moko      503: AC_TRY_COMPILE([#include <time.h>],
1.46      paf       504: [
                    505: int test=daylight;
1.141     moko      506: ],
                    507: AC_DEFINE(HAVE_DAYLIGHT)
                    508: AC_MSG_RESULT(yes),
                    509: AC_MSG_RESULT(no))
1.46      paf       510: 
                    511: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
1.141     moko      512: AC_TRY_COMPILE([#include <time.h>],
                    513: [struct tm tm;
                    514: tm.tm_gmtoff=0;
                    515: ],
                    516: AC_DEFINE(HAVE_TM_GMTOFF)
                    517: AC_MSG_RESULT(yes),
                    518: AC_MSG_RESULT(no))
1.46      paf       519: 
                    520: AC_MSG_CHECKING(for tm_tzadj in struct tm)
1.141     moko      521: AC_TRY_COMPILE([#include <time.h>],
                    522: [struct tm tm;
                    523: tm.tm_tzadj=0;
                    524: ],
                    525: AC_DEFINE(HAVE_TM_TZADJ)
                    526: AC_MSG_RESULT(yes),
                    527: AC_MSG_RESULT(no))
                    528: 
1.17      paf       529: 
1.58      paf       530: dnl Output header and makefiles
                    531: AH_TEMPLATE([HAVE_DLD],[Define if you have the GNU dld library])
                    532: 
                    533: AH_TEMPLATE([HAVE_LIBDL],
                    534:        [Define if you have the libdl library or equivalent.])
                    535: 
                    536: AH_TEMPLATE([HAVE_SHL_LOAD],
                    537:        [Define if you have the shl_load function. ])
                    538: 
                    539: 
                    540: AH_TEMPLATE([size_t],
                    541:        [Define to `unsigned int' if <sys/types.h> does not define.])
                    542: 
                    543: AH_TEMPLATE([ssize_t],
                    544:        [Define to `int' if <sys/types.h> does not define.])
                    545: 
                    546: AH_TEMPLATE([HAVE_DAYLIGHT],
                    547:        [Define if you have daylight external variable in <time.h>])
                    548: 
                    549: AH_TEMPLATE([HAVE_TIMEZONE],
                    550:        [Define if you have timezone external variable in <time.h>])
                    551: 
                    552: AH_TEMPLATE([HAVE_TM_GMTOFF],
                    553:        [Define if you have tm_gmtoff member of tm structure in <time.h>])
                    554: 
                    555: AH_TEMPLATE([HAVE_TM_TZADJ],
                    556:        [Define if you have tm_tzadj member of tm structure in <time.h>])
                    557: 
1.1       paf       558: 
                    559: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.141     moko      560: 
1.66      paf       561: AC_OUTPUT(
                    562:        Makefile 
                    563:        src/Makefile 
                    564:        src/types/Makefile 
                    565:        src/classes/Makefile 
                    566:        src/include/Makefile 
                    567:        src/main/Makefile 
                    568:        src/sql/Makefile 
                    569:        src/lib/Makefile 
1.71      paf       570:        src/lib/gd/Makefile 
                    571:        src/lib/smtp/Makefile 
1.66      paf       572:        src/lib/gc/Makefile 
                    573:        src/lib/gc/include/Makefile
1.108     misha     574:        src/lib/pcre/Makefile 
1.66      paf       575:        src/lib/cord/Makefile
                    576:        src/lib/cord/include/Makefile
                    577:        src/lib/cord/include/private/Makefile
                    578:        src/lib/md5/Makefile
                    579:        src/lib/sdbm/Makefile
1.133     moko      580:        src/lib/sdbm/pa-include/Makefile
1.128     misha     581:        src/lib/json/Makefile
1.137     moko      582:        src/lib/memcached/Makefile
1.138     moko      583:        src/lib/curl/Makefile
1.66      paf       584:        src/targets/Makefile
                    585:        src/targets/cgi/Makefile
1.131     moko      586:        src/targets/apache/Makefile
1.66      paf       587:        src/targets/isapi/Makefile
                    588:        etc/Makefile
                    589:        etc/parser3.charsets/Makefile
1.67      paf       590:        bin/Makefile
                    591:        bin/auto.p.dist)

E-mail: