Annotation of parser3/configure.in, revision 1.62.2.2

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.22      paf         5: AM_INIT_AUTOMAKE(parser, 3.0.HEAD, 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: 
                     11: PARSER_VERSION=$VERSION
1.8       paf        12: echo "/* automatically generated by configure */" > $srcdir/src/include/pa_version.h.new
                     13: echo "/* edit configure.in to change version number */" >> $srcdir/src/include/pa_version.h.new
                     14: echo "#define PARSER_VERSION \"$PARSER_VERSION\"" >> $srcdir/src/include/pa_version.h.new
                     15: cmp $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h >/dev/null 2>&1
1.1       paf        16: if test $? -ne 0 ; then
1.8       paf        17:     rm -f $srcdir/src/include/pa_version.h && mv $srcdir/src/include/pa_version.h.new $srcdir/src/include/pa_version.h && \
                     18:     echo Updated $srcdir/src/include/pa_version.h
1.1       paf        19: else
1.8       paf        20:        rm -f $srcdir/src/include/pa_version.h.new
1.1       paf        21: fi
                     22: 
1.58      paf        23: 
1.41      paf        24: dnl AC_CANONICAL_SYSTEM
                     25: AC_CANONICAL_HOST
                     26: AC_SUBST(host_os)
1.62.2.2! paf        27: case $host_os in
        !            28:   *cygwin* ) AC_DEFINE(CYGWIN,,using cygwin building environment);;
        !            29: esac
1.41      paf        30: 
                     31: dnl Checks for programs.
1.1       paf        32: AC_PROG_INSTALL
1.41      paf        33: AC_PROG_MAKE_SET
                     34: AC_PROG_RANLIB
                     35: AC_PROG_AWK
                     36: 
                     37: AC_PROG_YACC
                     38: if test "$YACC" != "bison -y"; then
                     39:     AC_MSG_WARN(to regenerate Parser grammar YOU WOULD NEED BISON)
                     40: else
                     41:     AC_MSG_CHECKING(bison version)
                     42:     oldIFS=$IFS; IFS=.
                     43:     set `bison -V | sed -e 's/^GNU Bison version //'`
                     44:     IFS=$oldIFS
                     45:     if test "$1" = "1" -a "$2" -lt "25"; then
                     46:         AC_MSG_WARN(Bison 1.25 or newer needed to regenerate Parser compiler (found $1.$2).)
                     47:     fi
                     48:     AC_MSG_RESULT($1.$2 (ok))
                     49: fi
                     50: 
1.62      paf        51: AC_PROG_CXX
1.1       paf        52: AC_PROG_CC
1.62      paf        53: dnl most tests sould be compiled with C compiler [especially qsort test]
1.1       paf        54: AC_LANG_C AC_C_INLINE
                     55: 
                     56: dnl Arguments
                     57: 
1.56      paf        58: AC_ARG_ENABLE(safe-mode, [  --disable-safe-mode     to enable reading and executing
                     59:                           files belonging to group+user other then effective],
1.1       paf        60: [
1.56      paf        61:     SAFE_MODE=$enableval
1.1       paf        62: ]
                     63: )
1.56      paf        64: if test "$SAFE_MODE" = "no"; then
                     65:        AC_MSG_WARN(enabling reading of files belonging to group+user other then effective)
                     66: else
1.57      paf        67:        AC_DEFINE(PA_SAFE_MODE,,disabled reading of files belonging to group+user other then effective)
1.56      paf        68: fi
1.1       paf        69: 
1.15      paf        70: AC_ARG_ENABLE(execs, [  --disable-execs         to disable any execs
                     71:                           (file::exec, file::cgi, unix mail:send)],
                     72: [
                     73: if test "$enableval" = "no"; then
1.16      paf        74:        AC_MSG_WARN(disabling file execs)
1.15      paf        75:        AC_DEFINE(NO_PA_EXECS,,pa_exec disabled)
1.16      paf        76: fi
                     77: ]
                     78: )
                     79: 
1.56      paf        80: AC_ARG_ENABLE(string-origins, [  --disable-string-origins to switch off string origin tracking],
1.16      paf        81: [
                     82: if test "$enableval" = "no"; then
1.56      paf        83:        AC_MSG_WARN(disabling string origin tracking)
                     84:        AC_DEFINE(NO_STRING_ORIGIN,,no string origin tracking)
1.15      paf        85: fi
                     86: ]
                     87: )
1.56      paf        88: 
                     89: 
1.20      paf        90: srccharsetsdir=$srcdir/etc/parser3.charsets
1.19      paf        91: CHARSETS_REQUESTED="windows-1251"
                     92: AC_ARG_WITH(charsets, [  --with-charsets=CHARSET[,CHARSET,...]  Enables charsets in root config (windows-1251,
                     93:                           windows-1250 windows-1257 koi8-r; Default is windows-1251)],
                     94: [CHARSETS_REQUESTED=`echo $withval | sed -e 's/,/ /g'`])
                     95: 
1.20      paf        96: # Checking whether all requested charsets have corresponding .cfg files
                     97: for c in $CHARSETS_REQUESTED; do
                     98:        if test \! -f $srccharsetsdir/$c.cfg; then
                     99:                AC_MSG_ERROR(bad charset requested "$c" - file $srccharsetsdir/$c.cfg not found)
                    100:        fi
                    101: done
                    102: 
                    103: # Switching on commentcharset_XXX='#'
1.19      paf       104: AC_DEFUN(PA_SUBSTCHARSET, [
                    105:        commentcharset_$2='#'
1.20      paf       106:        for c in $CHARSETS_REQUESTED; do
1.19      paf       107:                if test "$1" = "$c"; then
1.56      paf       108:                        AC_MSG_WARN(enabling charset $1)
1.20      paf       109:                        commentcharset_$2=
1.19      paf       110:                fi
                    111:        done
                    112:        AC_SUBST(commentcharset_$2)
                    113: ])
                    114: PA_SUBSTCHARSET(windows-1251,windows1251)
                    115: PA_SUBSTCHARSET(windows-1250,windows1250)
                    116: PA_SUBSTCHARSET(windows-1257,windows1257)
                    117: PA_SUBSTCHARSET(koi8-r,koi8r)
                    118: 
                    119: 
1.40      paf       120: AC_MSG_CHECKING(for dynamic-link library extension)
                    121: case "$host_os" in
                    122: hpux9* | hpux10* | hpux11*)
                    123:     dll_extension=sl
                    124:     ;;
                    125: cygwin)
                    126:     dll_extension=dll
                    127:     ;;
                    128: *)
                    129:     dll_extension=so
                    130: esac
                    131: AC_MSG_RESULT($dll_extension)
                    132: AC_SUBST(dll_extension)
                    133: 
1.19      paf       134: AC_ARG_WITH(mysql-client,[  --with-mysql-client=mysqlclientlib?withparams
                    135:                           MySQL client dynamic library to root config],
                    136:        mysql_client=$withval
                    137: ,
                    138:        AC_MSG_CHECKING(for mysql client)
                    139:        for lib in \
1.40      paf       140:                /usr/local/lib/mysql/libmysqlclient.$dll_extension \
                    141:                /usr/local/lib/libmysqlclient.$dll_extension \
                    142:                /usr/lib/libmysqlclient.$dll_extension; do
1.19      paf       143:                if test -f $lib; then mysql_client=$lib; fi
                    144:        done
                    145: 
                    146:        if test -z "$mysql_client"; then
                    147:                mysql_client="-configure could not guess-"
1.62      paf       148:                AC_MSG_RESULT(could not guess)
1.19      paf       149:        else
                    150:                AC_MSG_RESULT($mysql_client)
                    151:        fi
                    152: 
                    153: )
                    154: AC_SUBST(mysql_client)
                    155: 
                    156: AC_ARG_WITH(pgsql-client,[  --with-pgsql-client=pgsqlclientlib?withparams
                    157:                           PgSQL client dynamic library to root config],
                    158:        mysql_client=$withval
                    159: ,
                    160:        AC_MSG_CHECKING(for pgsql client)
                    161:        for lib in \
1.40      paf       162:                /usr/local/pgsql/lib/libpq.$dll_extension \
                    163:                /usr/local/lib/libpq.$dll_extension \
                    164:                /usr/lib/libpq.$dll_extension; do
1.19      paf       165:                if test -f $lib; then pgsql_client=$lib; fi
                    166:        done
                    167: 
                    168:        if test -z "$pgsql_client"; then
                    169:                pgsql_client="-configure could not guess-"
1.62      paf       170:                AC_MSG_RESULT(could not guess)
1.19      paf       171:        else
                    172:                AC_MSG_RESULT($pgsql_client)
                    173:        fi
                    174: 
                    175: )
                    176: AC_SUBST(pgsql_client)
                    177: 
                    178: AC_ARG_WITH(oracle-client,[  --with-oracle-client=oracleclientlib?withparams
                    179:                           Oracle client dynamic library],
                    180:        oracle_client=$withval
                    181: ,
                    182:        AC_MSG_CHECKING(for oracle client)
1.40      paf       183:        lib=$ORACLE_HOME/lib/libclntsh.$dll_extension
1.19      paf       184:        if test -f $lib; then oracle_client=$lib; fi
                    185: 
                    186:        if test -z "$oracle_client"; then
                    187:                oracle_client="-configure could not guess-"
1.62      paf       188:                AC_MSG_RESULT(could not guess)
1.19      paf       189:        else
                    190:                oracle_client="$oracle_client?ORACLE_HOME=$ORACLE_HOME&ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data"
                    191:                AC_MSG_RESULT($oracle_client)
                    192:        fi
                    193: 
                    194: )
                    195: AC_SUBST(oracle_client)
                    196: 
                    197: 
1.15      paf       198: 
1.9       paf       199: AC_ARG_WITH(pathlink,[  --with-pathlink=LKEY    put dynamic libraries paths to binary
1.1       paf       200:                           using linker key (-R, -rpath-link)],
                    201:        LD_PATHLINK=$withval
                    202: )
1.55      paf       203: AC_ARG_WITH(link-stdcpp, [  --with-link-stdcpp=PATH to directory with libstdc++
                    204:   --without-link-stdcpp   to disable libstdc++ linkage,
                    205:                           if you belive you do not need one],
                    206: [
                    207: LIBSTDCPP_PATH=$withval
                    208: if test "$LIBSTDCPP_PATH" = "no"; then
                    209:        AC_MSG_WARN(disabling libstdc++ linkage)
                    210: else
                    211:        if test -z "$LD_PATHLINK"; then
                    212:            AC_MSG_ERROR(when using --with-link-stdcpp one must specify --with-pathlink)
                    213:        fi
                    214:        LIBS="$LIBS -Wl,$LD_PATHLINK -Wl,$LIBSTDCPP_PATH"
                    215: fi
                    216: ],
                    217: #pseudo path, meaning still link libstdcpp. value needed to trick next _CONDITIONAL
                    218: LIBSTDCPP_PATH=" "
                    219: )
                    220: AM_CONDITIONAL(DO_NOT_LINK_LIBSTDCPP, test "$LIBSTDCPP_PATH" = "no")
                    221: 
                    222: 
                    223: 
1.38      paf       224: AC_ARG_WITH(sjlj-exceptions,[  --with-sjlj-exceptions  enable simple 'throw' from dynamic library],
                    225:        AC_DEFINE(PA_WITH_SJLJ_EXCEPTIONS,,one can throw from dynamic library)
                    226: )
1.1       paf       227: 
1.17      paf       228: 
1.9       paf       229: AC_ARG_WITH(glib-config,[  --with-glib-config=FILE FILE is glib library
                    230:                           configuration file (search for glib*-config)],
                    231:        GLIB_CONFIG=$withval
                    232: )
                    233: 
1.12      paf       234: AC_ARG_WITH(shared-xml,[  --with-shared-xml=D     D is the directory where
                    235:                           Gnome XML libraries are installed (shared libs)],[
1.1       paf       236:     GNOME_XML=$withval
1.13      paf       237:     XMLBIN="$GNOME_XML/bin"
                    238:     XMLINC="$GNOME_XML/include"
                    239:     XMLLIB="$GNOME_XML/lib"
1.1       paf       240: 
1.13      paf       241:     if test \! -d $XMLBIN -o \! -d $XMLINC -o \! -d $XMLLIB; then
1.1       paf       242:        AC_MSG_ERROR($GNOME_XML does not seem to be valid Gnome installation directory)
                    243:     fi
                    244: 
1.33      paf       245:     AC_DEFINE(XML,,xml-abled parser (uses shared library))
1.1       paf       246:     
1.13      paf       247:     LIBXML2_SO_NAME=`cd $XMLLIB ; ls libxml2.?? libxml2.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
                    248:     LIBGDOME_SO_NAME=`cd $XMLLIB ; ls libgdome.?? libgdome.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
                    249:     LIBXSLT_SO_NAME=`cd $XMLLIB ; ls libxslt.?? libxslt.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
                    250:     LIBEXSLT_SO_NAME=`cd $XMLLIB ; ls libexslt.?? libexslt.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
1.9       paf       251: 
                    252:     if test -z "$GLIB_CONFIG"; then
1.13      paf       253:            GLIB_CONFIG=$XMLBIN/glib-config
1.9       paf       254:            if test \! -x $GLIB_CONFIG; then
                    255:                GLIB_CONFIG=glib-config
                    256:            fi
1.1       paf       257:     fi
                    258:     GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
                    259:     GLIB_LIBS=`$GLIB_CONFIG --libs`
                    260: 
1.13      paf       261:     XML_INCLUDES="$GLIB_CFLAGS -I$XMLINC -I$XMLINC/libgdome -I$XMLINC/libxml2"
                    262:     XML_LIBS="$GLIB_LIBS -L$XMLLIB -l$LIBXML2_SO_NAME -l$LIBGDOME_SO_NAME -l$LIBXSLT_SO_NAME -l$LIBEXSLT_SO_NAME"
1.1       paf       263:     if test \! -z "$LD_PATHLINK"; then
1.13      paf       264:        XML_LIBS="$XML_LIBS -Wl,$LD_PATHLINK -Wl,$XMLLIB"
1.1       paf       265:     fi
                    266: ])
1.12      paf       267: AC_ARG_WITH(static-xml,[  --with-static-xml=D     D is the directory where
                    268:                           Gnome XML libraries are installed (static libs)],[
                    269:     GNOME_XML=$withval
1.13      paf       270:     XMLBIN="$GNOME_XML/bin"
                    271:     XMLINC="$GNOME_XML/include"
                    272:     XMLLIB="$GNOME_XML/lib"
1.12      paf       273: 
1.13      paf       274:     if test \! -d $XMLBIN -o \! -d $XMLINC -o \! -d $XMLLIB; then
1.12      paf       275:        AC_MSG_ERROR($GNOME_XML does not seem to be valid Gnome installation directory)
                    276:     fi
                    277: 
1.33      paf       278:     AC_DEFINE(XML,,xml-abled parser (uses static library))
1.12      paf       279: 
                    280:     if test -z "$GLIB_CONFIG"; then
1.13      paf       281:            GLIB_CONFIG=$XMLBIN/glib-config
1.12      paf       282:            if test \! -x $GLIB_CONFIG; then
                    283:                GLIB_CONFIG=glib-config
                    284:            fi
                    285:     fi
                    286:     GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
1.13      paf       287: 
1.12      paf       288: dnl  '-L/usr/local/lib -lglib' -> /usr/local/lib
1.13      paf       289: changequote(, )dnl
                    290:     GLIB_DIR=`$GLIB_CONFIG --libs | sed 's/.*-L\([^ ]*\).*/\1/'`
                    291:     GLIB_NAME=`$GLIB_CONFIG --libs | sed 's/.*-l\([^ ]*\).*/\1/'`
                    292: changequote([, ])dnl
                    293:     XML_INCLUDES="$GLIB_CFLAGS -I$XMLINC -I$XMLINC/libgdome -I$XMLINC/libxml2"
                    294:     XML_LIBS="$XMLLIB/libgdome.a $XMLLIB/libxslt.a $XMLLIB/libexslt.a $XMLLIB/libxml2.a $GLIB_DIR/lib$GLIB_NAME.a"
1.12      paf       295: ])
1.1       paf       296: AC_SUBST(XML_INCLUDES)
                    297: AC_SUBST(XML_LIBS)
1.33      paf       298: 
                    299: AC_ARG_WITH(shared-mailreceive,[  --with-shared-mailreceive=D is the directory where
                    300:                                Gnome MIME library is installed (shared lib)],[
                    301:     GNOME_MIME=$withval
                    302:     MIMEBIN="$GNOME_MIME/bin"
                    303:     MIMEINC="$GNOME_MIME/include"
                    304:     MIMELIB="$GNOME_MIME/lib"
                    305: 
                    306:     if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
                    307:        AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
                    308:     fi
                    309: 
1.34      paf       310:     AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses shared library))
1.33      paf       311:     
                    312:     LIBMIME_SO_NAME=`cd $MIMELIB ; ls libgmime.?? libgmime.??? 2>/dev/null | grep -v \.la$ | sed 's/lib//' | sed 's/\..*//'`
                    313: 
                    314:     if test -z "$GLIB_CONFIG"; then
                    315:            GLIB_CONFIG=$MIMEBIN/glib-config
                    316:            if test \! -x $GLIB_CONFIG; then
                    317:                GLIB_CONFIG=glib-config
                    318:            fi
                    319:     fi
                    320:     GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
                    321:     GLIB_LIBS=`$GLIB_CONFIG --libs`
                    322: 
                    323:     MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
                    324:     MIME_LIBS="$GLIB_LIBS -L$MIMELIB -l$LIBMIME_SO_NAME"
                    325:     if test \! -z "$LD_PATHLINK"; then
                    326:        MIME_LIBS="$MIME_LIBS -Wl,$LD_PATHLINK -Wl,$MIMELIB"
                    327:     fi
                    328: ])
                    329: AC_ARG_WITH(static-mailreceive,[  --with-static-mailreceive=D is the directory where
                    330:                           Gnome MIME library is installed (static lib)],[
                    331:     GNOME_MIME=$withval
                    332:     MIMEBIN="$GNOME_MIME/bin"
                    333:     MIMEINC="$GNOME_MIME/include"
                    334:     MIMELIB="$GNOME_MIME/lib"
                    335: 
                    336:     if test \! -d $MIMEBIN -o \! -d $MIMEINC -o \! -d $MIMELIB; then
                    337:        AC_MSG_ERROR($GNOME_MIME does not seem to be valid Gnome installation directory)
                    338:     fi
                    339: 
1.34      paf       340:     AC_DEFINE(WITH_MAILRECEIVE,,has \$mail:received (uses static library))
1.33      paf       341: 
                    342:     if test -z "$GLIB_CONFIG"; then
                    343:            GLIB_CONFIG=$MIMEBIN/glib-config
                    344:            if test \! -x $GLIB_CONFIG; then
                    345:                GLIB_CONFIG=glib-config
                    346:            fi
                    347:     fi
                    348:     GLIB_CFLAGS=`$GLIB_CONFIG --cflags`
                    349: 
                    350: dnl  '-L/usr/local/lib -lglib' -> /usr/local/lib
                    351: changequote(, )dnl
                    352:     GLIB_DIR=`$GLIB_CONFIG --libs | sed 's/.*-L\([^ ]*\).*/\1/'`
                    353:     GLIB_NAME=`$GLIB_CONFIG --libs | sed 's/.*-l\([^ ]*\).*/\1/'`
                    354: changequote([, ])dnl
                    355:     MIME_INCLUDES="$GLIB_CFLAGS -I$MIMEINC/gmime"
                    356:     MIME_LIBS="$MIMELIB/libgmime.a $GLIB_DIR/lib$GLIB_NAME.a"
                    357: ])
                    358: AC_SUBST(MIME_INCLUDES)
                    359: AC_SUBST(MIME_LIBS)
1.18      paf       360: 
                    361: 
                    362: AC_ARG_WITH(sendmail,[  \"--with-sendmail=COMMAND\" forces this command to send mail.
                    363:                           example: \"--with-sendmail=/usr/sbin/sendmail -t\"
                    364:                           (makes parser ignore user-defined sendmail commands)],
                    365:        AC_DEFINE_UNQUOTED(PA_FORCED_SENDMAIL,"$withval",parser uses this command instead of user-defined sendmail commands)
                    366: )
                    367: 
1.14      paf       368: 
                    369: AC_ARG_WITH(apache13,[  --with-apache13=D       D is the Apache13 source distribution directory
                    370:                           builds library for apache_module using that dir
                    371:                           (do not add /src)],
                    372:        APACHE13=$withval
                    373:     if test \! -f "$APACHE13/src/include/httpd.h"; then
                    374:        AC_MSG_ERROR($APACHE13 does not seem to be valid Apache13 source distribution directory)
                    375:     fi
                    376: )
                    377: AC_SUBST(APACHE13)
                    378: AM_CONDITIONAL(COMPILE_APACHE13_MODULE, test -n "$APACHE13")
                    379: 
1.1       paf       380: 
                    381: dnl Enable building of the convenience library
                    382: dnl and set LIBLTDL accordingly
1.51      paf       383: AC_LIBLTDL_CONVENIENCE(src/lib/ltdl)
1.1       paf       384: dnl Substitute INCLTDL and LIBLTDL in the Makefiles
                    385: AC_SUBST(INCLTDL)
                    386: AC_SUBST(LIBLTDL)
                    387: 
                    388: dnl Configure libltdl
1.51      paf       389: AC_CONFIG_SUBDIRS(src/lib/ltdl)
1.60      paf       390: 
                    391: dnl detecting which libraries are needed to dynamic open
                    392: AC_LTDL_DLLIB
1.10      paf       393: AC_SUBST(LIBADD_DL)
1.61      paf       394: LIBS="$LIBS $LIBADD_DL"
1.1       paf       395: 
                    396: dnl Checks for typedefs, structures, and compiler characteristics.
                    397: 
                    398: AC_TYPE_SIZE_T
1.34      paf       399: dnl gmime
                    400: AC_CHECK_TYPE(off_t, long)
                    401: AC_CHECK_TYPE(ssize_t, int)
                    402: 
1.1       paf       403: 
1.62      paf       404: dnl Checks for C header files.
1.1       paf       405: 
1.10      paf       406: AC_HEADER_TIME
                    407: 
1.1       paf       408: AC_CHECK_HEADERS(
1.48      paf       409: signal.h \
1.1       paf       410: unistd.h \
                    411: process.h \
                    412: stddef.h \
                    413: stdarg.h \
                    414: fcntl.h \
                    415: sys/stat.h \
                    416: io.h \
                    417: stdio.h \
                    418: errno.h \
                    419: ctype.h \
                    420: math.h \
1.35      paf       421: crypt.h \
1.3       paf       422: time.h sys/time.h \
1.1       paf       423: stdlib.h \
                    424: string.h \
                    425: direct.h \
                    426: setjmp.h \
                    427: memory.h \
                    428: sys/file.h \
                    429: sys/locking.h \
1.3       paf       430: sys/types.h \
1.5       paf       431: sys/select.h \
1.39      paf       432: sys/resource.h \
1.49      paf       433: winsock.h \
                    434: sys/socket.h \
                    435: netinet/in.h \
                    436: arpa/inet.h \
                    437: netdb.h
1.1       paf       438: )
                    439: 
                    440: dnl Checks for libraries.
                    441: 
                    442: dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
                    443: case "$host" in
                    444:   *-sunos5.6* | *-solaris2.6*)
                    445:       AC_CHECK_LIB(xnet, main)
                    446:   ;;
                    447:   *-sunos5* | *-solaris2*)
                    448:       AC_CHECK_LIB(socket, main)
                    449:       AC_CHECK_LIB(nsl, main)
                    450:   ;;
                    451:   *-nec-sysv4*)
                    452:       AC_CHECK_LIB(nsl, gethostbyname)
                    453:       AC_CHECK_LIB(socket, socket)
                    454:   ;;
                    455:   *-cygwin*)
                    456:       AC_DEFINE(WIN32,,Windows32 target platform)
                    457:       AC_CHECK_LIB(wsock32, socket)
                    458:   ;;
1.24      paf       459: # never tested this, only theoretically by letter from demos about parser2 build
1.25      paf       460:   *-hpux*)
1.24      paf       461:       AC_CHECK_LIB(nsl, main)
                    462:   ;;
1.1       paf       463: esac
                    464: 
                    465: AC_CHECK_LIB(m, sin)
                    466: 
1.35      paf       467: AC_CHECK_LIB(crypt, crypt)
                    468: 
1.1       paf       469: dnl Checks for functions.
                    470: 
                    471: AC_CHECK_FUNCS(
                    472: trunc \
                    473: round \
                    474: sign \
                    475: flock \
                    476: _locking \
1.7       paf       477: fcntl \
1.4       paf       478: lockf \
1.53      paf       479: ftruncate \
1.35      paf       480: getrusage \
1.47      paf       481: gettimeofday \
1.49      paf       482: crypt \
                    483: sigsetjmp siglongjmp
1.1       paf       484: )
1.3       paf       485: 
                    486: dnl We require qsort(3) and select(2).
                    487: 
                    488: AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
                    489: AC_CHECK_FUNCS(select, , AC_MSG_ERROR([No select library function.]))
1.1       paf       490: 
1.46      paf       491: dnl For correct mail receiving we need to know local offset from GMT
                    492: dnl it be timezone+(daylight?60*60*sign(timezone):0)
                    493: dnl or it can be tm.tm_gmtoff
                    494: dnl or it can be tm.tm_tzadj
                    495: 
                    496: AC_MSG_CHECKING(for timezone variable)
                    497: AC_TRY_COMPILE([#include <time.h>],        
                    498: [
                    499: time_t test=timezone;
                    500: ],                                         
                    501: AC_DEFINE(HAVE_TIMEZONE)                  
                    502: AC_MSG_RESULT(yes),                        
                    503: AC_MSG_RESULT(no))                         
                    504: 
                    505: AC_MSG_CHECKING(for daylight variable)
                    506: AC_TRY_COMPILE([#include <time.h>],        
                    507: [
                    508: int test=daylight;
                    509: ],                                         
                    510: AC_DEFINE(HAVE_DAYLIGHT)              
                    511: AC_MSG_RESULT(yes),                        
                    512: AC_MSG_RESULT(no))                         
                    513: 
                    514: AC_MSG_CHECKING(for tm_gmtoff in struct tm)
                    515: AC_TRY_COMPILE([#include <time.h>],        
                    516: [struct tm tm;                             
                    517: tm.tm_gmtoff=0;                            
                    518: ],                                         
                    519: AC_DEFINE(HAVE_TM_GMTOFF)                  
                    520: AC_MSG_RESULT(yes),                        
                    521: AC_MSG_RESULT(no))                         
                    522: 
                    523: AC_MSG_CHECKING(for tm_tzadj in struct tm)
                    524: AC_TRY_COMPILE([#include <time.h>],        
                    525: [struct tm tm;                             
                    526: tm.tm_tzadj=0;                            
                    527: ],                                         
                    528: AC_DEFINE(HAVE_TM_TZADJ)                  
                    529: AC_MSG_RESULT(yes),                        
                    530: AC_MSG_RESULT(no))                         
                    531: 
                    532: 
1.1       paf       533: dnl AC_ARG_ENABLE(db, [  --enable-db             to enable 'hashfile' parser class],
                    534: dnl [
                    535: dnl if test "$enableval" != "no"; then
                    536: dnl AC_CHECK_HEADERS(db.h)
                    537: dnl AC_CHECK_LIB(db, __db_open)
                    538: dnl fi
                    539: dnl ]
                    540: dnl )
1.17      paf       541: 
1.1       paf       542: 
                    543: dnl Apache libs
1.10      paf       544: APACHE_LIBS="$LIBS $LIBADD_DL"
1.9       paf       545: dnl append stdc++ to libs list commented
                    546: dnl 1. because binary seem to work without it
                    547: dnl purpose of this: remove strange name dependance
                    548: dnl for linker creates reference not for libstc++.xx but
                    549: dnl for something specific to local system,
                    550: dnl thus reducing binary compatibility
                    551: dnl 2. for same reason linker of targets/cgi/parser3 changed to
                    552: dnl "C" compiler from "C++" compiler
                    553: dnl AC_CHECK_LIB(stdc++, __builtin_new,
                    554: dnl    APACHE_LIBS="$APACHE_LIBS -lstdc++"
                    555: dnl )
1.1       paf       556: AC_SUBST(APACHE_LIBS)
                    557: 
                    558: 
                    559: dnl install directories
                    560: 
                    561: # expand apostrophed
1.6       paf       562: e_prefix=$prefix
                    563: test "x$e_prefix" = xNONE && e_prefix=$ac_default_prefix
                    564: 
1.1       paf       565: e_sysconfdir=$sysconfdir
1.6       paf       566: test "$e_sysconfdir" = "\${prefix}/etc" && e_sysconfdir="${e_prefix}/etc"
1.1       paf       567: 
                    568: dnl these are used to fill in etc/parser3.conf
                    569: 
                    570: charsetsdir=$e_sysconfdir/parser3.charsets
                    571: AC_SUBST(charsetsdir)
                    572: 
                    573: # expand apostrophed
                    574: e_libdir=$libdir
                    575: if test "$e_libdir" = "\${exec_prefix}/lib"; then
                    576: 
                    577:     # Let make expand exec_prefix.
                    578:     e_exec_prefix=$exec_prefix
1.12      paf       579:     test "x$e_exec_prefix" = xNONE && e_exec_prefix=$e_prefix
1.1       paf       580: 
                    581:     # expand apostrophed
                    582:     test "$e_libdir" = "\${exec_prefix}/lib" && e_libdir="${e_exec_prefix}/lib"
                    583: fi
                    584: 
                    585: sqldriversdir=$e_libdir
                    586: AC_SUBST(sqldriversdir)
                    587: 
                    588: 
1.58      paf       589: dnl Output header and makefiles
                    590: 
                    591: AH_TEMPLATE([HAVE_DLD],[Define if you have the GNU dld library])
                    592: 
                    593: AH_TEMPLATE([HAVE_LIBDL],
                    594:        [Define if you have the libdl library or equivalent.])
                    595: 
                    596: AH_TEMPLATE([HAVE_SHL_LOAD],
                    597:        [Define if you have the shl_load function. ])
                    598: 
                    599: 
                    600: AH_TEMPLATE([size_t],
                    601:        [Define to `unsigned int' if <sys/types.h> does not define.])
                    602: 
                    603: AH_TEMPLATE([ssize_t],
                    604:        [Define to `int' if <sys/types.h> does not define.])
                    605: 
                    606: AH_TEMPLATE([HAVE_DAYLIGHT],
                    607:        [Define if you have daylight external variable in <time.h>])
                    608: 
                    609: AH_TEMPLATE([HAVE_TIMEZONE],
                    610:        [Define if you have timezone external variable in <time.h>])
                    611: 
                    612: AH_TEMPLATE([HAVE_TM_GMTOFF],
                    613:        [Define if you have tm_gmtoff member of tm structure in <time.h>])
                    614: 
                    615: AH_TEMPLATE([HAVE_TM_TZADJ],
                    616:        [Define if you have tm_tzadj member of tm structure in <time.h>])
                    617: 
1.1       paf       618: 
                    619: AM_CONFIG_HEADER(src/include/pa_config_auto.h)
1.51      paf       620: AC_OUTPUT(Makefile src/Makefile src/types/Makefile src/classes/Makefile src/classes/gd/Makefile src/classes/smtp/Makefile src/include/Makefile src/main/Makefile src/sql/Makefile src/lib/Makefile src/lib/ltdl/Makefile src/lib/pcre/Makefile src/lib/md5/Makefile src/lib/patches/Makefile src/targets/Makefile src/targets/cgi/Makefile src/targets/apache13/Makefile src/targets/apache13/hook/Makefile src/targets/apache13/p3runConfigure src/targets/isapi/Makefile etc/Makefile etc/parser3.charsets/Makefile bin/Makefile bin/auto.p.dist)

E-mail: