Annotation of libwww/configure.in, revision 1.95

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

Webmaster