Annotation of libwww/configure.in, revision 1.87
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.87 ! kahan 4: dnl @(#) $Id: configure.in,v 1.86 2000/07/31 10:45:04 kahan Exp $
1.1 frystyk 5:
1.87 ! kahan 6: AC_REVISION([$Id: configure.in,v 1.86 2000/07/31 10:45:04 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.87 ! kahan 20: VERSION=5.3.1
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.87 ! kahan 25: PREVIOUS_VERSION=5.3.0pre
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"
1.86 kahan 548: elif test -d '/usr/local/include/openssl'; then
549: sslinc="-I/usr/local/include/openssl"
1.83 kahan 550: elif test -d '/usr/include/ssl'; then
551: sslinc="-I/usr/include/ssl"
552: elif test -d '/usr/include/openssl'; then
553: sslinc="-I/usr/include/openssl"
554: else
555: sslinc=""
556: fi
1.84 kahan 557: WWWSSL=""
1.83 kahan 558: SSLINC=""
559: LIBSSL=""
560: LWWWSSL=""
561: LIBWWWSSL=""
562: WWWSSLEX=""
563: AC_ARG_WITH(ssl,
564: [ --with-ssl[=PATH] Link with OpenSSL.],
565: [ case "$withval" in
566: no)
567: AC_MSG_RESULT(no)
568: ;;
569: *)
570: if test "x$withval" = "xyes"; then
571: withval=$ssllib
572: SSLINC=$sslinc
573: fi
574: LIBS="$LIBS $withval"
575: AC_TRY_LINK([],
576: [ SSL_library_init(); ],
577: [],
578: [ AC_MSG_ERROR(Could not find the $withval libraries. You must first install openSSL.) ])
579: AC_MSG_RESULT(yes)
1.84 kahan 580: WWWSSL="libwwwssl.la"
1.83 kahan 581: LWWWSSL="-lwwwssl"
582: LIBWWWSSL='${top_builddir}/Library/src/SSL/libwwwssl.la'
583: WWWSSLEX="wwwssl"
584: ;;
585: esac ],
1.84 kahan 586: [ AC_MSG_RESULT(no) ])
587: AC_SUBST(WWWSSL)
1.83 kahan 588: AC_SUBST(SSLINC)
589: AC_SUBST(LWWWSSL)
590: AC_SUBST(LIBWWWSSL)
591: AC_SUBST(WWWSSLEX)
592:
1.28 frystyk 593: AC_MSG_CHECKING(whether to use internal signal handlers)
594: AC_ARG_ENABLE(signals, [ --enable-signals use internal libwww signal handler.],
595: [ case "${enableval}" in
596: no)
597: AC_MSG_RESULT(no)
598: ;;
599: *)
600: AC_MSG_RESULT(yes)
601: AC_DEFINE(WWWLIB_SIG)
602: ;;
603: esac ],
604: AC_MSG_RESULT(no)
605: )
1.26 frystyk 606:
1.28 frystyk 607: AC_MSG_CHECKING(whether to disable Nagle's algorithm)
608: AC_ARG_ENABLE(nagle,
1.30 frystyk 609: [ --disable-nagle Turning off Nagle's algorithm.],
1.28 frystyk 610: [ case "${enableval}" in
611: no)
612: AC_MSG_RESULT(yes)
613: AC_DEFINE(HT_NO_NAGLE)
614: ;;
615: *)
616: AC_MSG_RESULT(no)
617: ;;
618: esac ],
1.29 frystyk 619: AC_MSG_RESULT(yes)
620: AC_DEFINE(HT_NO_NAGLE)
1.28 frystyk 621: )
622:
1.40 frystyk 623: AC_MSG_CHECKING(whether to accept new rule files without asking an end user.)
624: AC_ARG_ENABLE(autorules,
625: [ --enable-autorules Enabling acceptance of rule files without user interaction.],
626: [ case "${enableval}" in
627: yes)
628: AC_MSG_RESULT(yes)
629: AC_DEFINE(HT_AUTOMATIC_RULES)
630: ;;
631: *)
632: AC_MSG_RESULT(no)
633: ;;
634: esac ],
635: AC_MSG_RESULT(no)
636: )
637:
1.30 frystyk 638: AC_MSG_CHECKING(whether to disable HTTP/1.1 pipelining)
639: AC_ARG_ENABLE(pipelining,
640: [ --disable-pipelining Turning off HTTP/1.1 Pipelining.],
641: [ case "${enableval}" in
642: no)
643: AC_MSG_RESULT(yes)
644: AC_DEFINE(HT_NO_PIPELINING)
1.41 frystyk 645: ;;
646: *)
647: AC_MSG_RESULT(no)
648: ;;
649: esac ],
650: AC_MSG_RESULT(no)
651: )
652:
653:
654: AC_MSG_CHECKING(whether to use MUX as transport for HTTP.)
655: AC_ARG_ENABLE(mux,
656: [ --enable-mux Enabling MUX as transport for HTTP.],
657: [ case "${enableval}" in
658: yes)
659: AC_MSG_RESULT(yes)
660: AC_DEFINE(HT_MUX)
1.30 frystyk 661: ;;
662: *)
663: AC_MSG_RESULT(no)
664: ;;
665: esac ],
666: AC_MSG_RESULT(no)
667: )
668:
1.28 frystyk 669: AC_MSG_CHECKING(whether to define _REENTRANT)
1.26 frystyk 670: AC_ARG_ENABLE(reentrant, [ --enable-reentrant define _REENTRANT to enable reentrant system calls],
1.28 frystyk 671: [ case "${enableval}" in
672: no)
673: AC_MSG_RESULT(no)
1.82 kahan 674: ac_cv_reentrant=no
1.28 frystyk 675: ;;
676: *)
677: AC_MSG_RESULT(yes)
678: AC_DEFINE(HT_REENTRANT) [CFLAGS="$CFLAGS -D_REENTRANT"]
1.82 kahan 679: ac_cv_reentrant=yes
1.28 frystyk 680: ;;
681: esac ],
682: AC_MSG_RESULT(no)
683: )
1.82 kahan 684:
685: if test "$ac_cv_reentrant" = "yes"; then
686:
687: AC_MSG_CHECKING(for ctime_r)
688: if test -z "$ac_cv_ctime_args"; then
689: AC_TRY_COMPILE(
690: [#include <time.h>],
691: [
692: time_t clock;
693: char buf[26];
694: ctime_r(&clock, buf);
695: ], ac_cv_ctime_args=2)
696: fi
697: if test -z "$ac_cv_ctime_args" ; then
698: AC_TRY_COMPILE(
699: [#include <time.h>],
700: [
701: time_t clock;
702: char buf[26];
703: ctime_r(&clock, buf, 26);
704: ], ac_cv_ctime_args=3)
705: fi
706: if test -z "$ac_cv_ctime_args"; then
707: AC_MSG_RESULT(no)
708: have_missing_r_funcs="$have_missing_r_funcs ctime_r"
709: else
710: if test "$ac_cv_ctime_args" = 2; then
711: AC_DEFINE(HAVE_CTIME_R_2)
712: elif test "$ac_cv_ctime_args" = 3; then
713: AC_DEFINE(HAVE_CTIME_R_3)
714: fi
715: AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
716: fi
717:
718: AC_MSG_CHECKING(for readdir_r)
719: if test -z "$ac_cv_readdir_args"; then
720: AC_TRY_COMPILE(
721: [
722: #include <sys/types.h>
723:
724: #if defined(HAVE_DIRENT_H)
725: # include <dirent.h>
726: # define NAMLEN(dirent) strlen((dirent)->d_name)
727: #else
728: # define dirent direct
729: # define NAMLEN(dirent) (dirent)->d_namlen
730: # if defined(HAVE_SYS_NDIR_H)
731: # include <sys/ndir.h>
732: # endif
733: # if defined(HAVE_SYS_DIR_H)
734: # include <sys/dir.h>
735: # endif
736: # if defined(HAVE_NDIR_H)
737: # include <ndir.h>
738: # endif
739: #endif ],
740: [
741: struct dirent dir, *dirp;
742: DIR *mydir;
743: dirp = readdir_r(mydir, &dir);
744: ], ac_cv_readdir_args=2)
745: fi
746: if test -z "$ac_cv_readdir_args"; then
747:
748: AC_TRY_COMPILE(
749: [
750: #include <sys/types.h>
751: #if defined(HAVE_DIRENT_H)
752: # include <dirent.h>
753: # define NAMLEN(dirent) strlen((dirent)->d_name)
754: #else
755: # define dirent direct
756: # define NAMLEN(dirent) (dirent)->d_namlen
757: # if defined(HAVE_SYS_NDIR_H)
758: # include <sys/ndir.h>
759: # endif
760: # if defined(HAVE_SYS_DIR_H)
761: # include <sys/dir.h>
762: # endif
763: # if defined(HAVE_NDIR_H)
764: # include <ndir.h>
765: # endif
766: #endif ],
767: [
768: struct dirent dir, *dirp;
769: DIR *mydir;
770: int rc;
771: rc = readdir_r(mydir, &dir, &dirp);
772: ], ac_cv_readdir_args=3)
773: fi
774:
775: if test -z "$ac_cv_readdir_args"; then
776: AC_MSG_RESULT(no)
777: have_missing_r_funcs="$have_missing_r_funcs readdir_r"
778: else
779: if test "$ac_cv_readdir_args" = 2; then
780: AC_DEFINE(HAVE_READDIR_R_2)
781: elif test "$ac_cv_readdir_args" = 3; then
782: AC_DEFINE(HAVE_READDIR_R_3)
783: fi
784: AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
785: fi
786:
787: AC_MSG_CHECKING(for gethostbyname_r)
788: if test -z "$ac_cv_gethostbyname_args"; then
789: AC_TRY_COMPILE(
790: [
791: #include <sys/types.h>
792: #include <netdb.h>],
793: [
794: struct hostent *hp;
795: struct hostent h;
796: char *name;
797: char buffer[10];
798: int h_errno;
799: hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);],
800: ac_cv_gethostbyname_args=5)
801: fi
802: if test -z "$ac_cv_gethostbyname_args"; then
803: AC_TRY_COMPILE(
804: [
805: #include <sys/types.h>
806: #include <netdb.h>],
807: [
808: struct hostent h;
809: struct hostent_data hdata;
810: char *name;
811: int rc;
812: rc = gethostbyname_r(name, &h, &hdata);],
813: ac_cv_gethostbyname_args=3)
814: fi
815: if test -z "$ac_cv_gethostbyname_args"; then
816: AC_TRY_COMPILE(
817: [
818: #include <sys/types.h>
819: #include <netdb.h>],
820: [
821: struct hostent h;
822: struct hostent *hp;
823: char *name;
824: char buf[10];
825: int rc;
826: int h_errno;
827:
828: rc = gethostbyname_r(name, &h, buf, 10, &hp, &h_errno);
829: ],
830: ac_cv_gethostbyname_args=6)
831: fi
832: if test -z "$ac_cv_gethostbyname_args"; then
833: AC_MSG_RESULT(no)
834: have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"
835: else
836: if test "$ac_cv_gethostbyname_args" = 3; then
837: AC_DEFINE(HAVE_GETHOSTBYNAME_R_3)
838: elif test "$ac_cv_gethostbyname_args" = 5; then
839: AC_DEFINE(HAVE_GETHOSTBYNAME_R_5)
840: elif test "$ac_cv_gethostbyname_args" = 6; then
841: AC_DEFINE(HAVE_GETHOSTBYNAME_R_6)
842: fi
843: AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments])
844: fi
845:
846: AC_MSG_CHECKING(for gethostbyaddr_r)
847: if test -z "$ac_cv_gethostbyaddr_args"; then
848: AC_TRY_COMPILE(
849: [
850: #include <sys/types.h>
851: #include <netdb.h>],
852: [
853: char * address;
854: int length;
855: int type;
856: struct hostent h;
857: struct hostent_data hdata;
858: int rc;
859: rc = gethostbyaddr_r(address, length, type, &h, &hdata);
860: ],
861: ac_cv_gethostbyaddr_args=5)
862:
863: fi
864: if test -z "$ac_cv_gethostbyaddr_args"; then
865: AC_TRY_COMPILE(
866: [
867: #include <sys/types.h>
868: #include <netdb.h>],
869: [
870: char * address;
871: int length;
872: int type;
873: struct hostent h;
874: char buffer[10];
875: int buflen;
876: int h_errnop;
877: struct hostent * hp;
878:
879: hp = gethostbyaddr_r(address, length, type, &h,
880: buffer, buflen, &h_errnop);
881: ],
882: ac_cv_gethostbyaddr_args=7)
883: fi
884:
885: if test -z "$ac_cv_gethostbyaddr_args"; then
886: AC_TRY_COMPILE(
887: [
888: #include <sys/types.h>
889: #include <netdb.h>],
890: [
891: char * address;
892: int length;
893: int type;
894: struct hostent h;
895: char buffer[10];
896: int buflen;
897: int h_errnop;
898: struct hostent * hp;
899: int rc;
900:
901: rc = gethostbyaddr_r(address, length, type, &h,
902: buffer, buflen, &hp, &h_errnop);
903: ],
904: ac_cv_gethostbyaddr_args=8)
905: fi
906: if test -z "$ac_cv_gethostbyaddr_args"; then
907: AC_MSG_RESULT(no)
908: have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"
909: else
910: if test "$ac_cv_gethostbyaddr_args" = 5; then
911: AC_DEFINE(HAVE_GETHOSTBYADDR_R_5)
912: elif test "$ac_cv_gethostbyaddr_args" = 7; then
913: AC_DEFINE(HAVE_GETHOSTBYADDR_R_7)
914: elif test "$ac_cv_gethostbyaddr_args" = 8; then
915: AC_DEFINE(HAVE_GETHOSTBYADDR_R_8)
916: fi
917: AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyaddr_args arguments])
918: fi
919:
920: AC_MSG_CHECKING(for getlogin_r)
921: if test -z "$ac_cv_getlogin_r_style"; then
922: AC_TRY_RUN(
923: [
924: #include <unistd.h>
925:
926: int main()
927: {
928: char name[1024];
929: int len=1024;
930: int rc;
931: char *login;
932:
933: name[0]='\0';
934:
935: rc = getlogin_r(name, len);
936: if(rc == 0 && name[0] != '\0')
937: {
938: return 0; /* returns zero on success */
939: }
940: else if(rc != 0 && name[0] == '\0')
941: {
942: return 0; /* returns errno on failure */
943: }
944: else if(rc == 0 && name[0] == '\0')
945: {
946: return 0; /* can't tell */
947: }
948: else if(rc != 0 && name[0] != '\0')
949: {
950: return 1; /* returns pointer on success */
951: }
952: }
953: ],
954: [
955: ac_cv_getlogin_r_style=1
956: ],
957: [
958: ac_cv_getlogin_r_style=2
959: ])
960: fi
961: if test -z "$ac_cv_getlogin_r_style"; then
962: AC_MSG_RESULT(no)
963: have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
964: else
965: if test $ac_cv_getlogin_r_style = 1; then
966: AC_DEFINE(GETLOGIN_R_RETURNS_INT)
967: AC_MSG_RESULT([yes, and it returns an int])
968: elif test $ac_cv_getlogin_r_style = 2; then
969: AC_DEFINE(GETLOGIN_R_RETURNS_POINTER)
970: AC_MSG_RESULT([yes, and it returns a pointer])
971: else
972: AC_MSG_RESULT(no: result is $ac_cv_getlogin_r_style)
973: have_missing_r_funcs="$have_missing_r_funcs getlogin_r"
974: fi
975: fi
976: if test -n "$have_missing_r_funcs"; then
977: AC_MSG_WARN(missing reentrant functions: $have_missing_r_funcs)
978: fi
979: fi
1.1 frystyk 980:
1.28 frystyk 981: AC_MSG_CHECKING(whether to define _POSIX_SOURCE)
1.4 frystyk 982: AC_ARG_ENABLE(posix, [ --enable-posix define _POSIX_SOURCE],
1.28 frystyk 983: [ case "${enableval}" in
984: no)
985: AC_MSG_RESULT(no)
986: ;;
987: *)
988: AC_MSG_RESULT(yes)
989: AC_DEFINE(_POSIX_SOURCE) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
990: ;;
991: esac ],
992: AC_MSG_RESULT(no)
993: )
1.4 frystyk 994:
1.26 frystyk 995: AC_ARG_ENABLE(cyrillic, [ --enable-cyrillic include support for Cyrillic in line mode browser],
996: AC_DEFINE(CYRILLIC)
997: A_STDIO="a_stdio.o", A_STDIO="")
998: AC_SUBST(A_STDIO)
1.1 frystyk 999:
1000: dnl Create output files
1.78 frystyk 1001: AC_OUTPUT([Makefile libwww-config w3c-libwww.spec
1.11 frystyk 1002: config/Makefile
1.72 frystyk 1003: modules/Makefile
1004: modules/expat/Makefile modules/expat/xmltok/Makefile modules/expat/xmlparse/Makefile
1005: modules/md5/Makefile
1.3 frystyk 1006: Library/Makefile Library/User/Makefile Library/User/Patch/Makefile
1007: Library/User/Architecture/Makefile Library/User/Using/Makefile Library/User/Guide/Makefile
1.12 frystyk 1008: Library/User/Style/Makefile Library/User/Platform/Makefile
1.17 neon 1009: Library/Test/Makefile Library/Test/User/Makefile Library/Test/src/Makefile
1.83 kahan 1010: Library/src/Makefile Library/src/windows/Makefile Library/src/vms/Makefile
1011: Library/src/SSL/Makefile Library/src/SSL/windows/Makefile
1.11 frystyk 1012: Library/Examples/Makefile
1.60 frystyk 1013: Library/cvs2sql/Makefile
1.37 frystyk 1014: Library/External/Makefile
1.9 frystyk 1015: PICS-client/Makefile PICS-client/User/Makefile PICS-client/src/Makefile PICS-client/src/windows/Makefile
1.3 frystyk 1016: LineMode/Makefile LineMode/User/Makefile
1017: LineMode/src/Makefile LineMode/src/windows/Makefile LineMode/src/vms/Makefile
1.63 frystyk 1018: Robot/Makefile Robot/User/Makefile Robot/src/Makefile Robot/tcl/Makefile Robot/src/windows/Makefile
1.39 frystyk 1019: ComLine/Makefile ComLine/User/Makefile ComLine/src/Makefile ComLine/src/windows/Makefile
1.57 frystyk 1020: WinCom/Makefile WinCom/hlp/Makefile WinCom/res/Makefile
1.13 frystyk 1021: Icons/Makefile Icons/WWW/Makefile Icons/32x32/Makefile Icons/internal/Makefile
1.1 frystyk 1022: ], date>stamp-h)
Webmaster