Annotation of parser3/configure.in, revision 1.161

1.142     moko        1: dnl Autoconf initialisation
                      2: AC_PREREQ(2.59)
                      3: AC_INIT(parser, 3.4.2b)
                      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.63      paf        25:        rm -f $srcdir/src/include/pa_version.h && mv $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h && \
                     26:        echo 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.153     moko      369: LT_INIT(dlopen win32-dll)
                    370: #LT_INIT(disable-shared dlopen win32-dll)
1.142     moko      371: LTDL_INIT
1.1       paf       372: 
1.60      paf       373: 
1.1       paf       374: dnl Checks for typedefs, structures, and compiler characteristics.
1.79      paf       375: AC_C_BIGENDIAN(
                    376:        AC_DEFINE(PA_BIG_ENDIAN,,compile for sparc processor)
                    377: ,
                    378:        AC_DEFINE(PA_LITTLE_ENDIAN,,compile for intel processor or compatible)
                    379: ,
                    380:        AC_MSG_ERROR(word endianness not determined for some obscure reason)
                    381: )
                    382: 
1.1       paf       383: AC_TYPE_SIZE_T
1.141     moko      384: 
1.142     moko      385: 
1.34      paf       386: dnl gmime
                    387: AC_CHECK_TYPE(off_t, long)
                    388: AC_CHECK_TYPE(ssize_t, int)
                    389: 
1.1       paf       390: 
1.62      paf       391: dnl Checks for C header files.
1.10      paf       392: AC_HEADER_TIME
                    393: 
1.1       paf       394: AC_CHECK_HEADERS(
1.63      paf       395: assert.h \
1.48      paf       396: signal.h \
1.1       paf       397: unistd.h \
                    398: process.h \
                    399: stddef.h \
                    400: stdarg.h \
                    401: fcntl.h \
                    402: sys/stat.h \
                    403: io.h \
                    404: stdio.h \
                    405: errno.h \
                    406: ctype.h \
                    407: math.h \
1.35      paf       408: crypt.h \
1.3       paf       409: time.h sys/time.h \
1.1       paf       410: string.h \
                    411: direct.h \
                    412: setjmp.h \
                    413: memory.h \
1.140     moko      414: limits.h \
1.1       paf       415: sys/file.h \
                    416: sys/locking.h \
1.3       paf       417: sys/types.h \
1.5       paf       418: sys/select.h \
1.39      paf       419: sys/resource.h \
1.49      paf       420: winsock.h \
                    421: sys/socket.h \
                    422: netinet/in.h \
                    423: arpa/inet.h \
                    424: netdb.h
1.1       paf       425: )
                    426: 
1.142     moko      427: 
                    428: dnl Checks for libraries
                    429: 
1.1       paf       430: 
                    431: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
                    432: case "$host" in
1.114     misha     433:   *-freebsd4*)
                    434:          AC_DEFINE(FREEBSD4,,FreeBSD4X target platform)
                    435:   ;;
1.1       paf       436:   *-sunos5.6* | *-solaris2.6*)
1.63      paf       437:          AC_CHECK_LIB(xnet, main)
1.1       paf       438:   ;;
                    439:   *-sunos5* | *-solaris2*)
1.63      paf       440:          AC_CHECK_LIB(socket, main)
                    441:          AC_CHECK_LIB(nsl, main)
1.1       paf       442:   ;;
                    443:   *-nec-sysv4*)
1.63      paf       444:          AC_CHECK_LIB(nsl, gethostbyname)
                    445:          AC_CHECK_LIB(socket, socket)
1.1       paf       446:   ;;
                    447:   *-cygwin*)
1.63      paf       448:          AC_DEFINE(WIN32,,Windows32 target platform)
                    449:          AC_CHECK_LIB(wsock32, socket)
1.1       paf       450:   ;;
                    451: esac
                    452: 
                    453: AC_CHECK_LIB(m, sin)
1.35      paf       454: AC_CHECK_LIB(crypt, crypt)
                    455: 
1.1       paf       456: dnl Checks for functions.
                    457: 
                    458: AC_CHECK_FUNCS(
                    459: flock \
                    460: _locking \
1.7       paf       461: fcntl \
1.4       paf       462: lockf \
1.53      paf       463: ftruncate \
1.119     misha     464: fchmod \
1.35      paf       465: getrusage \
1.47      paf       466: gettimeofday \
1.49      paf       467: crypt \
1.80      paf       468: sigsetjmp \
1.94      misha     469: siglongjmp \
                    470: unsetenv
1.63      paf       471: )
                    472: 
1.142     moko      473: dnl on some linux[seen on 2.4] it's a macro
1.63      paf       474: PA_CHECK_SIGSETJMP
                    475: 
                    476: dnl see comment above
                    477: AC_LANG_PUSH(C++)
                    478: PA_CHECK_MATH_FUNCS_ONE_ARG(
                    479: trunc \
                    480: round \
                    481: sign
1.1       paf       482: )
1.63      paf       483: AC_LANG_POP
1.3       paf       484: 
1.75      paf       485: dnl We require qsort(3)
1.3       paf       486: 
                    487: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
1.1       paf       488: 
1.46      paf       489: dnl For correct mail receiving we need to know local offset from GMT
                    490: dnl it be timezone+(daylight?60*60*sign(timezone):0)
                    491: dnl or it can be tm.tm_gmtoff
                    492: dnl or it can be tm.tm_tzadj
                    493: 
                    494: AC_MSG_CHECKING(for timezone variable)
1.141     moko      495: AC_TRY_COMPILE([#include <time.h>],
1.46      paf       496: [
                    497: time_t test=timezone;
1.141     moko      498: ],
                    499: AC_DEFINE(HAVE_TIMEZONE)
                    500: AC_MSG_RESULT(yes),
                    501: AC_MSG_RESULT(no))
1.46      paf       502: 
                    503: AC_MSG_CHECKING(for daylight variable)
1.141     moko      504: AC_TRY_COMPILE([#include <time.h>],
1.46      paf       505: [
                    506: int test=daylight;
1.141     moko      507: ],
                    508: AC_DEFINE(HAVE_DAYLIGHT)
                    509: AC_MSG_RESULT(yes),
                    510: AC_MSG_RESULT(no))
1.46      paf       511: 
                    512: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
1.141     moko      513: AC_TRY_COMPILE([#include <time.h>],
                    514: [struct tm tm;
                    515: tm.tm_gmtoff=0;
                    516: ],
                    517: AC_DEFINE(HAVE_TM_GMTOFF)
                    518: AC_MSG_RESULT(yes),
                    519: AC_MSG_RESULT(no))
1.46      paf       520: 
                    521: AC_MSG_CHECKING(for tm_tzadj in struct tm)
1.141     moko      522: AC_TRY_COMPILE([#include <time.h>],
                    523: [struct tm tm;
                    524: tm.tm_tzadj=0;
                    525: ],
                    526: AC_DEFINE(HAVE_TM_TZADJ)
                    527: AC_MSG_RESULT(yes),
                    528: AC_MSG_RESULT(no))
                    529: 
1.17      paf       530: 
1.58      paf       531: dnl Output header and makefiles
                    532: AH_TEMPLATE([HAVE_DLD],[Define if you have the GNU dld library])
                    533: 
                    534: AH_TEMPLATE([HAVE_LIBDL],
                    535:        [Define if you have the libdl library or equivalent.])
                    536: 
                    537: AH_TEMPLATE([HAVE_SHL_LOAD],
                    538:        [Define if you have the shl_load function. ])
                    539: 
                    540: 
                    541: AH_TEMPLATE([size_t],
                    542:        [Define to `unsigned int' if <sys/types.h> does not define.])
                    543: 
                    544: AH_TEMPLATE([ssize_t],
                    545:        [Define to `int' if <sys/types.h> does not define.])
                    546: 
                    547: AH_TEMPLATE([HAVE_DAYLIGHT],
                    548:        [Define if you have daylight external variable in <time.h>])
                    549: 
                    550: AH_TEMPLATE([HAVE_TIMEZONE],
                    551:        [Define if you have timezone external variable in <time.h>])
                    552: 
                    553: AH_TEMPLATE([HAVE_TM_GMTOFF],
                    554:        [Define if you have tm_gmtoff member of tm structure in <time.h>])
                    555: 
                    556: AH_TEMPLATE([HAVE_TM_TZADJ],
                    557:        [Define if you have tm_tzadj member of tm structure in <time.h>])
                    558: 
1.1       paf       559: 
                    560: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.141     moko      561: 
1.66      paf       562: AC_OUTPUT(
                    563:        Makefile 
                    564:        src/Makefile 
                    565:        src/types/Makefile 
                    566:        src/classes/Makefile 
                    567:        src/include/Makefile 
                    568:        src/main/Makefile 
                    569:        src/sql/Makefile 
                    570:        src/lib/Makefile 
1.71      paf       571:        src/lib/gd/Makefile 
                    572:        src/lib/smtp/Makefile 
1.66      paf       573:        src/lib/gc/Makefile 
                    574:        src/lib/gc/include/Makefile
1.108     misha     575:        src/lib/pcre/Makefile 
1.66      paf       576:        src/lib/cord/Makefile
                    577:        src/lib/cord/include/Makefile
                    578:        src/lib/cord/include/private/Makefile
                    579:        src/lib/md5/Makefile
                    580:        src/lib/sdbm/Makefile
1.133     moko      581:        src/lib/sdbm/pa-include/Makefile
1.128     misha     582:        src/lib/json/Makefile
1.137     moko      583:        src/lib/memcached/Makefile
1.138     moko      584:        src/lib/curl/Makefile
1.66      paf       585:        src/targets/Makefile
                    586:        src/targets/cgi/Makefile
1.131     moko      587:        src/targets/apache/Makefile
1.66      paf       588:        src/targets/isapi/Makefile
                    589:        etc/Makefile
                    590:        etc/parser3.charsets/Makefile
1.67      paf       591:        bin/Makefile
                    592:        bin/auto.p.dist)

E-mail: