Annotation of libwww/configure.in, revision 1.92

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

Webmaster