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