Annotation of libwww/configure.in, revision 1.85
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.85 ! kahan 4: dnl @(#) $Id: configure.in,v 1.84 2000/06/20 11:01:34 kahan Exp $
1.1 frystyk 5:
1.85 ! kahan 6: AC_REVISION([$Id: configure.in,v 1.84 2000/06/20 11:01:34 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.83 kahan 20: VERSION=pre-5.3.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.79 frystyk 25: PREVIOUS_VERSION=5.2.8
1.51 frystyk 26: AC_SUBST(PREVIOUS_VERSION)
27:
1.41 frystyk 28: AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
1.51 frystyk 29:
1.53 frystyk 30: AM_CONFIG_HEADER(wwwconf.h)
1.41 frystyk 31:
32: dnl Regular configure...
1.1 frystyk 33: AC_PROG_CC
1.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.53 frystyk 216: AC_CHECK_FUNC(unlink, , AC_CHECK_FUNC(remove, AC_DEFINE(unlink, remove)))
217:
1.31 frystyk 218: dnl Checks for configuration arguments
1.50 frystyk 219: AC_MSG_CHECKING(whether to support direct WAIS access.)
1.31 frystyk 220: AC_ARG_WITH(wais,
221: [ --with-wais[=PATH] Compile with support for direct WAIS access.],
222: [ case "$withval" in
223: no)
224: AC_MSG_RESULT(no)
225: HTWAIS=""
1.76 frystyk 226: WWWWAIS=""
227: LWWWWAIS=""
228: LIBWWWWAIS=""
1.31 frystyk 229: ;;
230: *)
231: AC_MSG_RESULT(yes)
232: if test "x$withval" = "xyes"; then
1.50 frystyk 233: withval="/usr/local/lib/wais/wais.a /usr/local/lib/wais/client.a"
1.31 frystyk 234: fi
1.50 frystyk 235: LIBS="$withval -lm $LIBS"
1.52 frystyk 236: AC_DEFINE(HT_DIRECT_WAIS)
1.31 frystyk 237: AC_TRY_LINK([],
1.50 frystyk 238: [ makeDocID(); ],
1.31 frystyk 239: [],
1.50 frystyk 240: [ AC_MSG_ERROR(Could not find one or more of the $withval libraries. You must first install WAIS.) ])
1.54 frystyk 241: HTWAIS="HTWAIS.lo"
1.76 frystyk 242: WWWWAIS="libwwwwais.la"
243: LWWWWAIS="-lwwwwais.la"
244: LIBWWWWAIS='${top_builddir}/Library/src/libwwwwais.la'
1.31 frystyk 245: ;;
246: esac ],
247: AC_MSG_RESULT(no)
1.18 frystyk 248: HTWAIS=""
1.76 frystyk 249: WWWWAIS=""
250: LWWWWAIS=""
251: LIBWWWWAIS=""
1.31 frystyk 252: )
1.1 frystyk 253: AC_SUBST(HTWAIS)
1.76 frystyk 254: AC_SUBST(WWWWAIS)
255: AC_SUBST(LWWWWAIS)
256: AC_SUBST(LIBWWWWAIS)
1.1 frystyk 257:
1.31 frystyk 258: AC_MSG_CHECKING(whether to support zlib compress/decompress)
259: AC_ARG_WITH(zlib,
260: [ --with-zlib[=PATH] Compile with zlib compress/decompress support.],
261: [ case "$withval" in
262: no)
263: AC_MSG_RESULT(no)
1.33 eric 264: HTZLIB=""
1.76 frystyk 265: WWWZIP=""
266: LWWWZIP=""
267: LIBWWWZIP=""
1.31 frystyk 268: ;;
269: *)
270: AC_MSG_RESULT(yes)
271: if test "x$withval" = "xyes"; then
272: withval="-lz"
1.57 frystyk 273: LIBS="$LIBS $withval"
274: else
275: AC_ADDLIB($withval)
1.31 frystyk 276: fi
1.35 frystyk 277: AC_DEFINE(HT_ZLIB)
1.31 frystyk 278: AC_TRY_LINK([],
279: [ zlibVersion(); ],
280: [],
281: [ AC_MSG_ERROR(Could not find the $withval library. You must first install zlib.) ])
1.54 frystyk 282: HTZLIB="HTZip.lo"
1.76 frystyk 283: WWWZIP="libwwwzip.la"
284: LWWWZIP="-lwwwzip"
285: LIBWWWZIP='${top_builddir}/Library/src/libwwwzip.la'
1.31 frystyk 286: ;;
287: esac ],
288: AC_MSG_RESULT(no)
1.33 eric 289: HTZLIB=""
1.76 frystyk 290: WWWZIP=""
291: LWWWZIP=""
292: LIBWWWZIP=""
1.31 frystyk 293: )
1.33 eric 294: AC_SUBST(HTZLIB)
1.76 frystyk 295: AC_SUBST(WWWZIP)
296: AC_SUBST(LWWWZIP)
297: AC_SUBST(LIBWWWZIP)
1.43 frystyk 298:
299: AC_MSG_CHECKING(whether to support POSIX regex)
300: AC_ARG_WITH(regex,
301: [ --with-regex[=PATH] Compile with POSIC regex library support.],
302: [ case "$withval" in
303: no)
304: AC_MSG_RESULT(no)
305: ;;
306: *)
307: AC_MSG_RESULT(yes)
1.46 frystyk 308: AC_DEFINE(HT_POSIX_REGEX)
1.43 frystyk 309: if test "x$withval" = "xyes"; then
1.57 frystyk 310: AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] )
1.46 frystyk 311: else
1.57 frystyk 312: AC_ADDLIB($withval)
313: AC_TRY_LINK([],
314: [ regexec(); ],
315: [],
316: [ AC_MSG_ERROR(Could not find the $withval library. You must first install regex.) ] )
1.43 frystyk 317: fi
318: ;;
319: esac ],
320: AC_MSG_RESULT(no)
321: )
1.31 frystyk 322:
1.26 frystyk 323: # borrowed from SSH - thanks!
324: AC_MSG_CHECKING(whether to support SOCKS)
325: AC_ARG_WITH(socks,
326: [ --with-socks Compile with SOCKS firewall traversal support.],
327: [ case "$withval" in
328: no)
329: AC_MSG_RESULT(no)
330: ;;
331: yes)
332: AC_MSG_RESULT(yes)
333: AC_CHECK_LIB(socks5, SOCKSconnect, [
334: socks=5
335: LIBS="-lsocks5 $LIBS"], [
336: AC_CHECK_LIB(socks, Rconnect, [
337: socks=4
338: LIBS="-lsocks $LIBS"], [
339: AC_MSG_ERROR(Could not find socks library. You must first install socks.) ] ) ] )
340: ;;
341: esac ],
342: AC_MSG_RESULT(no)
1.1 frystyk 343: )
344:
1.26 frystyk 345: if test "x$socks" = "x"; then
346: AC_MSG_CHECKING(whether to support SOCKS5)
347: AC_ARG_WITH(socks5,
348: [ --with-socks5[=PATH] Compile with SOCKS5 firewall traversal support.],
349: [ case "$withval" in
350: no)
351: AC_MSG_RESULT(no)
352: ;;
353: *)
354: AC_MSG_RESULT(yes)
355: socks=5
356: if test "x$withval" = "xyes"; then
357: withval="-lsocks5"
1.57 frystyk 358: LIBS="$withval $LIBS"
359: else
360: AC_ADDLIB($withval)
1.26 frystyk 361: fi
362: AC_TRY_LINK([],
363: [ SOCKSconnect(); ],
364: [],
365: [ AC_MSG_ERROR(Could not find the $withval library. You must first install socks5.) ])
366: ;;
367: esac ],
368: AC_MSG_RESULT(no)
369: )
370: fi
371:
372: if test "x$socks" = "x"; then
373: AC_MSG_CHECKING(whether to support SOCKS4)
374: AC_ARG_WITH(socks4,
375: [ --with-socks4[=PATH] Compile with SOCKS4 firewall traversal support.],
376: [ case "$withval" in
377: no)
378: AC_MSG_RESULT(no)
379: ;;
380: *)
381: AC_MSG_RESULT(yes)
382: socks=4
383: if test "x$withval" = "xyes"; then
384: withval="-lsocks"
1.57 frystyk 385: LIBS="$withval $LIBS"
386: else
387: AC_ADDLIB($withval)
1.26 frystyk 388: fi
389: AC_TRY_LINK([],
390: [ Rconnect(); ],
391: [],
392: [ AC_MSG_ERROR(Could not find the $withval library. You must first install socks.) ])
393: ;;
394: esac ],
395: AC_MSG_RESULT(no)
396: )
397: fi
398:
399: if test "x$socks" = "x4"; then
400: AC_DEFINE(SOCKS)
401: AC_DEFINE(SOCKS4)
402: fi
403:
404: if test "x$socks" = "x5"; then
405: AC_DEFINE(SOCKS)
406: AC_DEFINE(SOCKS5)
407: fi
1.54 frystyk 408:
409: AC_MSG_CHECKING(whether to support mysql access.)
410: AC_ARG_WITH(mysql,
411: [ --with-mysql[=PATH] Compile with support for mysql access.],
412: [ case "$withval" in
413: no)
414: AC_MSG_RESULT(no)
415: HTSQL=""
416: HTSQLLOG=""
1.76 frystyk 417: WWWSQL=""
418: LWWWSQL=""
419: LIBWWWSQL=""
1.60 frystyk 420: CVS2SQL=""
1.54 frystyk 421: ;;
422: *)
423: AC_MSG_RESULT(yes)
424: if test "x$withval" = "xyes"; then
1.76 frystyk 425: if test -f '/usr/local/lib/mysql/libmysqlclient.a'; then
426: AC_ADDLIB("/usr/local/lib/mysql/libmysqlclient.a")
427: elif test -f '/usr/lib/mysql/libmysqlclient.a'; then
428: AC_ADDLIB("/usr/lib/mysql/libmysqlclient.a")
429: else
430: AC_MSG_ERROR(Could not find the mysql client library.)
431: fi
1.57 frystyk 432: else
433: AC_ADDLIB($withval)
1.54 frystyk 434: fi
435: AC_DEFINE(HT_MYSQL)
436: HTSQL="HTSQL.lo"
437: HTSQLLOG="HTSQLLog.lo"
1.76 frystyk 438: WWWSQL="libwwwsql.la"
439: LWWWSQL="-lwwwsql"
440: LIBWWWSQL='${top_builddir}/Library/src/libwwwsql.la'
1.60 frystyk 441: CVS2SQL="cvs2sql"
1.54 frystyk 442: ;;
443: esac ],
444: AC_MSG_RESULT(no)
445: HTSQL=""
446: HTSQLLOG=""
1.76 frystyk 447: WWWSQL=""
448: LWWWSQL=""
449: LIBWWWSQL=""
1.60 frystyk 450: CVS2SQL=""
1.54 frystyk 451: )
452: AC_SUBST(HTSQL)
453: AC_SUBST(HTSQLLOG)
1.76 frystyk 454: AC_SUBST(WWWSQL)
455: AC_SUBST(LWWWSQL)
456: AC_SUBST(LIBWWWSQL)
1.60 frystyk 457: AC_SUBST(CVS2SQL)
1.68 frystyk 458:
459: AC_MSG_CHECKING(whether we include the Expat XML parser.)
460: AC_ARG_WITH(expat,
1.76 frystyk 461: [ --with-expat[=PATH] Compile with support for expat.],
1.68 frystyk 462: [ case "$withval" in
463: no)
464: AC_MSG_RESULT(no)
465: HTXML=""
1.77 frystyk 466: HTLIBXML=""
1.76 frystyk 467: XMLTOK=""
468: XMLPARSE=""
469: WWWXML=""
470: LWWWXML=""
471: LIBWWWXML=""
472: SHOWXML=""
1.68 frystyk 473: ;;
474: *)
1.70 frystyk 475: AC_MSG_RESULT(yes)
476: AC_DEFINE(HT_EXPAT)
1.68 frystyk 477: HTXML="HTXML.lo"
1.77 frystyk 478: HTLIBXML='${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.76 frystyk 479: XMLTOK="libxmltok.la"
480: XMLPARSE="libxmlparse.la"
481: WWWXML="libwwwxml.la"
482: LWWWXML="-lwwwxml -lxmltok -lxmlparse"
483: LIBWWWXML='${top_builddir}/Library/src/libwwwxml.la ${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.79 frystyk 484: SHOWXML="showxml ptri stri"
1.68 frystyk 485: ;;
486: esac ],
1.72 frystyk 487: AC_MSG_RESULT(yes)
488: AC_DEFINE(HT_EXPAT)
489: HTXML="HTXML.lo"
1.77 frystyk 490: HTLIBXML='${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.76 frystyk 491: XMLTOK="libxmltok.la"
492: XMLPARSE="libxmlparse.la"
493: WWWXML="libwwwxml.la"
494: LWWWXML="-lwwwxml -lxmltok -lxmlparse"
495: LIBWWWXML='${top_builddir}/Library/src/libwwwxml.la ${top_builddir}/modules/expat/xmlparse/libxmlparse.la ${top_builddir}/modules/expat/xmltok/libxmltok.la'
1.79 frystyk 496: SHOWXML="showxml ptri stri"
1.68 frystyk 497: )
1.77 frystyk 498: AC_SUBST(HTXML) # for old style big library
499: AC_SUBST(HTLIBXML) # for old style big library
1.76 frystyk 500: AC_SUBST(XMLTOK)
501: AC_SUBST(XMLPARSE)
502: AC_SUBST(WWWXML)
503: AC_SUBST(LWWWXML)
504: AC_SUBST(LIBWWWXML)
505: AC_SUBST(SHOWXML)
506:
507: AC_MSG_CHECKING(whether we include MD5 support for HTTP Digest Authentication.)
508: AC_ARG_WITH(md5,
509: [ --with-md5[=PATH] Compile with support for md5.],
510: [ case "$withval" in
511: no)
512: AC_MSG_RESULT(no)
513: WWWMD5=""
514: LWWWMD5=""
515: LIBWWWMD5=""
516: ;;
517: *)
518: AC_MSG_RESULT(yes)
519: AC_DEFINE(HT_MD5)
520: WWWMD5="libmd5.la"
521: LWWWMD5="-lmd5"
522: LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
523: ;;
524: esac ],
525: AC_MSG_RESULT(yes)
526: AC_DEFINE(HT_MD5)
527: WWWMD5="libmd5.la"
528: LWWWMD5="-lmd5"
529: LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
530: )
531: AC_SUBST(WWWMD5)
532: AC_SUBST(LWWWMD5)
533: AC_SUBST(LIBWWWMD5)
1.26 frystyk 534:
1.83 kahan 535: dnl Checks for libwww and OpenSSL:
536: AC_MSG_CHECKING(whether we can find OpenSSL)
537: dnl find the ssl library dir (empirical)
538: if test -d '/usr/local/ssl/lib'; then
539: ssllib="-L/usr/local/ssl/lib -lssl -lcrypto"
540: else
541: ssllib="-L/usr/lib -lssl -lcrypto"
542: fi
543: dnl find the ssl include dir (empirical)
544: if test -d '/usr/local/ssl/include'; then
545: sslinc="-I/usr/local/ssl/include"
546: elif test -d '/usr/local/openssl/include'; then
547: sslinc="-I/usr/local/openssl/include"
548: elif test -d '/usr/include/ssl'; then
549: sslinc="-I/usr/include/ssl"
550: elif test -d '/usr/include/openssl'; then
551: sslinc="-I/usr/include/openssl"
552: else
553: sslinc=""
554: fi
1.84 kahan 555: WWWSSL=""
1.83 kahan 556: SSLINC=""
557: LIBSSL=""
558: LWWWSSL=""
559: LIBWWWSSL=""
560: WWWSSLEX=""
561: AC_ARG_WITH(ssl,
562: [ --with-ssl[=PATH] Link with OpenSSL.],
563: [ case "$withval" in
564: no)
565: AC_MSG_RESULT(no)
566: ;;
567: *)
568: if test "x$withval" = "xyes"; then
569: withval=$ssllib
570: SSLINC=$sslinc
571: fi
572: LIBS="$LIBS $withval"
573: AC_TRY_LINK([],
574: [ SSL_library_init(); ],
575: [],
576: [ AC_MSG_ERROR(Could not find the $withval libraries. You must first install openSSL.) ])
577: AC_MSG_RESULT(yes)
1.84 kahan 578: WWWSSL="libwwwssl.la"
1.83 kahan 579: LWWWSSL="-lwwwssl"
580: LIBWWWSSL='${top_builddir}/Library/src/SSL/libwwwssl.la'
581: WWWSSLEX="wwwssl"
582: ;;
583: esac ],
1.84 kahan 584: [ AC_MSG_RESULT(no) ])
585: AC_SUBST(WWWSSL)
1.83 kahan 586: AC_SUBST(SSLINC)
587: AC_SUBST(LWWWSSL)
588: AC_SUBST(LIBWWWSSL)
589: AC_SUBST(WWWSSLEX)
590:
1.28 frystyk 591: AC_MSG_CHECKING(whether to use internal signal handlers)
592: AC_ARG_ENABLE(signals, [ --enable-signals use internal libwww signal handler.],
593: [ case "${enableval}" in
594: no)
595: AC_MSG_RESULT(no)
596: ;;
597: *)
598: AC_MSG_RESULT(yes)
599: AC_DEFINE(WWWLIB_SIG)
600: ;;
601: esac ],
602: AC_MSG_RESULT(no)
603: )
1.26 frystyk 604:
1.28 frystyk 605: AC_MSG_CHECKING(whether to disable Nagle's algorithm)
606: AC_ARG_ENABLE(nagle,
1.30 frystyk 607: [ --disable-nagle Turning off Nagle's algorithm.],
1.28 frystyk 608: [ case "${enableval}" in
609: no)
610: AC_MSG_RESULT(yes)
611: AC_DEFINE(HT_NO_NAGLE)
612: ;;
613: *)
614: AC_MSG_RESULT(no)
615: ;;
616: esac ],
1.29 frystyk 617: AC_MSG_RESULT(yes)
618: AC_DEFINE(HT_NO_NAGLE)
1.28 frystyk 619: )
620:
1.40 frystyk 621: AC_MSG_CHECKING(whether to accept new rule files without asking an end user.)
622: AC_ARG_ENABLE(autorules,
623: [ --enable-autorules Enabling acceptance of rule files without user interaction.],
624: [ case "${enableval}" in
625: yes)
626: AC_MSG_RESULT(yes)
627: AC_DEFINE(HT_AUTOMATIC_RULES)
628: ;;
629: *)
630: AC_MSG_RESULT(no)
631: ;;
632: esac ],
633: AC_MSG_RESULT(no)
634: )
635:
1.30 frystyk 636: AC_MSG_CHECKING(whether to disable HTTP/1.1 pipelining)
637: AC_ARG_ENABLE(pipelining,
638: [ --disable-pipelining Turning off HTTP/1.1 Pipelining.],
639: [ case "${enableval}" in
640: no)
641: AC_MSG_RESULT(yes)
642: AC_DEFINE(HT_NO_PIPELINING)
1.41 frystyk 643: ;;
644: *)
645: AC_MSG_RESULT(no)
646: ;;
647: esac ],
648: AC_MSG_RESULT(no)
649: )
650:
651:
652: AC_MSG_CHECKING(whether to use MUX as transport for HTTP.)
653: AC_ARG_ENABLE(mux,
654: [ --enable-mux Enabling MUX as transport for HTTP.],
655: [ case "${enableval}" in
656: yes)
657: AC_MSG_RESULT(yes)
658: AC_DEFINE(HT_MUX)
1.30 frystyk 659: ;;
660: *)
661: AC_MSG_RESULT(no)
662: ;;
663: esac ],
664: AC_MSG_RESULT(no)
665: )
666:
1.28 frystyk 667: AC_MSG_CHECKING(whether to define _REENTRANT)
1.26 frystyk 668: AC_ARG_ENABLE(reentrant, [ --enable-reentrant define _REENTRANT to enable reentrant system calls],
1.28 frystyk 669: [ case "${enableval}" in
670: no)
671: AC_MSG_RESULT(no)
1.82 kahan 672: ac_cv_reentrant=no
1.28 frystyk 673: ;;
674: *)
675: AC_MSG_RESULT(yes)
676: AC_DEFINE(HT_REENTRANT) [CFLAGS="$CFLAGS -D_REENTRANT"]
1.82 kahan 677: ac_cv_reentrant=yes
1.28 frystyk 678: ;;
679: esac ],
680: AC_MSG_RESULT(no)
681: )
1.82 kahan 682:
683: if test "$ac_cv_reentrant" = "yes"; then
684:
685: AC_MSG_CHECKING(for ctime_r)
686: if test -z "$ac_cv_ctime_args"; then
687: AC_TRY_COMPILE(
688: [#include <time.h>],
689: [
690: time_t clock;
691: char buf[26];
692: ctime_r(&clock, buf);
693: ], ac_cv_ctime_args=2)
694: fi
695: if test -z "$ac_cv_ctime_args" ; then
696: AC_TRY_COMPILE(
697: [#include <time.h>],
698: [
699: time_t clock;
700: char buf[26];
701: ctime_r(&clock, buf, 26);
702: ], ac_cv_ctime_args=3)
703: fi
704: if test -z "$ac_cv_ctime_args"; then
705: AC_MSG_RESULT(no)
706: have_missing_r_funcs="$have_missing_r_funcs ctime_r"
707: else
708: if test "$ac_cv_ctime_args" = 2; then
709: AC_DEFINE(HAVE_CTIME_R_2)
710: elif test "$ac_cv_ctime_args" = 3; then
711: AC_DEFINE(HAVE_CTIME_R_3)
712: fi
713: AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
714: fi
715:
716: AC_MSG_CHECKING(for readdir_r)
717: if test -z "$ac_cv_readdir_args"; then
718: AC_TRY_COMPILE(
719: [
720: #include <sys/types.h>
721:
722: #if defined(HAVE_DIRENT_H)
723: # include <dirent.h>
724: # define NAMLEN(dirent) strlen((dirent)->d_name)
725: #else
726: # define dirent direct
727: # define NAMLEN(dirent) (dirent)->d_namlen
728: # if defined(HAVE_SYS_NDIR_H)
729: # include <sys/ndir.h>
730: # endif
731: # if defined(HAVE_SYS_DIR_H)
732: # include <sys/dir.h>
733: # endif
734: # if defined(HAVE_NDIR_H)
735: # include <ndir.h>
736: # endif
737: #endif ],
738: [
739: struct dirent dir, *dirp;
740: DIR *mydir;
741: dirp = readdir_r(mydir, &dir);
742: ], ac_cv_readdir_args=2)
743: fi
744: if test -z "$ac_cv_readdir_args"; then
745:
746: AC_TRY_COMPILE(
747: [
748: #include <sys/types.h>
749: #if defined(HAVE_DIRENT_H)
750: # include <dirent.h>
751: # define NAMLEN(dirent) strlen((dirent)->d_name)
752: #else
753: # define dirent direct
754: # define NAMLEN(dirent) (dirent)->d_namlen
755: # if defined(HAVE_SYS_NDIR_H)
756: # include <sys/ndir.h>
757: # endif
758: # if defined(HAVE_SYS_DIR_H)
759: # include <sys/dir.h>
760: # endif
761: # if defined(HAVE_NDIR_H)
762: # include <ndir.h>
763: # endif
764: #endif ],
765: [
766: struct dirent dir, *dirp;
767: DIR *mydir;
768: int rc;
769: rc = readdir_r(mydir, &dir, &dirp);
770: ], ac_cv_readdir_args=3)
771: fi
772:
773: if test -z "$ac_cv_readdir_args"; then
774: AC_MSG_RESULT(no)
775: have_missing_r_funcs="$have_missing_r_funcs readdir_r"
776: else
777: if test "$ac_cv_readdir_args" = 2; then
778: AC_DEFINE(HAVE_READDIR_R_2)
779: elif test "$ac_cv_readdir_args" = 3; then
780: AC_DEFINE(HAVE_READDIR_R_3)
781: fi
782: AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
783: fi
784:
785: AC_MSG_CHECKING(for gethostbyname_r)
786: if test -z "$ac_cv_gethostbyname_args"; then
787: AC_TRY_COMPILE(
788: [
789: #include <sys/types.h>
790: #include <netdb.h>],
791: [
792: struct hostent *hp;
793: struct hostent h;
794: char *name;
795: char buffer[10];
796: int h_errno;
797: hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);],
798: ac_cv_gethostbyname_args=5)
799: fi
800: if test -z "$ac_cv_gethostbyname_args"; then
801: AC_TRY_COMPILE(
802: [
803: #include <sys/types.h>
804: #include <netdb.h>],
805: [
806: struct hostent h;
807: struct hostent_data hdata;
808: char *name;
809: int rc;
810: rc = gethostbyname_r(name, &h, &hdata);],
811: ac_cv_gethostbyname_args=3)
812: fi
813: if test -z "$ac_cv_gethostbyname_args"; then
814: AC_TRY_COMPILE(
815: [
816: #include <sys/types.h>
817: #include <netdb.h>],
818: [
819: struct hostent h;
820: struct hostent *hp;
821: char *name;
822: char buf[10];
823: int rc;
824: int h_errno;
825:
826: rc = gethostbyname_r(name, &h, buf, 10, &hp, &h_errno);
827: ],
828: ac_cv_gethostbyname_args=6)
829: fi
830: if test -z "$ac_cv_gethostbyname_args"; then
831: AC_MSG_RESULT(no)
832: have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"
833: else
834: if test "$ac_cv_gethostbyname_args" = 3; then
835: AC_DEFINE(HAVE_GETHOSTBYNAME_R_3)
836: elif test "$ac_cv_gethostbyname_args" = 5; then
837: AC_DEFINE(HAVE_GETHOSTBYNAME_R_5)
838: elif test "$ac_cv_gethostbyname_args" = 6; then
839: AC_DEFINE(HAVE_GETHOSTBYNAME_R_6)
840: fi
841: AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments])
842: fi
843:
844: AC_MSG_CHECKING(for gethostbyaddr_r)
845: if test -z "$ac_cv_gethostbyaddr_args"; then
846: AC_TRY_COMPILE(
847: [
848: #include <sys/types.h>
849: #include <netdb.h>],
850: [
851: char * address;
852: int length;
853: int type;
854: struct hostent h;
855: struct hostent_data hdata;
856: int rc;
857: rc = gethostbyaddr_r(address, length, type, &h, &hdata);
858: ],
859: ac_cv_gethostbyaddr_args=5)
860:
861: fi
862: if test -z "$ac_cv_gethostbyaddr_args"; then
863: AC_TRY_COMPILE(
864: [
865: #include <sys/types.h>
866: #include <netdb.h>],
867: [
868: char * address;
869: int length;
870: int type;
871: struct hostent h;
872: char buffer[10];
873: int buflen;
874: int h_errnop;
875: struct hostent * hp;
876:
877: hp = gethostbyaddr_r(address, length, type, &h,
878: buffer, buflen, &h_errnop);
879: ],
880: ac_cv_gethostbyaddr_args=7)
881: fi
882:
883: if test -z "$ac_cv_gethostbyaddr_args"; then
884: AC_TRY_COMPILE(
885: [
886: #include <sys/types.h>
887: #include <netdb.h>],
888: [
889: char * address;
890: int length;
891: int type;
892: struct hostent h;
893: char buffer[10];
894: int buflen;
895: int h_errnop;
896: struct hostent * hp;
897: int rc;
898:
899: rc = gethostbyaddr_r(address, length, type, &h,
900: buffer, buflen, &hp, &h_errnop);
901: ],
902: ac_cv_gethostbyaddr_args=8)
903: fi
904: if test -z "$ac_cv_gethostbyaddr_args"; then
905: AC_MSG_RESULT(no)
906: have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"
907: else
908: if test "$ac_cv_gethostbyaddr_args" = 5; then
909: AC_DEFINE(HAVE_GETHOSTBYADDR_R_5)
910: elif test "$ac_cv_gethostbyaddr_args" = 7; then
911: AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
912: elif test "$ac_cv_gethostbyaddr_args" = 8; then
913: AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
914: fi
915: AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyaddr_args arguments])
916: fi
917:
918: AC_MSG_CHECKING(for getlogin_r)
919: if test -z "$ac_cv_getlogin_r_style"; then
920: AC_TRY_RUN(
921: [
922: #include <unistd.h>
923:
924: int main()
925: {
926: char name[1024];
927: int len=1024;
928: int rc;
929: char *login;
930:
931: name[0]='\0';
932:
933: rc = getlogin_r(name, len);
934: if(rc == 0 && name[0] != '\0')
935: {
936: return 0; /* returns zero on success */
937: }
938: else if(rc != 0 && name[0] == '\0')
939: {
940: return 0; /* returns errno on failure */
941: }
942: else if(rc == 0 && name[0] == '\0')
943: {
944: return 0; /* can't tell */
945: }
946: else if(rc != 0 && name[0] != '\0')
947: {
948: return 1; /* returns pointer on success */
949: }
950: }
951: ],
952: [
953: ac_cv_getlogin_r_style=1
954: ],
955: [
956: ac_cv_getlogin_r_style=2
957: ])
958: fi
959: if test -z "$ac_cv_getlogin_r_style"; then
960: AC_MSG_RESULT(no)
961: have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
962: else
963: if test $ac_cv_getlogin_r_style = 1; then
964: AC_DEFINE(GETLOGIN_R_RETURNS_INT)
965: AC_MSG_RESULT([yes, and it returns an int])
966: elif test $ac_cv_getlogin_r_style = 2; then
967: AC_DEFINE(GETLOGIN_R_RETURNS_POINTER)
968: AC_MSG_RESULT([yes, and it returns a pointer])
969: else
970: AC_MSG_RESULT(no: result is $ac_cv_getlogin_r_style)
971: have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
972: fi
973: fi
974: if test -n "$have_missing_r_funcs"; then
975: AC_MSG_WARN(missing reentrant functions: $have_missing_r_funcs)
976: fi
977: fi
1.1 frystyk 978:
1.28 frystyk 979: AC_MSG_CHECKING(whether to define _POSIX_SOURCE)
1.4 frystyk 980: AC_ARG_ENABLE(posix, [ --enable-posix define _POSIX_SOURCE],
1.28 frystyk 981: [ case "${enableval}" in
982: no)
983: AC_MSG_RESULT(no)
984: ;;
985: *)
986: AC_MSG_RESULT(yes)
987: AC_DEFINE(_POSIX_SOURCE) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
988: ;;
989: esac ],
990: AC_MSG_RESULT(no)
991: )
1.4 frystyk 992:
1.26 frystyk 993: AC_ARG_ENABLE(cyrillic, [ --enable-cyrillic include support for Cyrillic in line mode browser],
994: AC_DEFINE(CYRILLIC)
995: A_STDIO="a_stdio.o", A_STDIO="")
996: AC_SUBST(A_STDIO)
1.1 frystyk 997:
998: dnl Create output files
1.78 frystyk 999: AC_OUTPUT([Makefile libwww-config w3c-libwww.spec
1.11 frystyk 1000: config/Makefile
1.72 frystyk 1001: modules/Makefile
1002: modules/expat/Makefile modules/expat/xmltok/Makefile modules/expat/xmlparse/Makefile
1003: modules/md5/Makefile
1.3 frystyk 1004: Library/Makefile Library/User/Makefile Library/User/Patch/Makefile
1005: Library/User/Architecture/Makefile Library/User/Using/Makefile Library/User/Guide/Makefile
1.12 frystyk 1006: Library/User/Style/Makefile Library/User/Platform/Makefile
1.17 neon 1007: Library/Test/Makefile Library/Test/User/Makefile Library/Test/src/Makefile
1.83 kahan 1008: Library/src/Makefile Library/src/windows/Makefile Library/src/vms/Makefile
1009: Library/src/SSL/Makefile Library/src/SSL/windows/Makefile
1.11 frystyk 1010: Library/Examples/Makefile
1.60 frystyk 1011: Library/cvs2sql/Makefile
1.37 frystyk 1012: Library/External/Makefile
1.9 frystyk 1013: PICS-client/Makefile PICS-client/User/Makefile PICS-client/src/Makefile PICS-client/src/windows/Makefile
1.3 frystyk 1014: LineMode/Makefile LineMode/User/Makefile
1015: LineMode/src/Makefile LineMode/src/windows/Makefile LineMode/src/vms/Makefile
1.63 frystyk 1016: Robot/Makefile Robot/User/Makefile Robot/src/Makefile Robot/tcl/Makefile Robot/src/windows/Makefile
1.39 frystyk 1017: ComLine/Makefile ComLine/User/Makefile ComLine/src/Makefile ComLine/src/windows/Makefile
1.57 frystyk 1018: WinCom/Makefile WinCom/hlp/Makefile WinCom/res/Makefile
1.13 frystyk 1019: Icons/Makefile Icons/WWW/Makefile Icons/32x32/Makefile Icons/internal/Makefile
1.1 frystyk 1020: ], date>stamp-h)
Webmaster