diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-11-10 19:47:00 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-11-10 19:47:00 -0500 |
commit | d3f9d5478df478427c2aa5db4507ddd0a38f0eb6 (patch) | |
tree | e27eacd6bbda653dd77f11cc020b9e0a59f7f4fc /configure.in | |
parent | 18024037b515bfff83e0230b35151babe6005e18 (diff) | |
download | lynx-snapshots-d3f9d5478df478427c2aa5db4507ddd0a38f0eb6.tar.gz |
snapshot of project "lynx", label v2-8-2dev_2
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 241 |
1 files changed, 213 insertions, 28 deletions
diff --git a/configure.in b/configure.in index 49051ce8..0c86a0e4 100644 --- a/configure.in +++ b/configure.in @@ -4,9 +4,14 @@ dnl by T.E.Dickey <dickey@clark.net> dnl and Jim Spath <jspath@mail.bcpl.lib.md.us> AC_PREREQ(2.12) +rm -f config.cache + AC_INIT(userdefs.h) AC_CONFIG_HEADER(lynx_cfg.h:config.hin) +dnl Set of available languages (wishful thinking :-). +ALL_LINGUAS="de es fr it ko nl no pl pt sl sv" + AC_PREFIX_DEFAULT(/usr/local) AC_CANONICAL_HOST @@ -22,6 +27,9 @@ CF_MAKE_INCLUDE AC_PROG_INSTALL AC_CHECK_PROGS(LINT, lint alint lclint tdlint, []) +AC_AIX +AC_ISC_POSIX + dnl -------------------------------------------------------------------------- dnl Debug/development/test dnl -------------------------------------------------------------------------- @@ -31,6 +39,14 @@ Development Options:) CF_DISABLE_ECHO +# special case for WWW/* +if test -n "$ECHO_CC" ; then + DONT_ECHO_CC="$SHOW_CC ;" +else + DONT_ECHO_CC='' +fi +AC_SUBST(DONT_ECHO_CC) + AC_MSG_CHECKING(if you want to check memory-leaks) CF_ARG_ENABLE(find-leaks, [ --enable-find-leaks logic for testing memory leaks], @@ -56,17 +72,17 @@ if test "$with_debug" = "yes" ; then esac else case $host_os in - ultrix*|osf*) #(vi + osf*) #(vi + test -z "$GCC" && CFLAGS="$CFLAGS -std1" CF_STRIP_G_OPT(CFLAGS) ;; *) - CF_STRIP_G_OPT(CFLAGS) + CF_STRIP_G_OPT(CFLAGS) ;; esac fi - if test -n "$GCC" then AC_MSG_CHECKING(if you want to turn on gcc warnings) @@ -88,6 +104,40 @@ dnl -------------------------------------------------------------------------- CF_HELP_MESSAGE( Basic Configuration Options:) +dnl internationalization macros +AM_GNU_GETTEXT + +INTLDIR_MAKE= +MSG_DIR_MAKE= +SUB_MAKEFILE= +if test "$USE_INCLUDED_LIBINTL" = yes ; then + SUB_MAKEFILE="intl/makefile po/makefile.in" +elif test "$USE_NLS" = yes ; then + AC_CHECK_HEADERS(libintl.h) + SUB_MAKEFILE="po/makefile.in" + INTLDIR_MAKE="#" +else + INTLDIR_MAKE="#" + MSG_DIR_MAKE="#" +fi +AC_SUBST(INTLDIR_MAKE) +AC_SUBST(MSG_DIR_MAKE) + +dnl FIXME: the underlying AM_GNU_GETTEXT macro either needs some fixes or a +dnl little documentation. It doesn't define anything so that we can ifdef our +dnl own code, except ENABLE_NLS, which is too vague to be of any use. + +if test "$USE_INCLUDED_LIBINTL" = yes ; then + if test "$nls_cv_force_use_gnu_gettext" = yes ; then + AC_DEFINE(HAVE_GETTEXT) + elif test "$nls_cv_use_gnu_gettext" = yes ; then + AC_DEFINE(HAVE_GETTEXT) + fi + if test -n "$nls_cv_header_intl" ; then + AC_DEFINE(HAVE_LIBINTL_H) + fi +fi + AC_MSG_CHECKING(if you want full utility pathnames) CF_ARG_DISABLE(full-paths, [ --disable-full-paths control whether full utility pathnames are used], @@ -142,19 +192,20 @@ AC_C_CONST dnl Only add to this case statement things that we cannot design tests for. PROG_EXT= +TRY_CFLAGS= case $host_os in aix4*) - CFLAGS="$CFLAGS -DAIX4 -D_BSD=44" + CFLAGS="$CFLAGS -DAIX4 -D_BSD=44 -D_AIX" LIBS="$LIBS -lbsd" ;; aix*) LIBS="$LIBS -lbsd" ;; apollo*) - CFLAGS="$CFLAGS -D_BUILTINS -W0,-opt,4" + TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4" ;; bsdi*) - CFLAGS="$CFLAGS -DBSDI" + CFLAGS="$CFLAGS -DBSDI" ;; clix*) # Tested on CLIX 3.1 (T.Dickey). The original makefile entry @@ -166,10 +217,10 @@ convex*) CFLAGS="$CFLAGS -D__STDC__ -Dunix" ;; dgux*) - CFLAGS="$CFLAGS -DDGUX" + CFLAGS="$CFLAGS -DDGUX" ;; hpux*) - CFLAGS="$CFLAGS -DSNAKE" + CFLAGS="$CFLAGS -DSNAKE" ;; isc*) # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is. @@ -180,10 +231,10 @@ irix*) # The original makefile used the $CFLAGS option -cckr for some form # of K&R compatibility. However, this causes compilation warnings for # varargs on IRIX 5.2, and does not appear to be needed. - #removed: CFLAGS="$CFLAGS -cckr" + #removed: CFLAGS="$CFLAGS -cckr" ;; linux*) - CFLAGS="$CFLAGS -DLINUX" + CFLAGS="$CFLAGS -DLINUX" ;; next*) CFLAGS="$CFLAGS -DNEXT -DXMOSAIC_HACK" @@ -197,13 +248,18 @@ os2*) LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"` PROG_EXT=".exe" ;; +osf4*) + # The -Olimit flag (see below) is no longer available with + # Digital C 5.2, which is bundled with Digital UNIX 4.0. + CFLAGS="$CFLAGS -DDSYS5" + ;; osf*) # Increase the maximum size of functions that will be optimized. - test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 4000" + test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000" CFLAGS="$CFLAGS -DDSYS5" ;; sco3.2v5*) - test $ac_cv_prog_gcc != yes && CC="cc -belf" + test $ac_cv_prog_gcc != yes && TRY_CFLAGS="$TRY_CFLAGS -belf" ;; sco*) LIBS="$LIBS -lmalloc" @@ -238,22 +294,55 @@ sunos4*) ;; ultrix*) # Increase the maximum size of functions that will be optimized. - test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 600 -G 7" - CFLAGS="$CFLAGS -DULTRIX" - AC_CHECK_HEADERS(cursesX.h, cf_cv_ncurses_header=cursesX.h) + test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7" + CFLAGS="$CFLAGS -DULTRIX" + AC_CHECK_HEADERS(cursesX.h, + [AC_DEFINE(HAVE_CURSESX_H) + cf_cv_ncurses_header=cursesX.h]) ;; esac AC_SUBST(PROG_EXT) +dnl Collect tests for compiler options into one place +if test -n "$TRY_CFLAGS" ; then + cf_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $TRY_CFLAGS" + AC_MSG_CHECKING(if we should use compile options $TRY_CFLAGS) + AC_TRY_COMPILE([#include <stdio.h>],[FILE *fp = stdin],[cf_result=yes],[cf_result=no]) + AC_MSG_RESULT($cf_result) + test "$cf_result" = no && CFLAGS="$cf_save_CFLAGS" +fi + dnl -------------------------------------------------------------------------- dnl Checks for library configuration (added right-to-left) dnl -------------------------------------------------------------------------- -CF_NETLIBS +### Look for network libraries first, since some functions (such as gethostname) +### are used in a lot of places. +AC_CACHE_CHECK(if you want socks library,cf_cv_use_libsocks,[ +AC_ARG_WITH(socks, + [ --with-socks[=path] link with socks library if available], + [cf_cv_use_libsocks=$withval], + [cf_cv_use_libsocks=no]) +]) + +AC_CACHE_CHECK(if you want socks5 library,cf_cv_use_libsocks5,[ +AC_ARG_WITH(socks5, + [ --with-socks5[=path] link with socks5 library if available], + [cf_cv_use_libsocks5=$withval], + [cf_cv_use_libsocks5=no]) +]) + +if test "x$cf_cv_use_libsocks" != xno ; then + CF_SOCKS($cf_cv_use_libsocks) +elif test "x$cf_cv_use_libsocks5" != xno ; then + CF_SOCKS5($cf_cv_use_libsocks5) +else + CF_NETLIBS +fi -AC_MSG_CHECKING(for screen type) dnl This has to be cached, since there's a lot of interdependent tests. -AC_CACHE_VAL(cf_cv_screen,[ +AC_CACHE_CHECK(for screen type, cf_cv_screen,[ AC_ARG_WITH(screen, [ --with-screen=XXX select screen type (XXX is curses (default), ncurses or slang)], @@ -266,7 +355,6 @@ curses|ncurses|slang) ;; esac], [cf_cv_screen=curses])]) -AC_MSG_RESULT($cf_cv_screen) if test $cf_cv_screen != ncurses ; then if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then @@ -323,6 +411,9 @@ AC_CHECK_HEADERS( \ ) CF_TERMIO_AND_TERMIOS CF_FUNC_WAIT +AC_TYPE_GETGROUPS +AC_TYPE_PID_T +AC_TYPE_UID_T AC_TYPE_MODE_T dnl -------------------------------------------------------------------------- @@ -374,6 +465,7 @@ if test $cf_cv_screen != slang ; then CF_TTYTYPE AC_CHECK_FUNCS( \ cbreak \ + define_key \ keypad \ use_default_colors \ wborder \ @@ -387,13 +479,37 @@ dnl -------------------------------------------------------------------------- CF_HELP_MESSAGE( Miscellaneous Options:) -AC_MSG_CHECKING(if experimental 8-bit case-conversion should be used) -CF_ARG_ENABLE(8bit-toupper, -[ --enable-8bit-toupper use experimental 8-bit case-conversion], - [use_8bit_toupper=$enableval], - [use_8bit_toupper=no]) -AC_MSG_RESULT($use_8bit_toupper) -test $use_8bit_toupper != no && AC_DEFINE(EXP_8BIT_TOUPPER) +AC_MSG_CHECKING(if new-style forms-based options screen should be used) +CF_ARG_DISABLE(forms-options, +[ --disable-forms-options disable experimental forms-based options], + [use_forms_options=$enableval], + [use_forms_options=yes]) +AC_MSG_RESULT($use_forms_options) +test $use_forms_options = no && AC_DEFINE(NO_OPTION_FORMS) + +AC_MSG_CHECKING(if old-style options menu should be used) +CF_ARG_DISABLE(menu-options, +[ --disable-menu-options disable old-style option menu], + [use_menu_options=$enableval], + [use_menu_options=yes]) +AC_MSG_RESULT($use_menu_options) +test $use_menu_options = no && AC_DEFINE(NO_OPTION_MENU) + +AC_MSG_CHECKING(if configuration info should be browsable) +CF_ARG_DISABLE(config-info, +[ --disable-config-info disable browsable configuration-info], + [use_config_info=$enableval], + [use_config_info=yes]) +AC_MSG_RESULT($use_config_info) +test $use_config_info = no && AC_DEFINE(NO_CONFIG_INFO) + +AC_MSG_CHECKING(if experimental persistent-cookie logic should be used) +CF_ARG_ENABLE(persistent-cookies, +[ --enable-persistent-cookies use experimental persistent-cookie support], + [use_filed_cookies=$enableval], + [use_filed_cookies=no]) +AC_MSG_RESULT($use_filed_cookies) +test $use_filed_cookies != no && AC_DEFINE(EXP_PERSISTENT_COOKIES) AC_MSG_CHECKING(if color-style code should be used) CF_ARG_ENABLE(color-style, @@ -430,6 +546,14 @@ no) esac AC_SUBST(INSTALL_LSS) +AC_MSG_CHECKING(if partial-display should be used) +CF_ARG_DISABLE(partial, +[ --disable-partial use partial-display logic], + [use_partial_display=$enableval], + [use_partial_display=yes]) +AC_MSG_RESULT($use_partial_display) +test $use_partial_display != no && AC_DEFINE(DISP_PARTIAL) + use_dft_colors=no test ".$cf_cv_screen" = ".slang" && use_dft_colors=maybe test ".$ac_cv_func_use_default_colors" = ".yes" && use_dft_colors=maybe @@ -468,9 +592,27 @@ CF_ARG_ENABLE(font-switch, AC_MSG_RESULT($use_setfont) test $use_setfont = yes && AC_DEFINE(EXP_CHARTRANS_AUTOSWITCH) +AC_MSG_CHECKING(if you want cgi-link support) +CF_ARG_ENABLE(cgi-links, +[ --enable-cgi-links support cgi links w/o a http daemon], + [AC_DEFINE(LYNXCGI_LINKS)]) +AC_MSG_RESULT($enableval) + +AC_MSG_CHECKING(if you want exec-links support) +CF_ARG_ENABLE(exec-links, +[ --enable-exec-links support cgi links w/o a http daemon], + [AC_DEFINE(EXEC_LINKS)]) +AC_MSG_RESULT($enableval) + +AC_MSG_CHECKING(if you want exec-scripts support) +CF_ARG_ENABLE(exec-scripts, +[ --enable-exec-scripts support cgi links w/o a http daemon], + [AC_DEFINE(EXEC_SCRIPTS)]) +AC_MSG_RESULT($enableval) + AC_MSG_CHECKING(if you want internal-links feature) CF_ARG_ENABLE(internal-links, -[ --enable-internal-links handle following links to same doc differently], +[ --enable-internal-links handle following links to same doc differently], [use_internal_links=yes], [use_internal_links=no]) AC_MSG_RESULT($use_internal_links) @@ -484,6 +626,14 @@ CF_ARG_ENABLE(nsl-fork, AC_MSG_RESULT($use_nsl_fork) test $use_nsl_fork = yes && AC_DEFINE(NSL_FORK) +AC_MSG_CHECKING(if you want to log URL requests via syslog) +CF_ARG_ENABLE(syslog, +[ --enable-syslog log URL requests via syslog], + [use_syslog=yes], + [use_syslog=no]) +AC_MSG_RESULT($use_syslog) +test $use_syslog = yes && AC_DEFINE(SYSLOG_REQUESTED_URLS) + AC_MSG_CHECKING(if you want to underline links) CF_ARG_ENABLE(underlines, [ --enable-underlines underline links rather than using boldface], @@ -492,6 +642,22 @@ CF_ARG_ENABLE(underlines, AC_MSG_RESULT($use_underline) test $use_underline = yes && AC_DEFINE(UNDERLINE_LINKS) +AC_MSG_CHECKING(if help files should be gzip'ed) +CF_ARG_ENABLE(gzip-help, +[ --enable-gzip-help install gzip'ed help files], + [use_gzip_help=$enableval], + [use_gzip_help=no]) +AC_MSG_RESULT($use_gzip_help) + +COMPRESS_PROG= +COMPRESS_EXT= +if test $use_gzip_help = yes ; then + COMPRESS_PROG=$ac_cv_path_GZIP + COMPRESS_EXT=.gz +fi +AC_SUBST(COMPRESS_PROG) +AC_SUBST(COMPRESS_EXT) + AC_MSG_CHECKING(if you want to use zlib for decompression of some gzip files) AC_ARG_WITH(zlib, [ --with-zlib use zlib for decompression of some gzip files], @@ -580,6 +746,11 @@ CF_ARG_DISABLE(parent-dir-refs, [AC_DEFINE(NO_PARENT_DIR_REFERENCE)]) AC_MSG_RESULT($enableval) +dnl -------------------------------------------------------------------------- +dnl Test features that rely on configure-definitions +dnl -------------------------------------------------------------------------- +CF_TERMIO_AND_CURSES(LYCurses.h) + ### Finally, build config.h and the makefiles CFLAGS="$CFLAGS $EXTRA_CFLAGS" srcdir="$srcdir" @@ -588,13 +759,27 @@ if test -n "$srcdir" ; then echo srcdir is $srcdir $srcdir/mkdirs.sh WWW/Library/unix $srcdir/mkdirs.sh src/chrtrans + test "$USE_INCLUDED_LIBINTL" = yes && $srcdir/mkdirs.sh intl test "$srcdir" != "." && SRCDIR_CLEAN="" fi AC_SUBST(SRCDIR_CLEAN) AC_OUTPUT( - makefile \ + [makefile \ WWW/Library/unix/makefile \ src/makefile \ src/chrtrans/makefile \ + $SUB_MAKEFILE + ],[ + if test "$USE_NLS" = yes ; then + echo creating po/makefile + rm -f po/temp$$ + sed -e '$s/\\//' po/POTFILES >po/temp$$ + sed -e "/POTFILES =/r po/temp$$" \ + po/makefile.in > po/makefile + rm -f po/temp$$ + fi + ],[ + USE_NLS=$USE_NLS + ] ) |