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