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