Annotation of libwww/configure.in, revision 1.82

1.1       frystyk     1: dnl Process this file with Autoconf to create configure
                      2: dnl (c) COPYRIGHT MIT 1995.
                      3: dnl Please first read the full copyright statement in the file COPYRIGH.
1.82    ! kahan       4: dnl @(#) $Id: configure.in,v 1.81 1999/06/23 18:05:01 frystyk Exp $
1.1       frystyk     5: 
1.82    ! kahan       6: AC_REVISION([$Id: configure.in,v 1.81 1999/06/23 18:05:01 frystyk Exp $])
1.71      frystyk     7: AC_PREREQ(2.13)
1.1       frystyk     8: AC_INIT(Library)
1.41      frystyk     9: 
1.5       frystyk    10: AC_CONFIG_AUX_DIR(config)
1.1       frystyk    11: 
1.43      frystyk    12: AC_CANONICAL_SYSTEM
                     13: AC_ARG_PROGRAM
                     14: 
1.41      frystyk    15: dnl Initialize Automake.
1.3       frystyk    16: PACKAGE=w3c-libwww
1.1       frystyk    17: AC_SUBST(PACKAGE)
1.28      frystyk    18: AC_DEFINE_UNQUOTED(W3C_PACKAGE, "$PACKAGE")
1.41      frystyk    19:  
1.79      frystyk    20: VERSION=5.2.9
1.1       frystyk    21: AC_SUBST(VERSION)
                     22: AC_DEFINE_UNQUOTED(W3C_VERSION, "$VERSION")
                     23: 
1.51      frystyk    24: #dnl for CVS to be able to make a release diff
1.79      frystyk    25: PREVIOUS_VERSION=5.2.8
1.51      frystyk    26: AC_SUBST(PREVIOUS_VERSION)
                     27: 
1.41      frystyk    28: AM_INIT_AUTOMAKE($PACKAGE, $VERSION) 
1.51      frystyk    29: 
1.53      frystyk    30: AM_CONFIG_HEADER(wwwconf.h)
1.41      frystyk    31: 
                     32: dnl Regular configure...
1.1       frystyk    33: AC_PROG_CC
1.80      frystyk    34: dnl AC_PROG_CXX                Caused problems and is not needed...
1.71      frystyk    35: AC_CYGWIN      dnl   You should probably
                     36: AC_MINGW32     dnl   use all three of these
                     37: AC_EXEEXT      dnl   for maximum portability
1.54      frystyk    38: AM_PROG_LIBTOOL
1.41      frystyk    39: AC_PROG_MAKE_SET
1.54      frystyk    40: AC_PROG_INSTALL
1.41      frystyk    41: 
1.1       frystyk    42: dnl Remove next line and you get an error -- autoconf
                     43: dnl should deal with this automatically.
                     44: AC_ISC_POSIX
                     45: AC_PATH_X
1.7       frystyk    46: dnl AC_PATH_XTRA       Causes problems...
1.1       frystyk    47: 
1.28      frystyk    48: dnl Default location of icons
1.51      frystyk    49: icondir=$datadir/$PACKAGE
1.28      frystyk    50: AC_SUBST(icondir)
                     51: 
1.34      frystyk    52: dnl Location for purify cache
                     53: PURIFY_CACHE=/tmp/purify.cache
                     54: AC_SUBST(PURIFY_CACHE)
                     55: 
1.1       frystyk    56: dnl Various compiler directives
1.28      frystyk    57: AC_MSG_CHECKING(whether to define additional compiler specific flags)
1.5       frystyk    58: case "$target" in
                     59:     alpha-dec*)
                     60:        if test "$CC" = "cc"; then
                     61:          CFLAGS="$CFLAGS -std1"
1.28      frystyk    62:          AC_MSG_RESULT(Digital Unix's cc)
1.14      frystyk    63:        fi
                     64:        ;;
                     65:     hp*)
                     66:        if test "$CC" = "cc"; then
                     67:          CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE"
1.28      frystyk    68:          AC_MSG_RESULT(HT-UX's cc)
1.5       frystyk    69:        fi
1.65      frystyk    70:        ;;
                     71:     i386-next-nextstep*)
                     72:          CFLAGS="$CFLAGS -D_POSIX_SOURCE"
                     73:          AC_MSG_RESULT(NextStep and OpenStep require _POSIX_SOURCE defined. This may cause some compilation warnings about pre-compiled headers but that should be OK)
1.5       frystyk    74:        ;;
1.28      frystyk    75:     *)
                     76:        AC_MSG_RESULT(no)
                     77:        ;;
1.5       frystyk    78: esac
1.1       frystyk    79: 
1.53      frystyk    80: dnl Checks for programs.
                     81: AC_CHECK_PROGS(have_telnet, telnet)
                     82: if test -n "$have_telnet" ; then
                     83:   AC_DEFINE_UNQUOTED(TELNET_PROGRAM, "$have_telnet")
                     84: fi
                     85: AC_CHECK_PROGS(have_rlogin, rlogin)
                     86: if test -n "$have_rlogin" ; then
                     87:   AC_DEFINE_UNQUOTED(RLOGIN_PROGRAM, "$have_rlogin")
                     88: fi
                     89: AC_CHECK_PROGS(have_tn3270, tn3270 x3270)
                     90: if test -n "$have_tn3270" ; then
                     91:   AC_DEFINE_UNQUOTED(TN3270_PROGRAM, "$have_tn3270")
                     92: fi
                     93: AC_PATH_PROG(RM, rm, rm)
                     94: AC_PATH_PROG(AR, ar, ar)
                     95: AC_PATH_PROG(MKDIR, mkdir, mkdir)
                     96: AC_PATH_PROG(CHMOD, chmod, chmod)
                     97: AC_PATH_PROG(CP, cp, cp)
                     98: AC_PATH_PROG(TAR, tar, tar)
                     99: AC_PATH_PROG(CVS, cvs, cvs)
                    100: AC_PATH_PROG(SED, sed, sed)
                    101: AC_PATH_PROGS(COMPRESS, gzip compress, compress)
1.58      frystyk   102: AC_PATH_PROGS(WWW, www, [""])
1.53      frystyk   103: AC_PROG_LN_S
                    104: 
                    105: dnl Checks for misc files
                    106: dnl Resolv.conf
                    107: AC_PATH_PROG(have_resolv_conf, resolv.conf, , /etc, /usr/etc)
                    108: if test -n "$have_resolv_conf" ; then
                    109:   AC_DEFINE_UNQUOTED(RESOLV_CONF, "$have_resolv_conf")
                    110: fi
                    111: 
                    112: dnl This is the standard UNIX value
                    113: AC_DEFINE(CACHE_FILE_PREFIX, "/usr/wsrc/")
                    114: 
                    115: dnl Checks for libraries:
1.81      frystyk   116: dnl AC_CHECK_LIB(ICE, IceConnectionNumber)
1.53      frystyk   117: AC_CHECK_LIB(socket, socket)
                    118: AC_CHECK_LIB(inet, connect)
                    119: AC_CHECK_LIB(nsl, t_accept)
                    120: AC_CHECK_LIB(dl, dlopen)
                    121: 
                    122: dnl Checks for header files:
1.56      frystyk   123: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
                    124: AC_CHECK_HEADERS(arpa/inet.h inet.h)
                    125: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
                    126: AC_CHECK_HEADERS(netinet/in.h in.h)
                    127: AC_CHECK_HEADERS(netinet/tcp.h tcp.h)
1.53      frystyk   128: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
                    129: AC_CHECK_HEADERS(sys/file.h)
                    130: AC_CHECK_HEADERS(sys/ioctl.h)
                    131: AC_CHECK_HEADERS(sys/ipc.h)
                    132: AC_CHECK_HEADERS(sys/limits.h limits.h)
1.56      frystyk   133: AC_CHECK_HEADERS(sys/machine.h)
1.53      frystyk   134: AC_CHECK_HEADERS(sys/resource.h resource.h)
                    135: AC_CHECK_HEADERS(sys/select.h select.h)
                    136: AC_CHECK_HEADERS(sys/socket.h socket.h)
                    137: AC_CHECK_HEADERS(sys/stat.h stat.h)
1.61      frystyk   138: AC_CHECK_HEADERS(sys/syslog syslog.h)
1.53      frystyk   139: AC_CHECK_HEADERS(sys/systeminfo.h)
                    140: AC_CHECK_HEADERS(sys/time.h time.h)
                    141: AC_CHECK_HEADERS(sys/types.h types.h)
                    142: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
1.56      frystyk   143: AC_CHECK_HEADERS(wais/wais.h wais.h)
                    144: AC_CHECK_HEADERS(bsdtime.h)
                    145: AC_CHECK_HEADERS(bsdtypes.h)
                    146: AC_CHECK_HEADERS(ctype.h)
                    147: AC_CHECK_HEADERS(cursesX.h curses.h)
1.53      frystyk   148: AC_CHECK_HEADERS(dn.h)
1.56      frystyk   149: AC_CHECK_HEADERS(dnetdb.h)
1.53      frystyk   150: AC_CHECK_HEADERS(grp.h)
1.56      frystyk   151: AC_CHECK_HEADERS(libc.h)
                    152: AC_CHECK_HEADERS(malloc.h)
                    153: AC_CHECK_HEADERS(manifest.h)
                    154: AC_CHECK_HEADERS(memory.h)
1.53      frystyk   155: AC_CHECK_HEADERS(netdb.h)
1.56      frystyk   156: AC_CHECK_HEADERS(pwd.h)
                    157: AC_CHECK_HEADERS(rxposix.h regex.h)
1.53      frystyk   158: AC_CHECK_HEADERS(stdefs.h)
1.56      frystyk   159: AC_CHECK_HEADERS(stdio.h)
1.53      frystyk   160: AC_CHECK_HEADERS(stdlib.h)
1.56      frystyk   161: AC_CHECK_HEADERS(string.h strings.h)
                    162: AC_CHECK_HEADERS(termios.h)
1.53      frystyk   163: AC_CHECK_HEADERS(unixlib.h)
                    164: AC_HEADER_DIRENT
                    165: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
                    166: AC_HEADER_STDC
                    167: AC_HEADER_SYS_WAIT
                    168: AC_HEADER_TIME
                    169: AC_HEADER_STAT
                    170: 
                    171: dnl Checks for typedefs, structures, and compiler characteristics:
                    172: AC_TYPE_UID_T
                    173: AC_TYPE_PID_T
                    174: AC_TYPE_GETGROUPS
                    175: AC_TYPE_MODE_T
                    176: AC_TYPE_SIZE_T
                    177: AC_TYPE_SIGNAL
                    178: 
                    179: AC_CHECK_TYPE(BOOLEAN, char)
                    180: AC_CHECK_TYPE(u_char, unsigned char)
                    181: AC_CHECK_TYPE(u_short, unsigned short)
                    182: AC_CHECK_TYPE(u_long, unsigned long)
                    183: 
                    184: AC_CHECK_SIZEOF(char)
                    185: AC_CHECK_SIZEOF(char *)
                    186: AC_CHECK_SIZEOF(int)
                    187: AC_CHECK_SIZEOF(long)
                    188: AC_CHECK_SIZEOF_TIME_T
                    189: AC_CHECK_SIZEOF_SIZE_T
                    190: 
                    191: AC_C_CONST
                    192: AC_C_BIGENDIAN
                    193: AC_C_CHAR_UNSIGNED
                    194: AC_C_LONG_DOUBLE 
                    195: 
                    196: AC_STRUCT_TM
                    197: AC_STRUCT_GMTOFF
                    198: AC_STRUCT_TIMEZONE
                    199: AC_STRUCT_WINSIZE
                    200: 
                    201: dnl Checks for library functions:
                    202: AC_FUNC_VPRINTF
                    203: AC_FUNC_STRFTIME
                    204: AC_CHECK_FUNCS(getcwd gethostname getdomainname getwd  \
                    205:                select socket strerror strtol opendir getpid strchr memcpy \
                    206:                getlogin getpass fcntl readdir sysinfo ioctl chdir tempnam \
                    207:                getsockopt setsockopt \
1.70      frystyk   208:                gettimeofday mktime timegm tzset)
1.53      frystyk   209: AC_CHECK_FUNC(unlink, , AC_CHECK_FUNC(remove, AC_DEFINE(unlink, remove)))
                    210: 
1.31      frystyk   211: dnl Checks for configuration arguments
1.50      frystyk   212: AC_MSG_CHECKING(whether to support direct WAIS access.)
1.31      frystyk   213: AC_ARG_WITH(wais,
                    214: [  --with-wais[=PATH]      Compile with support for direct WAIS access.],
                    215: [ case "$withval" in
                    216:   no)
                    217:     AC_MSG_RESULT(no)
                    218:     HTWAIS=""
1.76      frystyk   219:     WWWWAIS=""
                    220:     LWWWWAIS=""
                    221:     LIBWWWWAIS=""
1.31      frystyk   222:     ;;
                    223:   *)
                    224:     AC_MSG_RESULT(yes)
                    225:     if test "x$withval" = "xyes"; then
1.50      frystyk   226:       withval="/usr/local/lib/wais/wais.a /usr/local/lib/wais/client.a"
1.31      frystyk   227:     fi
1.50      frystyk   228:     LIBS="$withval -lm $LIBS"
1.52      frystyk   229:     AC_DEFINE(HT_DIRECT_WAIS)
1.31      frystyk   230:     AC_TRY_LINK([],
1.50      frystyk   231:                 [ makeDocID(); ],
1.31      frystyk   232:                [],
1.50      frystyk   233:                [ AC_MSG_ERROR(Could not find one or more of the $withval libraries.  You must first install WAIS.) ])
1.54      frystyk   234:     HTWAIS="HTWAIS.lo"
1.76      frystyk   235:     WWWWAIS="libwwwwais.la"
                    236:     LWWWWAIS="-lwwwwais.la"
                    237:     LIBWWWWAIS='${top_builddir}/Library/src/libwwwwais.la'
1.31      frystyk   238:     ;;
                    239:   esac ],
                    240:   AC_MSG_RESULT(no)
1.18      frystyk   241:   HTWAIS=""
1.76      frystyk   242:   WWWWAIS=""
                    243:   LWWWWAIS=""
                    244:   LIBWWWWAIS=""
1.31      frystyk   245: )
1.1       frystyk   246: AC_SUBST(HTWAIS)
1.76      frystyk   247: AC_SUBST(WWWWAIS)
                    248: AC_SUBST(LWWWWAIS)
                    249: AC_SUBST(LIBWWWWAIS)
1.1       frystyk   250: 
1.31      frystyk   251: AC_MSG_CHECKING(whether to support zlib compress/decompress)
                    252: AC_ARG_WITH(zlib,
                    253: [  --with-zlib[=PATH]      Compile with zlib compress/decompress support.],
                    254: [ case "$withval" in
                    255:   no)
                    256:     AC_MSG_RESULT(no)
1.33      eric      257:     HTZLIB=""
1.76      frystyk   258:     WWWZIP=""
                    259:     LWWWZIP=""
                    260:     LIBWWWZIP=""
1.31      frystyk   261:     ;;
                    262:   *)
                    263:     AC_MSG_RESULT(yes)
                    264:     if test "x$withval" = "xyes"; then
                    265:       withval="-lz"
1.57      frystyk   266:       LIBS="$LIBS $withval"
                    267:     else
                    268:       AC_ADDLIB($withval)
1.31      frystyk   269:     fi
1.35      frystyk   270:     AC_DEFINE(HT_ZLIB)
1.31      frystyk   271:     AC_TRY_LINK([],
                    272:                 [ zlibVersion(); ],
                    273:                [],
                    274:                [ AC_MSG_ERROR(Could not find the $withval library.  You must first install zlib.) ])
1.54      frystyk   275:     HTZLIB="HTZip.lo"
1.76      frystyk   276:     WWWZIP="libwwwzip.la"
                    277:     LWWWZIP="-lwwwzip"
                    278:     LIBWWWZIP='${top_builddir}/Library/src/libwwwzip.la'
1.31      frystyk   279:     ;;
                    280:   esac ],
                    281:   AC_MSG_RESULT(no)
1.33      eric      282:   HTZLIB=""
1.76      frystyk   283:   WWWZIP=""
                    284:   LWWWZIP=""
                    285:   LIBWWWZIP=""
1.31      frystyk   286: )
1.33      eric      287: AC_SUBST(HTZLIB)
1.76      frystyk   288: AC_SUBST(WWWZIP)
                    289: AC_SUBST(LWWWZIP)
                    290: AC_SUBST(LIBWWWZIP)
1.43      frystyk   291: 
                    292: AC_MSG_CHECKING(whether to support POSIX regex)
                    293: AC_ARG_WITH(regex,
                    294: [  --with-regex[=PATH]     Compile with POSIC regex library support.],
                    295: [ case "$withval" in
                    296:   no)
                    297:     AC_MSG_RESULT(no)
                    298:     ;;
                    299:   *)
                    300:     AC_MSG_RESULT(yes)
1.46      frystyk   301:     AC_DEFINE(HT_POSIX_REGEX)
1.43      frystyk   302:     if test "x$withval" = "xyes"; then
1.57      frystyk   303:       AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] )
1.46      frystyk   304:     else
1.57      frystyk   305:       AC_ADDLIB($withval)
                    306:       AC_TRY_LINK([],
                    307:                  [ regexec(); ],
                    308:                  [],
                    309:                  [ AC_MSG_ERROR(Could not find the $withval library.  You must first install regex.) ] )
1.43      frystyk   310:     fi
                    311:     ;;
                    312:   esac ],
                    313:   AC_MSG_RESULT(no)
                    314: )
1.31      frystyk   315: 
1.26      frystyk   316: # borrowed from SSH - thanks!
                    317: AC_MSG_CHECKING(whether to support SOCKS)
                    318: AC_ARG_WITH(socks,
                    319: [  --with-socks            Compile with SOCKS firewall traversal support.],
                    320: [ case "$withval" in
                    321:   no)
                    322:     AC_MSG_RESULT(no)
                    323:     ;;
                    324:   yes)
                    325:     AC_MSG_RESULT(yes)
                    326:     AC_CHECK_LIB(socks5, SOCKSconnect, [
                    327:            socks=5
                    328:            LIBS="-lsocks5 $LIBS"], [
                    329:        AC_CHECK_LIB(socks, Rconnect, [
                    330:            socks=4
                    331:            LIBS="-lsocks $LIBS"], [
                    332:                AC_MSG_ERROR(Could not find socks library.  You must first install socks.) ] ) ] )
                    333:     ;;
                    334:   esac ],
                    335:   AC_MSG_RESULT(no)
1.1       frystyk   336: )
                    337: 
1.26      frystyk   338: if test "x$socks" = "x"; then
                    339:        AC_MSG_CHECKING(whether to support SOCKS5)
                    340:        AC_ARG_WITH(socks5,
                    341:        [  --with-socks5[=PATH]    Compile with SOCKS5 firewall traversal support.],
                    342:        [ case "$withval" in
                    343:          no)
                    344:            AC_MSG_RESULT(no)
                    345:            ;;
                    346:          *)
                    347:            AC_MSG_RESULT(yes)
                    348:            socks=5
                    349:            if test "x$withval" = "xyes"; then
                    350:              withval="-lsocks5"
1.57      frystyk   351:              LIBS="$withval $LIBS"
                    352:            else
                    353:              AC_ADDLIB($withval)
1.26      frystyk   354:            fi
                    355:            AC_TRY_LINK([],
                    356:                        [ SOCKSconnect(); ],
                    357:                        [],
                    358:                        [ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks5.) ])
                    359:            ;;
                    360:          esac ],
                    361:          AC_MSG_RESULT(no)
                    362:        )
                    363: fi
                    364: 
                    365: if test "x$socks" = "x"; then
                    366:        AC_MSG_CHECKING(whether to support SOCKS4)
                    367:        AC_ARG_WITH(socks4,
                    368:        [  --with-socks4[=PATH]    Compile with SOCKS4 firewall traversal support.],
                    369:        [ case "$withval" in
                    370:          no)
                    371:            AC_MSG_RESULT(no)
                    372:            ;;
                    373:          *)
                    374:            AC_MSG_RESULT(yes)
                    375:            socks=4
                    376:            if test "x$withval" = "xyes"; then
                    377:              withval="-lsocks"
1.57      frystyk   378:              LIBS="$withval $LIBS"
                    379:             else
                    380:              AC_ADDLIB($withval)
1.26      frystyk   381:            fi
                    382:            AC_TRY_LINK([],
                    383:                        [ Rconnect(); ],
                    384:                        [],
                    385:                        [ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks.) ])
                    386:            ;;
                    387:          esac ],
                    388:          AC_MSG_RESULT(no)
                    389:        )
                    390: fi
                    391: 
                    392: if test "x$socks" = "x4"; then
                    393:     AC_DEFINE(SOCKS)
                    394:     AC_DEFINE(SOCKS4)
                    395: fi
                    396: 
                    397: if test "x$socks" = "x5"; then
                    398:     AC_DEFINE(SOCKS)
                    399:     AC_DEFINE(SOCKS5)
                    400: fi
1.54      frystyk   401: 
                    402: AC_MSG_CHECKING(whether to support mysql access.)
                    403: AC_ARG_WITH(mysql,
                    404: [  --with-mysql[=PATH]      Compile with support for mysql access.],
                    405: [ case "$withval" in
                    406:   no)
                    407:     AC_MSG_RESULT(no)
                    408:     HTSQL=""
                    409:     HTSQLLOG=""
1.76      frystyk   410:     WWWSQL=""
                    411:     LWWWSQL=""
                    412:     LIBWWWSQL=""
1.60      frystyk   413:     CVS2SQL=""
1.54      frystyk   414:     ;;
                    415:   *)
                    416:     AC_MSG_RESULT(yes)
                    417:     if test "x$withval" = "xyes"; then
1.76      frystyk   418:       if test -f '/usr/local/lib/mysql/libmysqlclient.a'; then
                    419:          AC_ADDLIB("/usr/local/lib/mysql/libmysqlclient.a")
                    420:       elif test -f '/usr/lib/mysql/libmysqlclient.a'; then
                    421:          AC_ADDLIB("/usr/lib/mysql/libmysqlclient.a")
                    422:       else
                    423:          AC_MSG_ERROR(Could not find the mysql client library.)
                    424:       fi
1.57      frystyk   425:     else
                    426:       AC_ADDLIB($withval)
1.54      frystyk   427:     fi
                    428:     AC_DEFINE(HT_MYSQL)
                    429:     HTSQL="HTSQL.lo"
                    430:     HTSQLLOG="HTSQLLog.lo"
1.76      frystyk   431:     WWWSQL="libwwwsql.la"
                    432:     LWWWSQL="-lwwwsql"
                    433:     LIBWWWSQL='${top_builddir}/Library/src/libwwwsql.la'
1.60      frystyk   434:     CVS2SQL="cvs2sql"
1.54      frystyk   435:     ;;
                    436:   esac ],
                    437:   AC_MSG_RESULT(no)
                    438:   HTSQL=""
                    439:   HTSQLLOG=""
1.76      frystyk   440:   WWWSQL=""
                    441:   LWWWSQL=""
                    442:   LIBWWWSQL=""
1.60      frystyk   443:   CVS2SQL=""
1.54      frystyk   444: )
                    445: AC_SUBST(HTSQL)
                    446: AC_SUBST(HTSQLLOG)
1.76      frystyk   447: AC_SUBST(WWWSQL)
                    448: AC_SUBST(LWWWSQL)
                    449: AC_SUBST(LIBWWWSQL)
1.60      frystyk   450: AC_SUBST(CVS2SQL)
1.68      frystyk   451: 
                    452: AC_MSG_CHECKING(whether we include the Expat XML parser.)
                    453: AC_ARG_WITH(expat,
1.76      frystyk   454: [  --with-expat[=PATH]      Compile with support for expat.],
1.68      frystyk   455: [ case "$withval" in
                    456:   no)
                    457:     AC_MSG_RESULT(no)
                    458:     HTXML=""
1.77      frystyk   459:     HTLIBXML=""
1.76      frystyk   460:     XMLTOK=""
                    461:     XMLPARSE=""
                    462:     WWWXML=""
                    463:     LWWWXML=""
                    464:     LIBWWWXML=""
                    465:     SHOWXML=""
1.68      frystyk   466:     ;;
                    467:   *)
1.70      frystyk   468:     AC_MSG_RESULT(yes)
                    469:     AC_DEFINE(HT_EXPAT)
1.68      frystyk   470:     HTXML="HTXML.lo"
1.77      frystyk   471:     HTLIBXML='${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.76      frystyk   472:     XMLTOK="libxmltok.la"
                    473:     XMLPARSE="libxmlparse.la"
                    474:     WWWXML="libwwwxml.la"
                    475:     LWWWXML="-lwwwxml -lxmltok -lxmlparse"
                    476:     LIBWWWXML='${top_builddir}/Library/src/libwwwxml.la ${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.79      frystyk   477:     SHOWXML="showxml ptri stri"
1.68      frystyk   478:     ;;
                    479:   esac ],
1.72      frystyk   480:   AC_MSG_RESULT(yes)
                    481:   AC_DEFINE(HT_EXPAT)
                    482:   HTXML="HTXML.lo"
1.77      frystyk   483:   HTLIBXML='${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.76      frystyk   484:   XMLTOK="libxmltok.la"
                    485:   XMLPARSE="libxmlparse.la"
                    486:   WWWXML="libwwwxml.la"
                    487:   LWWWXML="-lwwwxml -lxmltok -lxmlparse"
                    488:   LIBWWWXML='${top_builddir}/Library/src/libwwwxml.la ${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.79      frystyk   489:   SHOWXML="showxml ptri stri"
1.68      frystyk   490: )
1.77      frystyk   491: AC_SUBST(HTXML)                # for old style big library
                    492: AC_SUBST(HTLIBXML)     # for old style big library
1.76      frystyk   493: AC_SUBST(XMLTOK)
                    494: AC_SUBST(XMLPARSE)
                    495: AC_SUBST(WWWXML)
                    496: AC_SUBST(LWWWXML)
                    497: AC_SUBST(LIBWWWXML)
                    498: AC_SUBST(SHOWXML)
                    499: 
                    500: AC_MSG_CHECKING(whether we include MD5 support for HTTP Digest Authentication.)
                    501: AC_ARG_WITH(md5,
                    502: [  --with-md5[=PATH]      Compile with support for md5.],
                    503: [ case "$withval" in
                    504:   no)
                    505:     AC_MSG_RESULT(no)
                    506:     WWWMD5=""
                    507:     LWWWMD5=""
                    508:     LIBWWWMD5=""
                    509:     ;;
                    510:   *)
                    511:     AC_MSG_RESULT(yes)
                    512:     AC_DEFINE(HT_MD5)
                    513:     WWWMD5="libmd5.la"
                    514:     LWWWMD5="-lmd5"
                    515:     LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
                    516:     ;;
                    517:   esac ],
                    518:   AC_MSG_RESULT(yes)
                    519:   AC_DEFINE(HT_MD5)
                    520:   WWWMD5="libmd5.la"
                    521:   LWWWMD5="-lmd5"
                    522:   LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
                    523: )
                    524: AC_SUBST(WWWMD5)
                    525: AC_SUBST(LWWWMD5)
                    526: AC_SUBST(LIBWWWMD5)
1.26      frystyk   527: 
1.28      frystyk   528: AC_MSG_CHECKING(whether to use internal signal handlers)
                    529: AC_ARG_ENABLE(signals, [  --enable-signals        use internal libwww signal handler.],
                    530: [ case "${enableval}" in
                    531:   no)
                    532:     AC_MSG_RESULT(no)
                    533:     ;;
                    534:   *)
                    535:     AC_MSG_RESULT(yes)
                    536:     AC_DEFINE(WWWLIB_SIG)
                    537:     ;;
                    538:   esac ],
                    539:   AC_MSG_RESULT(no)
                    540: )
1.26      frystyk   541: 
1.28      frystyk   542: AC_MSG_CHECKING(whether to disable Nagle's algorithm)
                    543: AC_ARG_ENABLE(nagle,
1.30      frystyk   544: [  --disable-nagle         Turning off Nagle's algorithm.],
1.28      frystyk   545: [ case "${enableval}" in
                    546:   no)
                    547:     AC_MSG_RESULT(yes)
                    548:     AC_DEFINE(HT_NO_NAGLE)
                    549:     ;;
                    550:   *) 
                    551:     AC_MSG_RESULT(no)
                    552:     ;;
                    553:   esac ],
1.29      frystyk   554:   AC_MSG_RESULT(yes)
                    555:   AC_DEFINE(HT_NO_NAGLE)
1.28      frystyk   556: )
                    557: 
1.40      frystyk   558: AC_MSG_CHECKING(whether to accept new rule files without asking an end user.)
                    559: AC_ARG_ENABLE(autorules,
                    560: [  --enable-autorules      Enabling acceptance of rule files without user interaction.],
                    561: [ case "${enableval}" in
                    562:   yes)
                    563:     AC_MSG_RESULT(yes)
                    564:     AC_DEFINE(HT_AUTOMATIC_RULES)
                    565:     ;;
                    566:   *) 
                    567:     AC_MSG_RESULT(no)
                    568:     ;;
                    569:   esac ],
                    570:   AC_MSG_RESULT(no)
                    571: )
                    572: 
1.30      frystyk   573: AC_MSG_CHECKING(whether to disable HTTP/1.1 pipelining)
                    574: AC_ARG_ENABLE(pipelining,
                    575: [  --disable-pipelining    Turning off HTTP/1.1 Pipelining.],
                    576: [ case "${enableval}" in
                    577:   no)
                    578:     AC_MSG_RESULT(yes)
                    579:     AC_DEFINE(HT_NO_PIPELINING)
1.41      frystyk   580:     ;;
                    581:   *) 
                    582:     AC_MSG_RESULT(no)
                    583:     ;;
                    584:   esac ],
                    585:   AC_MSG_RESULT(no)
                    586: )
                    587: 
                    588: 
                    589: AC_MSG_CHECKING(whether to use MUX as transport for HTTP.)
                    590: AC_ARG_ENABLE(mux,
                    591: [  --enable-mux            Enabling MUX as transport for HTTP.],
                    592: [ case "${enableval}" in
                    593:   yes)
                    594:     AC_MSG_RESULT(yes)
                    595:     AC_DEFINE(HT_MUX)
1.30      frystyk   596:     ;;
                    597:   *) 
                    598:     AC_MSG_RESULT(no)
                    599:     ;;
                    600:   esac ],
                    601:   AC_MSG_RESULT(no)
                    602: )
                    603: 
1.28      frystyk   604: AC_MSG_CHECKING(whether to define _REENTRANT)
1.26      frystyk   605: AC_ARG_ENABLE(reentrant, [  --enable-reentrant      define _REENTRANT to enable reentrant system calls],
1.28      frystyk   606: [ case "${enableval}" in
                    607:   no)
                    608:     AC_MSG_RESULT(no)
1.82    ! kahan     609:     ac_cv_reentrant=no
1.28      frystyk   610:     ;;
                    611:   *) 
                    612:     AC_MSG_RESULT(yes)
                    613:     AC_DEFINE(HT_REENTRANT) [CFLAGS="$CFLAGS -D_REENTRANT"]
1.82    ! kahan     614:     ac_cv_reentrant=yes
1.28      frystyk   615:     ;;
                    616:   esac ],
                    617:   AC_MSG_RESULT(no)
                    618: )
1.82    ! kahan     619: 
        !           620: if test "$ac_cv_reentrant" = "yes"; then
        !           621: 
        !           622:     AC_MSG_CHECKING(for ctime_r)
        !           623:     if test -z "$ac_cv_ctime_args"; then
        !           624:         AC_TRY_COMPILE(
        !           625:         [#include <time.h>],
        !           626:         [
        !           627:             time_t clock;
        !           628:             char buf[26];
        !           629:             ctime_r(&clock, buf);
        !           630:         ], ac_cv_ctime_args=2)
        !           631:     fi
        !           632:     if test -z "$ac_cv_ctime_args" ; then
        !           633:         AC_TRY_COMPILE(
        !           634:         [#include <time.h>],
        !           635:         [
        !           636:             time_t clock;
        !           637:             char buf[26];
        !           638:             ctime_r(&clock, buf, 26);
        !           639:         ], ac_cv_ctime_args=3)
        !           640:     fi
        !           641:     if test -z "$ac_cv_ctime_args"; then
        !           642:         AC_MSG_RESULT(no)
        !           643:         have_missing_r_funcs="$have_missing_r_funcs ctime_r"
        !           644:     else
        !           645:         if test "$ac_cv_ctime_args" = 2; then
        !           646:             AC_DEFINE(HAVE_CTIME_R_2)
        !           647:         elif test "$ac_cv_ctime_args" = 3; then
        !           648:             AC_DEFINE(HAVE_CTIME_R_3)
        !           649:         fi
        !           650:         AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
        !           651:     fi
        !           652: 
        !           653:     AC_MSG_CHECKING(for readdir_r)
        !           654:     if test -z "$ac_cv_readdir_args"; then
        !           655:         AC_TRY_COMPILE(
        !           656:        [
        !           657: #include <sys/types.h>
        !           658: 
        !           659: #if defined(HAVE_DIRENT_H)
        !           660: #   include <dirent.h>
        !           661: #   define NAMLEN(dirent) strlen((dirent)->d_name)
        !           662: #else
        !           663: #   define dirent direct
        !           664: #   define NAMLEN(dirent) (dirent)->d_namlen
        !           665: #   if defined(HAVE_SYS_NDIR_H)
        !           666: #       include <sys/ndir.h>
        !           667: #   endif
        !           668: #   if defined(HAVE_SYS_DIR_H)
        !           669: #       include <sys/dir.h>
        !           670: #   endif
        !           671: #   if defined(HAVE_NDIR_H)
        !           672: #       include <ndir.h>
        !           673: #   endif
        !           674: #endif  ],
        !           675:         [
        !           676:         struct dirent dir, *dirp;
        !           677:         DIR *mydir;
        !           678:         dirp = readdir_r(mydir, &dir);
        !           679:        ], ac_cv_readdir_args=2)
        !           680:     fi
        !           681:     if test -z "$ac_cv_readdir_args"; then
        !           682:        
        !           683:         AC_TRY_COMPILE(
        !           684:         [
        !           685: #include <sys/types.h>
        !           686: #if defined(HAVE_DIRENT_H)
        !           687: #   include <dirent.h>
        !           688: #   define NAMLEN(dirent) strlen((dirent)->d_name)
        !           689: #else
        !           690: #   define dirent direct
        !           691: #   define NAMLEN(dirent) (dirent)->d_namlen
        !           692: #   if defined(HAVE_SYS_NDIR_H)
        !           693: #       include <sys/ndir.h>
        !           694: #   endif
        !           695: #   if defined(HAVE_SYS_DIR_H)
        !           696: #       include <sys/dir.h>
        !           697: #   endif
        !           698: #   if defined(HAVE_NDIR_H)
        !           699: #       include <ndir.h>
        !           700: #   endif
        !           701: #endif  ],
        !           702:         [
        !           703:         struct dirent dir, *dirp;
        !           704:         DIR *mydir;
        !           705:         int rc;
        !           706:         rc = readdir_r(mydir, &dir, &dirp);
        !           707:         ], ac_cv_readdir_args=3)
        !           708:     fi
        !           709: 
        !           710:     if test -z "$ac_cv_readdir_args"; then
        !           711:         AC_MSG_RESULT(no)
        !           712:         have_missing_r_funcs="$have_missing_r_funcs readdir_r"
        !           713:     else
        !           714:         if test "$ac_cv_readdir_args" = 2; then
        !           715:             AC_DEFINE(HAVE_READDIR_R_2)
        !           716:         elif test "$ac_cv_readdir_args" = 3; then
        !           717:             AC_DEFINE(HAVE_READDIR_R_3)
        !           718:         fi
        !           719:         AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
        !           720:     fi
        !           721: 
        !           722:     AC_MSG_CHECKING(for gethostbyname_r)
        !           723:     if test -z "$ac_cv_gethostbyname_args"; then
        !           724:         AC_TRY_COMPILE(
        !           725:            [
        !           726: #include <sys/types.h>
        !           727: #include <netdb.h>],
        !           728:            [
        !           729: struct hostent *hp;
        !           730: struct hostent h;
        !           731: char *name;
        !           732: char buffer[10];
        !           733: int  h_errno;
        !           734: hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);],
        !           735:             ac_cv_gethostbyname_args=5)
        !           736:     fi
        !           737:     if test -z "$ac_cv_gethostbyname_args"; then
        !           738:         AC_TRY_COMPILE(
        !           739:            [
        !           740: #include <sys/types.h>
        !           741: #include <netdb.h>],
        !           742:            [
        !           743: struct hostent h;
        !           744: struct hostent_data hdata;
        !           745: char *name;
        !           746: int  rc;
        !           747: rc = gethostbyname_r(name, &h, &hdata);],
        !           748:             ac_cv_gethostbyname_args=3)
        !           749:     fi
        !           750:     if test -z "$ac_cv_gethostbyname_args"; then
        !           751:         AC_TRY_COMPILE(
        !           752:            [
        !           753: #include <sys/types.h>
        !           754: #include <netdb.h>],
        !           755:            [
        !           756: struct hostent h;
        !           757: struct hostent *hp;
        !           758: char *name;
        !           759: char buf[10];
        !           760: int rc;
        !           761: int h_errno;
        !           762: 
        !           763: rc = gethostbyname_r(name, &h, buf, 10, &hp, &h_errno);
        !           764:            ],
        !           765:            ac_cv_gethostbyname_args=6)
        !           766:     fi
        !           767:     if test -z "$ac_cv_gethostbyname_args"; then
        !           768:         AC_MSG_RESULT(no)
        !           769:         have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"
        !           770:     else
        !           771:         if test "$ac_cv_gethostbyname_args" = 3; then
        !           772:             AC_DEFINE(HAVE_GETHOSTBYNAME_R_3)
        !           773:         elif test "$ac_cv_gethostbyname_args" = 5; then
        !           774:             AC_DEFINE(HAVE_GETHOSTBYNAME_R_5)
        !           775:         elif test "$ac_cv_gethostbyname_args" = 6; then
        !           776:             AC_DEFINE(HAVE_GETHOSTBYNAME_R_6)
        !           777:         fi
        !           778:         AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments])
        !           779:     fi
        !           780: 
        !           781:     AC_MSG_CHECKING(for gethostbyaddr_r)
        !           782:     if test -z "$ac_cv_gethostbyaddr_args"; then
        !           783:        AC_TRY_COMPILE(
        !           784:            [
        !           785: #include <sys/types.h>
        !           786: #include <netdb.h>],
        !           787:            [
        !           788:                 char * address;
        !           789:                 int length;
        !           790:                 int type;
        !           791:                 struct hostent h;
        !           792:                 struct hostent_data hdata;
        !           793:                 int rc;
        !           794:                 rc = gethostbyaddr_r(address, length, type, &h, &hdata);
        !           795:            ],
        !           796:            ac_cv_gethostbyaddr_args=5)
        !           797:        
        !           798:     fi
        !           799:     if test -z "$ac_cv_gethostbyaddr_args"; then
        !           800:        AC_TRY_COMPILE(
        !           801:            [
        !           802: #include <sys/types.h>
        !           803: #include <netdb.h>],
        !           804:            [
        !           805:                 char * address;
        !           806:                 int length;
        !           807:                 int type;
        !           808:                 struct hostent h;
        !           809:                char buffer[10];
        !           810:                int buflen;
        !           811:                int h_errnop;
        !           812:                struct hostent * hp;
        !           813: 
        !           814:                hp = gethostbyaddr_r(address, length, type, &h,
        !           815:                                     buffer, buflen, &h_errnop);
        !           816:            ],
        !           817:            ac_cv_gethostbyaddr_args=7)
        !           818:     fi
        !           819: 
        !           820:     if test -z "$ac_cv_gethostbyaddr_args"; then
        !           821:        AC_TRY_COMPILE(
        !           822:            [
        !           823: #include <sys/types.h>
        !           824: #include <netdb.h>],
        !           825:            [
        !           826:                 char * address;
        !           827:                 int length;
        !           828:                 int type;
        !           829:                 struct hostent h;
        !           830:                char buffer[10];
        !           831:                int buflen;
        !           832:                int h_errnop;
        !           833:                struct hostent * hp;
        !           834:                int rc;
        !           835: 
        !           836:                rc = gethostbyaddr_r(address, length, type, &h,
        !           837:                                     buffer, buflen, &hp, &h_errnop);
        !           838:            ],
        !           839:            ac_cv_gethostbyaddr_args=8)
        !           840:     fi
        !           841:     if test -z "$ac_cv_gethostbyaddr_args"; then
        !           842:         AC_MSG_RESULT(no)
        !           843:         have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"
        !           844:     else
        !           845:         if test "$ac_cv_gethostbyaddr_args" = 5; then
        !           846:             AC_DEFINE(HAVE_GETHOSTBYADDR_R_5)
        !           847:         elif test "$ac_cv_gethostbyaddr_args" = 7; then
        !           848:             AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
        !           849:         elif test "$ac_cv_gethostbyaddr_args" = 8; then
        !           850:             AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
        !           851:         fi
        !           852:         AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyaddr_args arguments])
        !           853:     fi
        !           854: 
        !           855:     AC_MSG_CHECKING(for getlogin_r)
        !           856:     if test -z "$ac_cv_getlogin_r_style"; then
        !           857:        AC_TRY_RUN(
        !           858:            [
        !           859: #include <unistd.h>
        !           860: 
        !           861: int main()
        !           862: {
        !           863:     char name[1024];
        !           864:     int len=1024;
        !           865:     int rc;
        !           866:     char *login;
        !           867: 
        !           868:     name[0]='\0';
        !           869: 
        !           870:     rc = getlogin_r(name, len);
        !           871:     if(rc == 0 && name[0] != '\0')
        !           872:     {
        !           873:        return 0; /* returns zero on success */
        !           874:     }
        !           875:     else if(rc != 0 && name[0] == '\0')
        !           876:     {
        !           877:        return 0; /* returns errno on failure */
        !           878:     }
        !           879:     else if(rc == 0 && name[0] == '\0')
        !           880:     {
        !           881:        return 0; /* can't tell */
        !           882:     }
        !           883:     else if(rc != 0 && name[0] != '\0')
        !           884:     {
        !           885:        return 1; /* returns pointer on success */
        !           886:     }
        !           887: }
        !           888:            ],
        !           889:            [
        !           890:                ac_cv_getlogin_r_style=1
        !           891:            ],
        !           892:            [
        !           893:                ac_cv_getlogin_r_style=2
        !           894:            ])
        !           895:     fi
        !           896:     if test -z "$ac_cv_getlogin_r_style"; then
        !           897:        AC_MSG_RESULT(no)
        !           898:         have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
        !           899:     else
        !           900:        if test $ac_cv_getlogin_r_style = 1; then
        !           901:            AC_DEFINE(GETLOGIN_R_RETURNS_INT)
        !           902:            AC_MSG_RESULT([yes, and it returns an int])
        !           903:        elif test $ac_cv_getlogin_r_style = 2; then
        !           904:            AC_DEFINE(GETLOGIN_R_RETURNS_POINTER)
        !           905:            AC_MSG_RESULT([yes, and it returns a pointer])
        !           906:        else
        !           907:            AC_MSG_RESULT(no: result is $ac_cv_getlogin_r_style)
        !           908:             have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
        !           909:        fi
        !           910:     fi
        !           911:     if test -n "$have_missing_r_funcs"; then
        !           912:         AC_MSG_WARN(missing reentrant functions: $have_missing_r_funcs)
        !           913:     fi
        !           914: fi
1.1       frystyk   915: 
1.28      frystyk   916: AC_MSG_CHECKING(whether to define _POSIX_SOURCE)
1.4       frystyk   917: AC_ARG_ENABLE(posix, [  --enable-posix          define _POSIX_SOURCE],
1.28      frystyk   918: [ case "${enableval}" in
                    919:   no)
                    920:     AC_MSG_RESULT(no)
                    921:     ;;
                    922:   *) 
                    923:     AC_MSG_RESULT(yes)
                    924:     AC_DEFINE(_POSIX_SOURCE) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
                    925:     ;;
                    926:   esac ],
                    927:   AC_MSG_RESULT(no)
                    928: )
1.4       frystyk   929: 
1.26      frystyk   930: AC_ARG_ENABLE(cyrillic, [  --enable-cyrillic       include support for Cyrillic in line mode browser],
                    931:   AC_DEFINE(CYRILLIC)
                    932:   A_STDIO="a_stdio.o", A_STDIO="")
                    933: AC_SUBST(A_STDIO)
1.1       frystyk   934: 
                    935: dnl Create output files
1.78      frystyk   936: AC_OUTPUT([Makefile libwww-config w3c-libwww.spec
1.11      frystyk   937: config/Makefile
1.72      frystyk   938: modules/Makefile
                    939: modules/expat/Makefile modules/expat/xmltok/Makefile modules/expat/xmlparse/Makefile
                    940: modules/md5/Makefile
1.3       frystyk   941: Library/Makefile Library/User/Makefile Library/User/Patch/Makefile
                    942: Library/User/Architecture/Makefile Library/User/Using/Makefile Library/User/Guide/Makefile
1.12      frystyk   943: Library/User/Style/Makefile Library/User/Platform/Makefile
1.17      neon      944: Library/Test/Makefile Library/Test/User/Makefile Library/Test/src/Makefile
1.3       frystyk   945: Library/src/Makefile Library/src/windows/Makefile Library/src/vms/Makefile
1.11      frystyk   946: Library/Examples/Makefile
1.60      frystyk   947: Library/cvs2sql/Makefile
1.37      frystyk   948: Library/External/Makefile
1.9       frystyk   949: PICS-client/Makefile PICS-client/User/Makefile PICS-client/src/Makefile PICS-client/src/windows/Makefile
1.3       frystyk   950: LineMode/Makefile LineMode/User/Makefile
                    951: LineMode/src/Makefile LineMode/src/windows/Makefile LineMode/src/vms/Makefile
1.63      frystyk   952: Robot/Makefile Robot/User/Makefile Robot/src/Makefile Robot/tcl/Makefile Robot/src/windows/Makefile
1.39      frystyk   953: ComLine/Makefile ComLine/User/Makefile ComLine/src/Makefile ComLine/src/windows/Makefile
1.57      frystyk   954: WinCom/Makefile WinCom/hlp/Makefile WinCom/res/Makefile
1.13      frystyk   955: Icons/Makefile Icons/WWW/Makefile Icons/32x32/Makefile Icons/internal/Makefile
1.1       frystyk   956: ], date>stamp-h)

Webmaster