Annotation of parser3/configure.in, revision 1.39

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