Annotation of libwww/configure.in, revision 1.49
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.49 ! frystyk 4: dnl @(#) $Id: configure.in,v 1.48 1998/02/07 23:59:07 frystyk Exp $
1.1 frystyk 5:
1.49 ! frystyk 6: AC_REVISION([$Id: configure.in,v 1.48 1998/02/07 23:59:07 frystyk Exp $])
1.1 frystyk 7: AC_PREREQ(2.2)
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.49 ! frystyk 20: VERSION=5.1j
1.1 frystyk 21: AC_SUBST(VERSION)
22: AC_DEFINE_UNQUOTED(W3C_VERSION, "$VERSION")
23:
1.41 frystyk 24: AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
1.43 frystyk 25: AM_CONFIG_HEADER(config.h)
1.41 frystyk 26:
27: AC_SUBST(PURIFY_CACHE)
28:
29: dnl Regular configure...
1.1 frystyk 30: AC_PROG_CC
31: AC_PROG_RANLIB
1.41 frystyk 32: AC_PROG_MAKE_SET
33:
1.1 frystyk 34: dnl Remove next line and you get an error -- autoconf
35: dnl should deal with this automatically.
36: AC_ISC_POSIX
37: AC_PATH_X
1.7 frystyk 38: dnl AC_PATH_XTRA Causes problems...
1.1 frystyk 39:
1.28 frystyk 40: dnl Default location of icons
41: icondir="/usr/local/share/w3c-icons"
42: AC_SUBST(icondir)
43: AC_DEFINE_UNQUOTED(W3C_ICONS, "$icondir")
44:
45: dnl Default location of TcL library and include files
46: tclinclude="/usr/local/include"
47: AC_SUBST(tclinclude)
48: libtcl="/usr/local/lib/libtcl7.5.a"
49: AC_SUBST(libtcl)
50: AC_DEFINE_UNQUOTED(W3C_TCL, "$libtcl")
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
70: ;;
1.28 frystyk 71: *)
72: AC_MSG_RESULT(no)
73: ;;
1.5 frystyk 74: esac
1.1 frystyk 75:
1.31 frystyk 76: dnl Checks for configuration arguments
77:
78: AC_MSG_CHECKING(whether to support direct WAIS access - a bit rusty!)
79: AC_ARG_WITH(wais,
80: [ --with-wais[=PATH] Compile with support for direct WAIS access.],
81: [ case "$withval" in
82: no)
83: AC_MSG_RESULT(no)
84: HTWAIS=""
85: ;;
86: *)
87: AC_MSG_RESULT(yes)
88: if test "x$withval" = "xyes"; then
89: withval="-lclient.a -lwais.a"
90: fi
91: LIBS="$withval $LIBS"
92: AC_TRY_LINK([],
93: [ interpret_message(); ],
94: [],
95: [ AC_MSG_ERROR(Could not find the $withval library. You must first install WAIS.) ])
96: HTWAIS="HTWAIS.o"
97: ;;
98: esac ],
99: AC_MSG_RESULT(no)
1.18 frystyk 100: HTWAIS=""
1.31 frystyk 101: )
1.1 frystyk 102: AC_SUBST(HTWAIS)
103:
1.31 frystyk 104: AC_MSG_CHECKING(whether to support zlib compress/decompress)
105: AC_ARG_WITH(zlib,
106: [ --with-zlib[=PATH] Compile with zlib compress/decompress support.],
107: [ case "$withval" in
108: no)
109: AC_MSG_RESULT(no)
1.33 eric 110: HTZLIB=""
1.31 frystyk 111: ;;
112: *)
113: AC_MSG_RESULT(yes)
114: if test "x$withval" = "xyes"; then
115: withval="-lz"
116: fi
117: LIBS="$withval $LIBS"
1.35 frystyk 118: AC_DEFINE(HT_ZLIB)
1.31 frystyk 119: AC_TRY_LINK([],
120: [ zlibVersion(); ],
121: [],
122: [ AC_MSG_ERROR(Could not find the $withval library. You must first install zlib.) ])
1.33 eric 123: HTZLIB="HTZip.o"
1.31 frystyk 124: ;;
125: esac ],
126: AC_MSG_RESULT(no)
1.33 eric 127: HTZLIB=""
1.31 frystyk 128: )
1.33 eric 129: AC_SUBST(HTZLIB)
1.43 frystyk 130:
131: AC_MSG_CHECKING(whether to support POSIX regex)
132: AC_ARG_WITH(regex,
133: [ --with-regex[=PATH] Compile with POSIC regex library support.],
134: [ case "$withval" in
135: no)
136: AC_MSG_RESULT(no)
137: ;;
138: *)
139: AC_MSG_RESULT(yes)
1.46 frystyk 140: AC_DEFINE(HT_POSIX_REGEX)
1.43 frystyk 141: if test "x$withval" = "xyes"; then
1.46 frystyk 142: AC_CHECK_LIB(rx, regexec,
143: [ LIBS="-lrx $LIBS" ],
144: [ AC_CHECK_LIB(c, regexec,
145: [],
146: [ AC_MSG_ERROR(Could not find a POSIX regex library. You must first install regex.) ] ) ] )
147: else
148: LIBS="$withval $LIBS"
149: AC_TRY_LINK([],
150: [ regexec(); ],
151: [],
152: [ AC_MSG_ERROR(Could not find the $withval library. You must first install regex.) ] )
1.43 frystyk 153: fi
154: ;;
155: esac ],
156: AC_MSG_RESULT(no)
157: )
1.31 frystyk 158:
1.26 frystyk 159: # borrowed from SSH - thanks!
160: AC_MSG_CHECKING(whether to support SOCKS)
161: AC_ARG_WITH(socks,
162: [ --with-socks Compile with SOCKS firewall traversal support.],
163: [ case "$withval" in
164: no)
165: AC_MSG_RESULT(no)
166: ;;
167: yes)
168: AC_MSG_RESULT(yes)
169: AC_CHECK_LIB(socks5, SOCKSconnect, [
170: socks=5
171: LIBS="-lsocks5 $LIBS"], [
172: AC_CHECK_LIB(socks, Rconnect, [
173: socks=4
174: LIBS="-lsocks $LIBS"], [
175: AC_MSG_ERROR(Could not find socks library. You must first install socks.) ] ) ] )
176: ;;
177: esac ],
178: AC_MSG_RESULT(no)
1.1 frystyk 179: )
180:
1.26 frystyk 181: if test "x$socks" = "x"; then
182: AC_MSG_CHECKING(whether to support SOCKS5)
183: AC_ARG_WITH(socks5,
184: [ --with-socks5[=PATH] Compile with SOCKS5 firewall traversal support.],
185: [ case "$withval" in
186: no)
187: AC_MSG_RESULT(no)
188: ;;
189: *)
190: AC_MSG_RESULT(yes)
191: socks=5
192: if test "x$withval" = "xyes"; then
193: withval="-lsocks5"
194: fi
195: LIBS="$withval $LIBS"
196: AC_TRY_LINK([],
197: [ SOCKSconnect(); ],
198: [],
199: [ AC_MSG_ERROR(Could not find the $withval library. You must first install socks5.) ])
200: ;;
201: esac ],
202: AC_MSG_RESULT(no)
203: )
204: fi
205:
206: if test "x$socks" = "x"; then
207: AC_MSG_CHECKING(whether to support SOCKS4)
208: AC_ARG_WITH(socks4,
209: [ --with-socks4[=PATH] Compile with SOCKS4 firewall traversal support.],
210: [ case "$withval" in
211: no)
212: AC_MSG_RESULT(no)
213: ;;
214: *)
215: AC_MSG_RESULT(yes)
216: socks=4
217: if test "x$withval" = "xyes"; then
218: withval="-lsocks"
219: fi
220: LIBS="$withval $LIBS"
221: AC_TRY_LINK([],
222: [ Rconnect(); ],
223: [],
224: [ AC_MSG_ERROR(Could not find the $withval library. You must first install socks.) ])
225: ;;
226: esac ],
227: AC_MSG_RESULT(no)
228: )
229: fi
230:
231: if test "x$socks" = "x4"; then
232: AC_DEFINE(SOCKS)
233: AC_DEFINE(SOCKS4)
234: fi
235:
236: if test "x$socks" = "x5"; then
237: AC_DEFINE(SOCKS)
238: AC_DEFINE(SOCKS5)
239: fi
240:
1.28 frystyk 241: AC_MSG_CHECKING(whether to use internal signal handlers)
242: AC_ARG_ENABLE(signals, [ --enable-signals use internal libwww signal handler.],
243: [ case "${enableval}" in
244: no)
245: AC_MSG_RESULT(no)
246: ;;
247: *)
248: AC_MSG_RESULT(yes)
249: AC_DEFINE(WWWLIB_SIG)
250: ;;
251: esac ],
252: AC_MSG_RESULT(no)
253: )
1.26 frystyk 254:
1.28 frystyk 255: AC_MSG_CHECKING(whether to disable Nagle's algorithm)
256: AC_ARG_ENABLE(nagle,
1.30 frystyk 257: [ --disable-nagle Turning off Nagle's algorithm.],
1.28 frystyk 258: [ case "${enableval}" in
259: no)
260: AC_MSG_RESULT(yes)
261: AC_DEFINE(HT_NO_NAGLE)
262: ;;
263: *)
264: AC_MSG_RESULT(no)
265: ;;
266: esac ],
1.29 frystyk 267: AC_MSG_RESULT(yes)
268: AC_DEFINE(HT_NO_NAGLE)
1.28 frystyk 269: )
270:
1.40 frystyk 271: AC_MSG_CHECKING(whether to accept new rule files without asking an end user.)
272: AC_ARG_ENABLE(autorules,
273: [ --enable-autorules Enabling acceptance of rule files without user interaction.],
274: [ case "${enableval}" in
275: yes)
276: AC_MSG_RESULT(yes)
277: AC_DEFINE(HT_AUTOMATIC_RULES)
278: ;;
279: *)
280: AC_MSG_RESULT(no)
281: ;;
282: esac ],
283: AC_MSG_RESULT(no)
284: )
285:
1.30 frystyk 286: AC_MSG_CHECKING(whether to disable HTTP/1.1 pipelining)
287: AC_ARG_ENABLE(pipelining,
288: [ --disable-pipelining Turning off HTTP/1.1 Pipelining.],
289: [ case "${enableval}" in
290: no)
291: AC_MSG_RESULT(yes)
292: AC_DEFINE(HT_NO_PIPELINING)
1.41 frystyk 293: ;;
294: *)
295: AC_MSG_RESULT(no)
296: ;;
297: esac ],
298: AC_MSG_RESULT(no)
299: )
300:
301:
302: AC_MSG_CHECKING(whether to use MUX as transport for HTTP.)
303: AC_ARG_ENABLE(mux,
304: [ --enable-mux Enabling MUX as transport for HTTP.],
305: [ case "${enableval}" in
306: yes)
307: AC_MSG_RESULT(yes)
308: AC_DEFINE(HT_MUX)
1.30 frystyk 309: ;;
310: *)
311: AC_MSG_RESULT(no)
312: ;;
313: esac ],
314: AC_MSG_RESULT(no)
315: )
316:
1.28 frystyk 317: AC_MSG_CHECKING(whether to define _REENTRANT)
1.26 frystyk 318: AC_ARG_ENABLE(reentrant, [ --enable-reentrant define _REENTRANT to enable reentrant system calls],
1.28 frystyk 319: [ case "${enableval}" in
320: no)
321: AC_MSG_RESULT(no)
322: ;;
323: *)
324: AC_MSG_RESULT(yes)
325: AC_DEFINE(HT_REENTRANT) [CFLAGS="$CFLAGS -D_REENTRANT"]
326: ;;
327: esac ],
328: AC_MSG_RESULT(no)
329: )
1.1 frystyk 330:
1.28 frystyk 331: AC_MSG_CHECKING(whether to define _POSIX_SOURCE)
1.4 frystyk 332: AC_ARG_ENABLE(posix, [ --enable-posix define _POSIX_SOURCE],
1.28 frystyk 333: [ case "${enableval}" in
334: no)
335: AC_MSG_RESULT(no)
336: ;;
337: *)
338: AC_MSG_RESULT(yes)
339: AC_DEFINE(_POSIX_SOURCE) [CFLAGS="$CFLAGS -D_POSIX_SOURCE"]
340: ;;
341: esac ],
342: AC_MSG_RESULT(no)
343: )
1.4 frystyk 344:
1.26 frystyk 345: AC_ARG_ENABLE(cyrillic, [ --enable-cyrillic include support for Cyrillic in line mode browser],
346: AC_DEFINE(CYRILLIC)
347: A_STDIO="a_stdio.o", A_STDIO="")
348: AC_SUBST(A_STDIO)
1.4 frystyk 349:
1.1 frystyk 350: dnl Checks for programs.
351: AC_PROG_INSTALL
352: AC_PROG_RANLIB
353:
354: AC_CHECK_PROGS(have_telnet, telnet)
355: if test -n "$have_telnet" ; then
356: AC_DEFINE_UNQUOTED(TELNET_PROGRAM, "$have_telnet")
357: fi
358: AC_CHECK_PROGS(have_rlogin, rlogin)
359: if test -n "$have_rlogin" ; then
360: AC_DEFINE_UNQUOTED(RLOGIN_PROGRAM, "$have_rlogin")
361: fi
362: AC_CHECK_PROGS(have_tn3270, tn3270 x3270)
363: if test -n "$have_tn3270" ; then
364: AC_DEFINE_UNQUOTED(TN3270_PROGRAM, "$have_tn3270")
365: fi
366:
367: AC_PATH_PROG(RM, rm, rm)
368: AC_PATH_PROG(AR, ar, ar)
369: AC_PATH_PROG(MKDIR, mkdir, mkdir)
370: AC_PATH_PROG(CHMOD, chmod, chmod)
371: AC_PATH_PROG(CP, cp, cp)
372: AC_PATH_PROG(TAR, tar, tar)
373: AC_PATH_PROG(CVS, cvs, cvs)
374: AC_PATH_PROG(SED, sed, sed)
375: AC_PATH_PROGS(COMPRESS, gzip compress, compress)
376: AC_PROG_LN_S
377:
378: dnl One remaining platform-specific difference in the library is the
379: dnl default postscript and image viewers: On the NeXT they are "open,"
380: dnl on other platforms they are ghostview or xv. We should decide
381: dnl how to handle these things; perhaps the following lines would be
382: dnl useful:
383: dnl AC_PATH_PROGS(postscript_viewer, open ghostview, ghostview)
384: dnl AC_DEFINE_UNQUOTED(PRESENT_POSTSCRIPT, "$postscript_viewer %s")
385: dnl AC_PATH_PROGS(image_viewer, open xv, xv)
386: dnl AC_DEFINE_UNQUOTED(PRESENT_IMAGE, "$image_viewer %s")
387:
388: dnl Checks for misc files
389: dnl AC_FILE_RESOLV_CONF
1.5 frystyk 390: AC_PATH_PROG(have_resolv_conf, resolv.conf, , /etc, /usr/etc)
391: if test -n "$have_resolv_conf" ; then
392: AC_DEFINE_UNQUOTED(RESOLV_CONF, "$have_resolv_conf")
393: fi
1.22 frystyk 394:
1.1 frystyk 395: dnl Checks for libraries:
1.7 frystyk 396: AC_CHECK_LIB(ICE, IceConnectionNumber)
397: AC_CHECK_LIB(socket, socket)
398: AC_CHECK_LIB(inet, connect)
399: AC_CHECK_LIB(nsl, t_accept)
1.20 frystyk 400: AC_CHECK_LIB(dl, dlopen)
1.1 frystyk 401:
402: dnl Checks for header files:
403: AC_CHECK_HEADERS(stdio.h)
404: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
1.38 frystyk 405: AC_CHECK_HEADERS(sys/file.h)
406: AC_CHECK_HEADERS(sys/ioctl.h)
407: AC_CHECK_HEADERS(sys/ipc.h)
1.1 frystyk 408: AC_CHECK_HEADERS(sys/limits.h limits.h)
1.38 frystyk 409: AC_CHECK_HEADERS(sys/resource.h resource.h)
410: AC_CHECK_HEADERS(sys/select.h select.h)
411: AC_CHECK_HEADERS(sys/socket.h socket.h)
1.1 frystyk 412: AC_CHECK_HEADERS(sys/stat.h stat.h)
1.38 frystyk 413: AC_CHECK_HEADERS(sys/systeminfo.h)
1.1 frystyk 414: AC_CHECK_HEADERS(sys/time.h time.h)
1.38 frystyk 415: AC_CHECK_HEADERS(sys/types.h types.h)
416: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
1.1 frystyk 417: AC_CHECK_HEADERS(string.h strings.h)
418: AC_CHECK_HEADERS(syslog.h)
419: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
1.38 frystyk 420: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
1.28 frystyk 421: AC_CHECK_HEADERS(netinet/tcp.h tcp.h)
1.1 frystyk 422: AC_CHECK_HEADERS(netinet/in.h in.h)
423: AC_CHECK_HEADERS(dn.h)
1.38 frystyk 424: AC_CHECK_HEADERS(termios.h)
1.1 frystyk 425: AC_CHECK_HEADERS(pwd.h)
426: AC_CHECK_HEADERS(grp.h)
427: AC_CHECK_HEADERS(arpa/inet.h inet.h)
428: AC_CHECK_HEADERS(netdb.h)
429: AC_CHECK_HEADERS(manifest.h)
430: AC_CHECK_HEADERS(bsdtypes.h)
431: AC_CHECK_HEADERS(stdefs.h)
432: AC_CHECK_HEADERS(bsdtime.h)
433: AC_CHECK_HEADERS(dnetdb.h)
434: AC_CHECK_HEADERS(libc.h)
435: AC_CHECK_HEADERS(stdlib.h)
436: AC_CHECK_HEADERS(malloc.h)
437: AC_CHECK_HEADERS(memory.h)
438: AC_CHECK_HEADERS(unixlib.h)
439: AC_CHECK_HEADERS(ctype.h)
440: AC_CHECK_HEADERS(cursesX.h curses.h)
1.46 frystyk 441: AC_CHECK_HEADERS(rxposix.h regex.h)
1.1 frystyk 442: AC_HEADER_DIRENT
443: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
444: AC_HEADER_STDC
445: AC_HEADER_SYS_WAIT
446: AC_HEADER_TIME
447: AC_HEADER_STAT
448:
449: dnl Checks for typedefs, structures, and compiler characteristics:
450: AC_TYPE_UID_T
1.5 frystyk 451: AC_TYPE_PID_T
1.1 frystyk 452: AC_TYPE_GETGROUPS
453: AC_TYPE_MODE_T
454: AC_TYPE_SIZE_T
455: AC_CHECK_TYPE(BOOLEAN, char)
456: AC_CHECK_TYPE(u_char, unsigned char)
457: AC_CHECK_TYPE(u_short, unsigned short)
458: AC_CHECK_TYPE(u_long, unsigned long)
1.6 frystyk 459: AC_CHECK_SIZEOF(int)
460: AC_CHECK_SIZEOF(long)
1.1 frystyk 461: AC_C_CONST
462: AC_C_BIGENDIAN
463: AC_C_CHAR_UNSIGNED
464: AC_STRUCT_TM
465: AC_STRUCT_GMTOFF
466: AC_STRUCT_TIMEZONE
467: AC_STRUCT_WINSIZE
468: AC_HEADER_TIME
469:
470: dnl Other types that aren't checked for, but maybe should be:
1.5 frystyk 471: dnl AC_TYPE_OFF_T AC_STRUCT_ST_RDEV
1.1 frystyk 472:
473: dnl Checks for library functions:
474: AC_TYPE_SIGNAL
475: AC_FUNC_VPRINTF
476: AC_FUNC_STRFTIME
1.42 frystyk 477: AC_CHECK_FUNCS(getcwd gethostname getdomainname getwd \
1.1 frystyk 478: select socket strerror strtol opendir getpid strchr memcpy \
1.42 frystyk 479: getlogin getpass fcntl readdir sysinfo ioctl chdir tempnam \
480: getsockopt setsockopt \
481: gettimeofday mktime timegm)
1.1 frystyk 482: AC_CHECK_FUNC(unlink, , AC_CHECK_FUNC(remove, AC_DEFINE(unlink, remove)))
483:
484: dnl Checks for external globals.
485: dnl AC_CHECK_EXTERNS(socket_errno sys_errlist sys_nerr)
486:
487: dnl This is the standard UNIX value
488: AC_DEFINE(CACHE_FILE_PREFIX, "/usr/wsrc/")
489:
490: dnl THINGS TO CONSIDER
491: dnl ******************
492: AC_DEFINE(TTY_IS_SELECTABLE)
493:
494: dnl HT_REENTRANT
495: dnl POLL_PORTS
496: dnl NOT_ASCII
497: dnl ******************
498:
499: dnl Create output files
500: AC_OUTPUT([Makefile
1.11 frystyk 501: config/Makefile
1.3 frystyk 502: Library/Makefile Library/User/Makefile Library/User/Patch/Makefile
503: Library/User/Architecture/Makefile Library/User/Using/Makefile Library/User/Guide/Makefile
1.12 frystyk 504: Library/User/Style/Makefile Library/User/Platform/Makefile
1.17 neon 505: Library/Test/Makefile Library/Test/User/Makefile Library/Test/src/Makefile
1.3 frystyk 506: Library/src/Makefile Library/src/windows/Makefile Library/src/vms/Makefile
1.11 frystyk 507: Library/Examples/Makefile
1.37 frystyk 508: Library/External/Makefile
1.9 frystyk 509: PICS-client/Makefile PICS-client/User/Makefile PICS-client/src/Makefile PICS-client/src/windows/Makefile
1.3 frystyk 510: LineMode/Makefile LineMode/User/Makefile
511: LineMode/src/Makefile LineMode/src/windows/Makefile LineMode/src/vms/Makefile
1.13 frystyk 512: Robot/Makefile Robot/User/Makefile Robot/src/Makefile Robot/src/windows/Makefile
1.39 frystyk 513: ComLine/Makefile ComLine/User/Makefile ComLine/src/Makefile ComLine/src/windows/Makefile
1.34 frystyk 514: MiniServ/Makefile MiniServ/User/Makefile MiniServ/src/Makefile
1.3 frystyk 515: Listen/Makefile Listen/User/Makefile Listen/src/Makefile
1.13 frystyk 516: Icons/Makefile Icons/WWW/Makefile Icons/32x32/Makefile Icons/internal/Makefile
1.1 frystyk 517: ], date>stamp-h)
Webmaster