Annotation of parser3/configure.in, revision 1.140

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

E-mail: