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