Annotation of libwww/configure.in, revision 1.33

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.
                      4: 
                      5: AC_PREREQ(2.2)
                      6: AC_INIT(Library)
                      7: AC_REVISION
1.30      frystyk     8: AM_CONFIG_HEADER(config.h)
1.5       frystyk     9: AC_CONFIG_AUX_DIR(config)
1.1       frystyk    10: 
                     11: dnl Cheks for platform information
                     12: AC_CANONICAL_SYSTEM
                     13: 
1.20      frystyk    14: dnl Initializing Automake
1.22      frystyk    15: AM_INIT_AUTOMAKE
1.20      frystyk    16: AC_PROG_MAKE_SET
                     17: AC_ARG_PROGRAM
                     18: 
1.1       frystyk    19: dnl Variables for Automake.
1.3       frystyk    20: PACKAGE=w3c-libwww
1.1       frystyk    21: AC_SUBST(PACKAGE)
1.28      frystyk    22: AC_DEFINE_UNQUOTED(W3C_PACKAGE, "$PACKAGE")
                     23: 
1.29      frystyk    24: VERSION=5.1
1.1       frystyk    25: AC_SUBST(VERSION)
                     26: AC_DEFINE_UNQUOTED(W3C_VERSION, "$VERSION")
                     27: 
                     28: AC_PROG_CC
                     29: AC_PROG_RANLIB
                     30: 
                     31: dnl Remove next line and you get an error -- autoconf
                     32: dnl should deal with this automatically.
                     33: AC_ISC_POSIX
                     34: AC_PATH_X
1.7       frystyk    35: dnl AC_PATH_XTRA       Causes problems...
1.1       frystyk    36: 
1.28      frystyk    37: dnl Default location of icons
                     38: icondir="/usr/local/share/w3c-icons"
                     39: AC_SUBST(icondir)
                     40: AC_DEFINE_UNQUOTED(W3C_ICONS, "$icondir")
                     41: 
                     42: dnl Default location of TcL library and include files
                     43: tclinclude="/usr/local/include"
                     44: AC_SUBST(tclinclude)
                     45: libtcl="/usr/local/lib/libtcl7.5.a"
                     46: AC_SUBST(libtcl)
                     47: AC_DEFINE_UNQUOTED(W3C_TCL, "$libtcl")
                     48: 
1.1       frystyk    49: dnl Various compiler directives
1.28      frystyk    50: AC_MSG_CHECKING(whether to define additional compiler specific flags)
1.5       frystyk    51: case "$target" in
                     52:     alpha-dec*)
                     53:        if test "$CC" = "cc"; then
                     54:          CFLAGS="$CFLAGS -std1"
1.28      frystyk    55:          AC_MSG_RESULT(Digital Unix's cc)
1.14      frystyk    56:        fi
                     57:        ;;
                     58:     hp*)
                     59:        if test "$CC" = "cc"; then
                     60:          CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE"
1.28      frystyk    61:          AC_MSG_RESULT(HT-UX's cc)
1.5       frystyk    62:        fi
                     63:        ;;
1.28      frystyk    64:     *)
                     65:        AC_MSG_RESULT(no)
                     66:        ;;
1.5       frystyk    67: esac
1.1       frystyk    68: 
1.31      frystyk    69: dnl Checks for configuration arguments
                     70: 
                     71: AC_MSG_CHECKING(whether to support direct WAIS access - a bit rusty!)
                     72: AC_ARG_WITH(wais,
                     73: [  --with-wais[=PATH]      Compile with support for direct WAIS access.],
                     74: [ case "$withval" in
                     75:   no)
                     76:     AC_MSG_RESULT(no)
                     77:     HTWAIS=""
                     78:     ;;
                     79:   *)
                     80:     AC_MSG_RESULT(yes)
                     81:     if test "x$withval" = "xyes"; then
                     82:       withval="-lclient.a -lwais.a"
                     83:     fi
                     84:     LIBS="$withval $LIBS"
                     85:     AC_TRY_LINK([],
                     86:                 [ interpret_message(); ],
                     87:                [],
                     88:                [ AC_MSG_ERROR(Could not find the $withval library.  You must first install WAIS.) ])
                     89:     HTWAIS="HTWAIS.o"
                     90:     ;;
                     91:   esac ],
                     92:   AC_MSG_RESULT(no)
1.18      frystyk    93:   HTWAIS=""
1.31      frystyk    94: )
1.1       frystyk    95: AC_SUBST(HTWAIS)
                     96: 
1.31      frystyk    97: AC_MSG_CHECKING(whether to support zlib compress/decompress)
                     98: AC_ARG_WITH(zlib,
                     99: [  --with-zlib[=PATH]      Compile with zlib compress/decompress support.],
                    100: [ case "$withval" in
                    101:   no)
                    102:     AC_MSG_RESULT(no)
1.33    ! eric      103:     HTZLIB=""
1.31      frystyk   104:     ;;
                    105:   *)
                    106:     AC_MSG_RESULT(yes)
                    107:     if test "x$withval" = "xyes"; then
                    108:       withval="-lz"
                    109:     fi
                    110:     LIBS="$withval $LIBS"
                    111:     AC_DEFINE(ZLIB)
                    112:     AC_TRY_LINK([],
                    113:                 [ zlibVersion(); ],
                    114:                [],
                    115:                [ AC_MSG_ERROR(Could not find the $withval library.  You must first install zlib.) ])
1.33    ! eric      116:     HTZLIB="HTZip.o"
1.31      frystyk   117:     ;;
                    118:   esac ],
                    119:   AC_MSG_RESULT(no)
1.33    ! eric      120:   HTZLIB=""
1.31      frystyk   121: )
1.33    ! eric      122: AC_SUBST(HTZLIB)
1.31      frystyk   123: 
1.26      frystyk   124: # borrowed from SSH - thanks!
                    125: AC_MSG_CHECKING(whether to support SOCKS)
                    126: AC_ARG_WITH(socks,
                    127: [  --with-socks            Compile with SOCKS firewall traversal support.],
                    128: [ case "$withval" in
                    129:   no)
                    130:     AC_MSG_RESULT(no)
                    131:     ;;
                    132:   yes)
                    133:     AC_MSG_RESULT(yes)
                    134:     AC_CHECK_LIB(socks5, SOCKSconnect, [
                    135:            socks=5
                    136:            LIBS="-lsocks5 $LIBS"], [
                    137:        AC_CHECK_LIB(socks, Rconnect, [
                    138:            socks=4
                    139:            LIBS="-lsocks $LIBS"], [
                    140:                AC_MSG_ERROR(Could not find socks library.  You must first install socks.) ] ) ] )
                    141:     ;;
                    142:   esac ],
                    143:   AC_MSG_RESULT(no)
1.1       frystyk   144: )
                    145: 
1.26      frystyk   146: if test "x$socks" = "x"; then
                    147:        AC_MSG_CHECKING(whether to support SOCKS5)
                    148:        AC_ARG_WITH(socks5,
                    149:        [  --with-socks5[=PATH]    Compile with SOCKS5 firewall traversal support.],
                    150:        [ case "$withval" in
                    151:          no)
                    152:            AC_MSG_RESULT(no)
                    153:            ;;
                    154:          *)
                    155:            AC_MSG_RESULT(yes)
                    156:            socks=5
                    157:            if test "x$withval" = "xyes"; then
                    158:              withval="-lsocks5"
                    159:            fi
                    160:            LIBS="$withval $LIBS"
                    161:            AC_TRY_LINK([],
                    162:                        [ SOCKSconnect(); ],
                    163:                        [],
                    164:                        [ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks5.) ])
                    165:            ;;
                    166:          esac ],
                    167:          AC_MSG_RESULT(no)
                    168:        )
                    169: fi
                    170: 
                    171: if test "x$socks" = "x"; then
                    172:        AC_MSG_CHECKING(whether to support SOCKS4)
                    173:        AC_ARG_WITH(socks4,
                    174:        [  --with-socks4[=PATH]    Compile with SOCKS4 firewall traversal support.],
                    175:        [ case "$withval" in
                    176:          no)
                    177:            AC_MSG_RESULT(no)
                    178:            ;;
                    179:          *)
                    180:            AC_MSG_RESULT(yes)
                    181:            socks=4
                    182:            if test "x$withval" = "xyes"; then
                    183:              withval="-lsocks"
                    184:            fi
                    185:            LIBS="$withval $LIBS"
                    186:            AC_TRY_LINK([],
                    187:                        [ Rconnect(); ],
                    188:                        [],
                    189:                        [ AC_MSG_ERROR(Could not find the $withval library.  You must first install socks.) ])
                    190:            ;;
                    191:          esac ],
                    192:          AC_MSG_RESULT(no)
                    193:        )
                    194: fi
                    195: 
                    196: if test "x$socks" = "x4"; then
                    197:     AC_DEFINE(SOCKS)
                    198:     AC_DEFINE(SOCKS4)
                    199: fi
                    200: 
                    201: if test "x$socks" = "x5"; then
                    202:     AC_DEFINE(SOCKS)
                    203:     AC_DEFINE(SOCKS5)
                    204: fi
                    205: 
1.28      frystyk   206: AC_MSG_CHECKING(whether to use internal signal handlers)
                    207: AC_ARG_ENABLE(signals, [  --enable-signals        use internal libwww signal handler.],
                    208: [ case "${enableval}" in
                    209:   no)
                    210:     AC_MSG_RESULT(no)
                    211:     ;;
                    212:   *)
                    213:     AC_MSG_RESULT(yes)
                    214:     AC_DEFINE(WWWLIB_SIG)
                    215:     ;;
                    216:   esac ],
                    217:   AC_MSG_RESULT(no)
                    218: )
1.26      frystyk   219: 
1.28      frystyk   220: AC_MSG_CHECKING(whether to disable Nagle's algorithm)
                    221: AC_ARG_ENABLE(nagle,
1.30      frystyk   222: [  --disable-nagle         Turning off Nagle's algorithm.],
1.28      frystyk   223: [ case "${enableval}" in
                    224:   no)
                    225:     AC_MSG_RESULT(yes)
                    226:     AC_DEFINE(HT_NO_NAGLE)
                    227:     ;;
                    228:   *) 
                    229:     AC_MSG_RESULT(no)
                    230:     ;;
                    231:   esac ],
1.29      frystyk   232:   AC_MSG_RESULT(yes)
                    233:   AC_DEFINE(HT_NO_NAGLE)
1.28      frystyk   234: )
                    235: 
1.30      frystyk   236: AC_MSG_CHECKING(whether to disable HTTP/1.1 pipelining)
                    237: AC_ARG_ENABLE(pipelining,
                    238: [  --disable-pipelining    Turning off HTTP/1.1 Pipelining.],
                    239: [ case "${enableval}" in
                    240:   no)
                    241:     AC_MSG_RESULT(yes)
                    242:     AC_DEFINE(HT_NO_PIPELINING)
                    243:     ;;
                    244:   *) 
                    245:     AC_MSG_RESULT(no)
                    246:     ;;
                    247:   esac ],
                    248:   AC_MSG_RESULT(no)
                    249: )
                    250: 
1.28      frystyk   251: AC_MSG_CHECKING(whether to define _REENTRANT)
1.26      frystyk   252: AC_ARG_ENABLE(reentrant, [  --enable-reentrant      define _REENTRANT to enable reentrant system calls],
1.28      frystyk   253: [ case "${enableval}" in
                    254:   no)
                    255:     AC_MSG_RESULT(no)
                    256:     ;;
                    257:   *) 
                    258:     AC_MSG_RESULT(yes)
                    259:     AC_DEFINE(HT_REENTRANT) [CFLAGS="$CFLAGS -D_REENTRANT"]
                    260:     ;;
                    261:   esac ],
                    262:   AC_MSG_RESULT(no)
                    263: )
1.1       frystyk   264: 
1.28      frystyk   265: AC_MSG_CHECKING(whether to define _POSIX_SOURCE)
1.4       frystyk   266: AC_ARG_ENABLE(posix, [  --enable-posix          define _POSIX_SOURCE],
1.28      frystyk   267: [ case "${enableval}" in
                    268:   no)
                    269:     AC_MSG_RESULT(no)
                    270:     ;;
                    271:   *) 
                    272:     AC_MSG_RESULT(yes)
                    273:     AC_DEFINE(_POSIX_SOURCE) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
                    274:     ;;
                    275:   esac ],
                    276:   AC_MSG_RESULT(no)
                    277: )
1.4       frystyk   278: 
1.26      frystyk   279: AC_ARG_ENABLE(cyrillic, [  --enable-cyrillic       include support for Cyrillic in line mode browser],
                    280:   AC_DEFINE(CYRILLIC)
                    281:   A_STDIO="a_stdio.o", A_STDIO="")
                    282: AC_SUBST(A_STDIO)
1.4       frystyk   283: 
1.1       frystyk   284: dnl Checks for programs.
                    285: AC_PROG_INSTALL
                    286: AC_PROG_RANLIB
                    287: 
                    288: AC_CHECK_PROGS(have_telnet, telnet)
                    289: if test -n "$have_telnet" ; then
                    290:   AC_DEFINE_UNQUOTED(TELNET_PROGRAM, "$have_telnet")
                    291: fi
                    292: AC_CHECK_PROGS(have_rlogin, rlogin)
                    293: if test -n "$have_rlogin" ; then
                    294:   AC_DEFINE_UNQUOTED(RLOGIN_PROGRAM, "$have_rlogin")
                    295: fi
                    296: AC_CHECK_PROGS(have_tn3270, tn3270 x3270)
                    297: if test -n "$have_tn3270" ; then
                    298:   AC_DEFINE_UNQUOTED(TN3270_PROGRAM, "$have_tn3270")
                    299: fi
                    300: 
                    301: AC_PATH_PROG(RM, rm, rm)
                    302: AC_PATH_PROG(AR, ar, ar)
                    303: AC_PATH_PROG(MKDIR, mkdir, mkdir)
                    304: AC_PATH_PROG(CHMOD, chmod, chmod)
                    305: AC_PATH_PROG(CP, cp, cp)
                    306: AC_PATH_PROG(TAR, tar, tar)
                    307: AC_PATH_PROG(CVS, cvs, cvs)
                    308: AC_PATH_PROG(SED, sed, sed)
                    309: AC_PATH_PROGS(COMPRESS, gzip compress, compress)
                    310: AC_PROG_LN_S
                    311: 
                    312: dnl One remaining platform-specific difference in the library is the
                    313: dnl default postscript and image viewers: On the NeXT they are "open,"
                    314: dnl on other platforms they are ghostview or xv.  We should decide
                    315: dnl how to handle these things; perhaps the following lines would be
                    316: dnl useful:
                    317: dnl AC_PATH_PROGS(postscript_viewer, open ghostview, ghostview)
                    318: dnl AC_DEFINE_UNQUOTED(PRESENT_POSTSCRIPT, "$postscript_viewer %s")
                    319: dnl AC_PATH_PROGS(image_viewer, open xv, xv)
                    320: dnl AC_DEFINE_UNQUOTED(PRESENT_IMAGE, "$image_viewer %s")
                    321: 
                    322: dnl Checks for misc files
                    323: dnl AC_FILE_RESOLV_CONF
1.5       frystyk   324: AC_PATH_PROG(have_resolv_conf, resolv.conf, , /etc, /usr/etc)
                    325: if test -n "$have_resolv_conf" ; then
                    326:   AC_DEFINE_UNQUOTED(RESOLV_CONF, "$have_resolv_conf")
                    327: fi
1.22      frystyk   328: 
1.1       frystyk   329: dnl Checks for libraries:
1.7       frystyk   330: AC_CHECK_LIB(ICE, IceConnectionNumber)
                    331: AC_CHECK_LIB(socket, socket)
                    332: AC_CHECK_LIB(inet, connect)
                    333: AC_CHECK_LIB(nsl, t_accept)
1.20      frystyk   334: AC_CHECK_LIB(dl, dlopen)
1.1       frystyk   335: 
                    336: dnl Checks for header files:
                    337: AC_CHECK_HEADERS(stdio.h)
                    338: AC_CHECK_HEADERS(sys/types.h types.h)
                    339: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
                    340: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
                    341: AC_CHECK_HEADERS(sys/limits.h limits.h)
                    342: AC_CHECK_HEADERS(sys/stat.h stat.h)
                    343: AC_CHECK_HEADERS(sys/file.h)
                    344: AC_CHECK_HEADERS(sys/ioctl.h)
                    345: AC_CHECK_HEADERS(sys/time.h time.h)
                    346: AC_CHECK_HEADERS(sys/systeminfo.h)
                    347: AC_CHECK_HEADERS(string.h strings.h)
                    348: AC_CHECK_HEADERS(syslog.h)
                    349: AC_CHECK_HEADERS(sys/socket.h socket.h)
                    350: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
1.28      frystyk   351: AC_CHECK_HEADERS(netinet/tcp.h tcp.h)
1.1       frystyk   352: AC_CHECK_HEADERS(netinet/in.h in.h)
                    353: AC_CHECK_HEADERS(dn.h)
                    354: AC_CHECK_HEADERS(sys/ipc.h)
                    355: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
                    356: AC_CHECK_HEADERS(pwd.h)
                    357: AC_CHECK_HEADERS(grp.h)
                    358: AC_CHECK_HEADERS(arpa/inet.h inet.h)
                    359: AC_CHECK_HEADERS(netdb.h)
                    360: AC_CHECK_HEADERS(manifest.h)
                    361: AC_CHECK_HEADERS(bsdtypes.h)
                    362: AC_CHECK_HEADERS(stdefs.h)
                    363: AC_CHECK_HEADERS(bsdtime.h)
                    364: AC_CHECK_HEADERS(sys/select.h select.h)
                    365: AC_CHECK_HEADERS(dnetdb.h)
                    366: AC_CHECK_HEADERS(libc.h)
                    367: AC_CHECK_HEADERS(stdlib.h)
                    368: AC_CHECK_HEADERS(malloc.h)
                    369: AC_CHECK_HEADERS(memory.h)
                    370: AC_CHECK_HEADERS(unixlib.h)
                    371: AC_CHECK_HEADERS(ctype.h)
                    372: AC_CHECK_HEADERS(cursesX.h curses.h)
                    373: AC_CHECK_HEADERS(sys/resource.h resource.h)
                    374: AC_HEADER_DIRENT
                    375: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
                    376: AC_HEADER_STDC
                    377: AC_HEADER_SYS_WAIT
                    378: AC_HEADER_TIME
                    379: AC_HEADER_STAT
                    380: 
                    381: dnl Checks for typedefs, structures, and compiler characteristics:
                    382: AC_TYPE_UID_T
1.5       frystyk   383: AC_TYPE_PID_T
1.1       frystyk   384: AC_TYPE_GETGROUPS
                    385: AC_TYPE_MODE_T
                    386: AC_TYPE_SIZE_T
                    387: AC_CHECK_TYPE(BOOLEAN, char)
                    388: AC_CHECK_TYPE(u_char, unsigned char)
                    389: AC_CHECK_TYPE(u_short, unsigned short)
                    390: AC_CHECK_TYPE(u_long, unsigned long)
1.6       frystyk   391: AC_CHECK_SIZEOF(int)
                    392: AC_CHECK_SIZEOF(long)
1.1       frystyk   393: AC_C_CONST
                    394: AC_C_BIGENDIAN
                    395: AC_C_CHAR_UNSIGNED
                    396: AC_STRUCT_TM
                    397: AC_STRUCT_GMTOFF
                    398: AC_STRUCT_TIMEZONE
                    399: AC_STRUCT_WINSIZE
                    400: AC_HEADER_TIME
                    401: 
                    402: dnl Other types that aren't checked for, but maybe should be:
1.5       frystyk   403: dnl AC_TYPE_OFF_T AC_STRUCT_ST_RDEV 
1.1       frystyk   404: 
                    405: dnl Checks for library functions:
                    406: AC_TYPE_SIGNAL
                    407: AC_FUNC_VPRINTF
                    408: AC_FUNC_STRFTIME
                    409: AC_CHECK_FUNCS(getcwd gethostname getdomainname getwd mktime timegm \
                    410:                select socket strerror strtol opendir getpid strchr memcpy \
1.15      frystyk   411:                getlogin getpass fcntl readdir sysinfo ioctl chdir tempnam)
1.1       frystyk   412: AC_CHECK_FUNC(unlink, , AC_CHECK_FUNC(remove, AC_DEFINE(unlink, remove)))
                    413: 
                    414: dnl Checks for external globals.
                    415: dnl AC_CHECK_EXTERNS(socket_errno sys_errlist sys_nerr)
                    416: 
                    417: dnl This is the standard UNIX value
                    418: AC_DEFINE(CACHE_FILE_PREFIX, "/usr/wsrc/")
                    419: 
                    420: dnl THINGS TO CONSIDER
                    421: dnl ******************
                    422: AC_DEFINE(TTY_IS_SELECTABLE)
                    423: 
                    424: dnl HT_REENTRANT
                    425: dnl POLL_PORTS
                    426: dnl NOT_ASCII
                    427: dnl ******************
                    428: 
                    429: dnl Create output files
                    430: AC_OUTPUT([Makefile
1.11      frystyk   431: config/Makefile
1.3       frystyk   432: Library/Makefile Library/User/Makefile Library/User/Patch/Makefile
                    433: Library/User/Architecture/Makefile Library/User/Using/Makefile Library/User/Guide/Makefile
1.12      frystyk   434: Library/User/Style/Makefile Library/User/Platform/Makefile
1.17      neon      435: Library/Test/Makefile Library/Test/User/Makefile Library/Test/src/Makefile
1.3       frystyk   436: Library/src/Makefile Library/src/windows/Makefile Library/src/vms/Makefile
1.11      frystyk   437: Library/Examples/Makefile
1.9       frystyk   438: PICS-client/Makefile PICS-client/User/Makefile PICS-client/src/Makefile PICS-client/src/windows/Makefile
1.3       frystyk   439: LineMode/Makefile LineMode/User/Makefile
                    440: LineMode/src/Makefile LineMode/src/windows/Makefile LineMode/src/vms/Makefile
1.13      frystyk   441: Robot/Makefile Robot/User/Makefile Robot/src/Makefile Robot/src/windows/Makefile
1.3       frystyk   442: ComLine/Makefile ComLine/User/Makefile ComLine/src/Makefile
                    443: Listen/Makefile Listen/User/Makefile Listen/src/Makefile
1.13      frystyk   444: Icons/Makefile Icons/WWW/Makefile Icons/32x32/Makefile Icons/internal/Makefile
1.1       frystyk   445: ], date>stamp-h)

Webmaster