1dnl $LynxId: configure.in,v 1.247 2013/05/01 08:54:16 tom Exp $ 2dnl 3dnl Process this file with autoconf to produce a configure script. 4dnl 5dnl created jan/1997 6dnl by T.E.Dickey <dickey@invisible-island.net> 7dnl and Jim Spath <jspath@mail.bcpl.lib.md.us> 8dnl 9dnl --------------------------------------------------------------------------- 10dnl Copyright 1997-2012,2013 by Thomas E. Dickey 11dnl 12dnl Permission to use, copy, modify, and distribute this software and its 13dnl documentation for any purpose and without fee is hereby granted, 14dnl provided that the above copyright notice appear in all copies and that 15dnl both that copyright notice and this permission notice appear in 16dnl supporting documentation, and that the name of the above listed 17dnl copyright holder(s) not be used in advertising or publicity pertaining 18dnl to distribution of the software without specific, written prior 19dnl permission. 20dnl 21dnl THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD 22dnl TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 23dnl AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 24dnl LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 25dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 26dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 27dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 28dnl --------------------------------------------------------------------------- 29dnl 30dnl ask PRCS to plug-in the project-version for the configure-script. 31dnl $Format: "AC_REVISION($ProjectVersion$)"$ 32AC_REVISION(2.8.8dev.16) 33 34# Save the original $CFLAGS so we can distinguish whether the user set those 35# in the environment, or whether autoconf added -O and -g options: 36ORIGINAL_CFLAGS="$CFLAGS" 37 38# For autoconf 2.13, make sure we have no cache file at the beginning of this 39# script. That fixes problems with tests whose cached values change from one 40# run to the next, as well as with tests that are order-dependent. 41rm -f config.cache 42 43AC_PREREQ(2.13.20020210) 44AC_INIT(userdefs.h) 45 46# autoconf 2.5x defaults to no cache file; we need the cache file's information 47# for building the config page. But start with it empty to avoid confusion by 48# people who don't do a "make distclean" after applying patches. 49cache_file=config.cache 50rm -f config.cache; touch config.cache 51 52CONFIG_H=lynx_cfg.h 53AC_CONFIG_HEADER($CONFIG_H:config.hin) 54AC_SUBST(CONFIG_H) 55 56CF_CHECK_CACHE([AC_CANONICAL_SYSTEM]) 57AC_ARG_WITH(system-type, 58[ --with-system-type=XXX test: override derived host system-type], 59[AC_MSG_WARN(overriding system type $host_os to $withval) 60 host_os=$withval]) 61 62AC_ARG_PROGRAM 63 64PACKAGE=lynx 65dnl ask PRCS to plug-in the project-version for the packages. 66# $Format: "VERSION=$ProjectVersion$"$ 67VERSION=2.8.8dev.16 68 69AC_SUBST(PACKAGE) 70AC_SUBST(VERSION) 71 72AC_MSG_CHECKING(for DESTDIR) 73CF_WITH_PATH(destdir, 74[ --with-destdir=XXX set DESTDIR destination for install], 75DESTDIR, 76[$DESTDIR], 77[$DESTDIR]) 78AC_MSG_RESULT($DESTDIR) 79 80AC_PREFIX_DEFAULT(/usr/local) 81 82dnl -------------------------------------------------------------------------- 83dnl Checks for location of programs 84dnl -------------------------------------------------------------------------- 85 86dnl Only add to this case statement when a system has a compiler that is not 87dnl detected by AC_PROG_CC. 88case $host_os in 89openedition) 90 : ${CFLAGS="-D_ALL_SOURCE -Wl,EDIT=NO"} 91 : ${CC=c89} 92 ;; 93esac 94 95CF_PROG_CC 96AC_PROG_CPP 97AC_PROG_LN_S 98case $host_os in 99mingw*) 100LN_S="cp -p" 101AC_MSG_RESULT(Override: No symbolic links in mingw.) 102 ;; 103*) 104 ;; 105esac 106AC_PROG_MAKE_SET 107AC_PROG_INSTALL 108AC_PROG_YACC 109CF_PROG_LINT 110CF_MAKEFLAGS 111CF_MAKE_TAGS 112 113CF_ACVERSION_CHECK(2.52, 114 [AC_PATH_TOOL(WINDRES, windres, none)], 115 [AC_PATH_PROG(WINDRES, windres, none)]) 116 117CF_BUILD_CC([#],[]) 118 119CF_PROG_RANLIB 120CF_AR_FLAGS 121 122dnl -------------------------------------------------------------------------- 123dnl Debug/development/test 124dnl -------------------------------------------------------------------------- 125 126CF_HELP_MESSAGE( 127Development Options:) 128 129CF_DISABLE_ECHO 130 131# special case for WWW/* 132if test -n "$ECHO_CC" ; then 133 DONT_ECHO_CC="$SHOW_CC ;" 134else 135 DONT_ECHO_CC='' 136fi 137AC_SUBST(DONT_ECHO_CC) 138 139AC_MSG_CHECKING(if you want to check memory-leaks) 140CF_ARG_ENABLE(find-leaks, 141 [ --enable-find-leaks logic for testing memory leaks], 142 [with_leak_checks=yes], 143 [with_leak_checks=no]) 144AC_MSG_RESULT($with_leak_checks) 145test "$with_leak_checks" = "yes" && AC_DEFINE(LY_FIND_LEAKS,1,[Define to 1 if you want to check memory-leaks]) 146 147# The comment about adding -g to $CFLAGS is unclear. Autoconf tries to add 148# a -g flag; we remove it if the user's $CFLAGS was not set and debugging is 149# disabled. 150AC_MSG_CHECKING(if you want to enable debug-code) 151CF_ARG_ENABLE(debug, 152 [ --enable-debug compile w/ debugging (if \$CFLAGS is set, add -g there, too)], 153 [with_debug=yes], 154 [with_debug=no]) 155AC_MSG_RESULT($with_debug) 156if test "$with_debug" = "yes" ; then 157 case $host_os in 158 ultrix*|osf*) 159 test -z "$ORIGINAL_CFLAGS" && CF_STRIP_O_OPT(CFLAGS) 160 if test -z "$GCC" ; then 161 CFLAGS="$CFLAGS -g3" 162 fi 163 ;; 164 esac 165else 166 case $host_os in 167 osf*) #(vi 168 test -z "$GCC" && CFLAGS="$CFLAGS -std1" 169 test -z "$ORIGINAL_CFLAGS" && CF_STRIP_G_OPT(CFLAGS) 170 ;; 171 *) 172 test -z "$ORIGINAL_CFLAGS" && CF_STRIP_G_OPT(CFLAGS) 173 ;; 174 esac 175fi 176 177AC_MSG_CHECKING(if you want to enable lynx trace code *recommended* ) 178CF_ARG_DISABLE(trace, 179 [ --disable-trace disable logic for trace code], 180 [with_trace=$enableval], 181 [with_trace=yes]) 182AC_MSG_RESULT($with_trace) 183test $with_trace = no && AC_DEFINE(NO_LYNX_TRACE,1,[Define to 1 if you want to enable lynx trace code]) 184 185AC_MSG_CHECKING(if you want verbose trace code) 186CF_ARG_ENABLE(vertrace, 187 [ --enable-vertrace verbose trace code], 188 [with_vertrace=yes], 189 [with_vertrace=no]) 190AC_MSG_RESULT($with_vertrace) 191test $with_vertrace = yes && AC_DEFINE(LY_TRACELINE,__LINE__,[Define to __LINE__ if you want verbose trace code]) 192 193if test -n "$GCC" 194then 195AC_MSG_CHECKING(if you want to turn on gcc warnings) 196CF_ARG_ENABLE(warnings, 197 [ --enable-warnings GCC compiler warnings], 198 [with_warnings=yes], 199 [with_warnings=no]) 200AC_MSG_RESULT($with_warnings) 201if test "$with_warnings" = "yes" 202then 203 CF_GCC_ATTRIBUTES 204 CF_GCC_WARNINGS(Wno-cast-qual Wno-cast-align) 205fi 206fi 207 208CF_WITH_DBMALLOC 209CF_WITH_DMALLOC 210 211dnl -------------------------------------------------------------------------- 212dnl Checks for compiler & standard-library characteristics 213dnl -------------------------------------------------------------------------- 214 215dnl If we're able to run this script, this is true! 216AC_DEFINE(UNIX,1,[Define to 1 if we can run a configure script]) 217 218dnl Only add to this case statement things that we cannot design tests for. 219TRY_CFLAGS= 220case $host_os in 221aix4*) 222 TRY_CFLAGS="$TRY_CFLAGS -DAIX4 -D_BSD=44 -D_AIX" 223 LIBS="$LIBS -lbsd" 224 ;; 225aix*) 226 TRY_CFLAGS="$TRY_CFLAGS -D_ACS_COMPAT_CODE" 227 LIBS="$LIBS -lbsd" 228 ;; 229apollo*) 230 TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4" 231 ;; 232bsdi*) 233 TRY_CFLAGS="$TRY_CFLAGS -DBSDI" 234 ;; 235clix*) 236 # Tested on CLIX 3.1 (T.Dickey). The original makefile entry 237 # contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also 238 # references -lmalloc and -lbsd. 239 AC_CHECK_LIB(c_s,strcmp) 240 ;; 241convex*) 242 TRY_CFLAGS="$TRY_CFLAGS -D__STDC__ -Dunix" 243 ;; 244cygwin*) 245 TRY_CFLAGS="$TRY_CFLAGS -DWIN_EX -D_WINDOWS_NSL" 246 LIBS="$LIBS -luser32" 247 ;; 248dgux*) 249 TRY_CFLAGS="$TRY_CFLAGS -DDGUX" 250 ;; 251hpux*) 252 TRY_CFLAGS="$TRY_CFLAGS -DSNAKE -D_XOPEN_SOURCE_EXTENDED" 253 test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000 -DSYS_HPUX" 254 ;; 255isc*) 256 # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is. 257 TRY_CFLAGS="$TRY_CFLAGS -DISC -DPOSIX_JC" 258 LIBS="$LIBS -linet -lnsl_s -lcposix" 259 ;; 260irix6.*) #(vi 261 TRY_CFLAGS="$TRY_CFLAGS -DSYS_IRIX64" 262 ;; 263irix*) 264 # The original makefile used the $CFLAGS option -cckr for some form 265 # of K&R compatibility. However, this causes compilation warnings for 266 # varargs on IRIX 5.2, and does not appear to be needed. 267 ;; 268linux*) 269 TRY_CFLAGS="$TRY_CFLAGS -DLINUX" 270 ;; 271mingw*) 272 # put these directly in CPPFLAGS since they will not work in lynx_cfg.h 273 CF_ADD_CFLAGS(\ 274 -DWIN32_LEAN_AND_MEAN \ 275 -DDOSPATH \ 276 -DNOSIGHUP \ 277 -DNOUSERS \ 278 -DWIN_EX \ 279 -D_CONSOLE \ 280 -D_MBCS \ 281 -D_WINDOWS \ 282 -D_WIN_CC \ 283 -D__WIN32__ \ 284 ) 285 EXTRA_OBJS="$EXTRA_OBJS Xsystem\$o" 286 ;; 287msdosdjgpp*) 288 LIBS="$LIBS -lwatt" 289 TRY_CFLAGS="$TRY_CFLAGS -DDOSPATH -DNOUSERS" 290 ;; 291next*) 292 TRY_CFLAGS="$TRY_CFLAGS -DNEXT" 293 ;; 294openbsd* | ekkobsd* | mirbsd*) 295 LIBS="$LIBS -lcompat" 296 ;; 297osf4*) 298 # The -Olimit flag (see below) is no longer available with 299 # Digital C 5.2, which is bundled with Digital UNIX 4.0. 300 TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64" 301 ;; 302osf*) 303 # Increase the maximum size of functions that will be optimized. 304 test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000" 305 TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64" 306 ;; 307sco3.2v5*) 308 test $ac_cv_prog_gcc != yes && TRY_CFLAGS="$TRY_CFLAGS -belf" 309 ;; 310sco*) 311 LIBS="$LIBS -lmalloc" 312 # It's a little late to do much, but try to warn user if he's using 313 # SCO's cc (which is reported to have broken const/volatile). 314 case "$CC" in #(vi 315 cc|*/cc) 316 AC_MSG_WARN(You should consider using gcc or rcc if available) 317 unset ac_cv_prog_CC 318 AC_CHECK_PROGS(CC,gcc rcc,$CC) 319 ;; 320 esac 321 ;; 322sequent-ptx) 323 TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL" 324 ;; 325sequent-ptx2) 326 TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT" 327 ;; 328sony-newsos*) 329 TRY_CFLAGS="$TRY_CFLAGS -I/usr/sony/include" 330 AC_CHECK_HEADERS(jcurses.h) 331 ;; 332svr4) 333 TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DSVR4" 334 ;; 335sunos3*) 336 TRY_CFLAGS="$TRY_CFLAGS -DSUN" 337 ;; 338sunos4*) 339 TRY_CFLAGS="$TRY_CFLAGS -DSUN -DSUN4" 340 ;; 341ultrix*) 342 # Increase the maximum size of functions that will be optimized. 343 test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7" 344 TRY_CFLAGS="$TRY_CFLAGS -DULTRIX" 345 AC_CHECK_HEADERS(cursesX.h, 346 [AC_DEFINE(HAVE_CURSESX_H,1,[Define to 1 if we have cursesX.h]) 347 cf_cv_ncurses_header=cursesX.h]) 348 ;; 349esac 350 351case $host_os in 352mingw*) 353 EXTRA_OBJS="$EXTRA_OBJS LYIcon\$o" 354 ;; 355esac 356 357CF_ANSI_CC_REQD 358 359dnl -------------------------------------------------------------------------- 360dnl -------------------------------------------------------------------------- 361 362CF_HELP_MESSAGE( 363Basic Configuration Options:) 364 365CF_LARGEFILE 366 367dnl -------------------------------------------------------------------------- 368dnl internationalization macros 369dnl -------------------------------------------------------------------------- 370 371dnl Set of available languages (based on source distribution) 372if test -z "$ALL_LINGUAS" ; then 373 ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'` 374 AM_PATH_PROG_WITH_TEST(MSGINIT, msginit, 375 [$ac_dir/$ac_word --no-translator --version /dev/null >/dev/null 2>&1], :) 376 if test "$MSGINIT" != ":" ; then 377 CF_VERBOSE(adding en.po) 378 ALL_LINGUAS="$ALL_LINGUAS en" 379 fi 380fi 381 382CF_BUNDLED_INTL(makefile,disable) 383 384INTLDIR_CPPFLAGS="#" 385if test -z "$INTLDIR_MAKE" ; then 386 INTLDIR_CPPFLAGS= 387fi 388 389AC_SUBST(INTLDIR_CPPFLAGS) 390 391CF_WITH_PATH(nls-datadir, 392[ --with-nls-datadir=DIR NLS data, parent of locale], 393NLS_DATADIR, 394[PREFIX/DATADIR], 395[$prefix/$DATADIRNAME]) 396 397dnl -------------------------------------------------------------------------- 398AC_MSG_CHECKING(if you want full utility pathnames) 399CF_ARG_DISABLE(full-paths, 400 [ --disable-full-paths control whether full utility pathnames are used], 401 [with_full_paths=no], 402 [with_full_paths=yes]) 403AC_MSG_RESULT($with_full_paths) 404test $with_full_paths = no && AC_DEFINE(USE_EXECVP,1,[Define to 1 if you want full utility pathnames]) 405 406CF_DEFINE_PROG(system mailer, SYSTEM_MAIL, 407 /usr/mmdf/bin/submit \ 408 /usr/sbin/sendmail \ 409 /usr/lib/sendmail \ 410 ) 411CF_SYSTEM_MAIL_FLAGS 412if test -n "$SYSTEM_MAIL" ; then 413if test $with_full_paths = no ; then 414 SYSTEM_MAIL=`basename $SYSTEM_MAIL` 415fi 416fi 417 418dnl -------------------------------------------------------------------------- 419CF_XOPEN_SOURCE(500,199506L) 420CF_SIGWINCH 421 422dnl Collect tests for compiler options into one place 423if test -n "$TRY_CFLAGS" ; then 424 CF_CHECK_CFLAGS($TRY_CFLAGS) 425fi 426 427dnl -------------------------------------------------------------------------- 428dnl Checks for library configuration (added right-to-left) 429dnl -------------------------------------------------------------------------- 430 431### Look for network libraries first, since some functions (such as gethostname) 432### are used in a lot of places. 433AC_CACHE_CHECK(if you want NSS compatible SSL libraries,cf_cv_use_libnss_compat,[ 434AC_ARG_WITH(nss-compat, 435 [ --with-nss-compat{=path} link with nss_compat library if available], 436 [cf_cv_use_libnss_compat=$withval], 437 [cf_cv_use_libnss_compat=no]) 438]) 439 440AC_CACHE_CHECK(if you want ssl library,cf_cv_use_libssl,[ 441AC_ARG_WITH(ssl, 442 [ --with-ssl{=path} link with ssl library if available], 443 [cf_cv_use_libssl=$withval], 444 [cf_cv_use_libssl=no]) 445]) 446 447AC_CACHE_CHECK(if you want gnutls support,cf_cv_use_libgnutls,[ 448AC_ARG_WITH(gnutls, 449 [ --with-gnutls{=path} link with gnutls support], 450 [cf_cv_use_libgnutls=$withval], 451 [cf_cv_use_libgnutls=no]) 452]) 453 454# this option is mainly for comparing with/without Lynx' wrapper for GNUTLS. 455AC_CACHE_CHECK(if you want gnutls-openssl compat,cf_cv_gnutls_compat,[ 456AC_ARG_ENABLE(gnutls-compat, 457 [ --enable-gnutls-compat link with gnutls-openssl compat], 458 [cf_cv_gnutls_compat=$enableval], 459 [cf_cv_gnutls_compat=no]) 460]) 461 462AC_CACHE_CHECK(if you want socks library,cf_cv_use_libsocks,[ 463AC_ARG_WITH(socks, 464 [ --with-socks{=path} link with socks library if available], 465 [cf_cv_use_libsocks=$withval], 466 [cf_cv_use_libsocks=no]) 467]) 468 469AC_CACHE_CHECK(if you want socks5 library,cf_cv_use_libsocks5,[ 470AC_ARG_WITH(socks5, 471 [ --with-socks5{=path} link with socks5 library if available], 472 [cf_cv_use_libsocks5=$withval], 473 [cf_cv_use_libsocks5=no]) 474]) 475 476if test "x$cf_cv_use_libsocks" != xno ; then 477 CF_SOCKS($cf_cv_use_libsocks) 478elif test "x$cf_cv_use_libsocks5" != xno ; then 479 CF_SOCKS5($cf_cv_use_libsocks5) 480else 481 CF_NETLIBS 482fi 483 484CF_INET_ADDR 485 486CF_PKG_CONFIG 487 488if test "x$cf_cv_use_libssl" != xno ; then 489 CF_SSL($cf_cv_use_libssl) 490elif test "x$cf_cv_use_libgnutls" != xno ; then 491 if test "x$cf_cv_gnutls_compat" = xno ; then 492 CF_GNUTLS($cf_cv_use_libgnutls,tidy_tls\$o) 493 AC_CHECK_FUNCS(gnutls_priority_set_direct) 494 else 495 CF_GNUTLS($cf_cv_use_libgnutls) 496 fi 497elif test "x$cf_cv_use_libnss_compat" != xno ; then 498 CF_NSS_COMPAT($cf_cv_use_libnss_compat) 499fi 500 501dnl -------------------------------------------------------------------------- 502### check for ipv6 support 503AC_MSG_CHECKING([whether to enable ipv6]) 504CF_ARG_ENABLE(ipv6, 505[ --enable-ipv6 use ipv6 (with ipv4) support], 506 [AC_DEFINE(ENABLE_IPV6,1,[Define to 1 if we should enable ipv6])]) 507AC_MSG_RESULT($enableval) 508if test "$enableval" = "yes"; then 509 CF_CHECK_IPV6 510fi 511dnl AC_REPLACE_FUNCS(getaddrinfo getnameinfo) 512 513dnl -------------------------------------------------------------------------- 514dnl This has to be cached, since there's a lot of interdependent tests. 515AC_CACHE_CHECK(for screen type, cf_cv_screen,[ 516AC_ARG_WITH(screen, 517[ --with-screen=XXX select screen type (XXX is curses (default), 518 ncurses, ncursesw, pdcurses or slang)], 519 [ 520case $withval in 521curses|ncurses|ncursesw|pdcurses|slang) 522 cf_cv_screen=$withval 523 ;; 524*) AC_ERROR(Unexpected value) 525 ;; 526esac], 527 [cf_cv_screen=curses])]) 528 529case $cf_cv_screen in 530curses|ncurses*) 531 CF_WITH_CURSES_DIR 532 ;; 533esac 534 535cf_wide_curses=no 536dft_color_style=yes 537case $cf_cv_screen in 538curses) 539 CF_CURSES_CONFIG 540 CF_CURS_PERFORMANCE 541 CF_CURS_TOUCHLINE 542 ;; 543ncurses) 544 CF_NCURSES_CONFIG 545 ;; 546ncursesw) 547 CF_UTF8_LIB 548 CF_NCURSES_CONFIG(ncursesw) 549 cf_wide_curses=yes 550 ;; 551pdcurses) 552 cf_cv_ncurses_header=xcurses.h 553 # do this last, since it changes definition of main: CF_PDCURSES_X11 554 ;; 555slang) 556 CF_SLANG_UNIX_DEFS 557 dft_color_style=no 558 ;; 559esac 560 561CF_CURSES_CHTYPE 562 563AC_MSG_CHECKING(if you want the wide-curses features) 564CF_ARG_ENABLE(widec, 565[ --enable-widec enable wide-curses features], 566 [use_wide_curses=$enableval], 567 [use_wide_curses=$cf_wide_curses]) 568AC_MSG_RESULT($use_wide_curses) 569 570AC_MSG_CHECKING(if color-style code should be used) 571CF_ARG_DISABLE(color-style, 572[ --disable-color-style use color style (ncurses/curses)], 573 [use_color_style=$enableval], 574 [use_color_style=$dft_color_style]) 575 576case $use_color_style in 577no) 578 AC_MSG_RESULT(no) 579 INSTALL_LSS= 580 ;; 581*) 582 AC_DEFINE(USE_COLOR_STYLE,1,[Define to 1 if we should enable color-style]) 583 AC_MSG_RESULT(yes) 584 585 AC_MSG_CHECKING(for location of style-sheet file) 586 587CF_WITH_PATH(lss-file, 588[ --with-lss-file{=path} specify the default style-sheet file 589 ], 590LYNX_LSS_FILE, 591SYSCONFDIR/lynx.lss, 592$sysconfdir/lynx.lss) 593 594 AC_MSG_RESULT($LYNX_LSS_FILE) 595 596 test "$LYNX_LSS_FILE" = no && LYNX_LSS_FILE= 597 AC_DEFINE_UNQUOTED(LYNX_LSS_FILE,"$LYNX_LSS_FILE",[Define to default path for Lynx lss-file]) 598 599 INSTALL_LSS=install-lss 600 ;; 601esac 602AC_SUBST(INSTALL_LSS) 603 604dnl -------------------------------------------------------------------------- 605 606AC_MSG_CHECKING(for the default configuration-file) 607 608CF_WITH_PATH(cfg-file, 609[ --with-cfg-file{=path} specify the default configuration file 610 ], 611LYNX_CFG_FILE, 612SYSCONFDIR/lynx.cfg, 613$sysconfdir/lynx.cfg) 614 615dnl -------------------------------------------------------------------------- 616 617AC_MSG_RESULT($LYNX_CFG_FILE) 618 619test "$LYNX_CFG_FILE" = no && LYNX_CFG_FILE= 620AC_DEFINE_UNQUOTED(LYNX_CFG_FILE,"$LYNX_CFG_FILE",[Define to default path for Lynx cfg-file]) 621 622dnl -------------------------------------------------------------------------- 623AC_MSG_CHECKING(if htmlized lynx.cfg should be built) 624CF_ARG_ENABLE(htmlized-cfg, 625[ --enable-htmlized-cfg build htmlized lynx.cfg], 626 [use_htmlized_cfg=$enableval], 627 [use_htmlized_cfg=no]) 628AC_MSG_RESULT($use_htmlized_cfg) 629 630LYNXCFG_MAKE='' 631if test $use_htmlized_cfg = no ; then 632 LYNXCFG_MAKE='#' 633fi 634AC_SUBST(LYNXCFG_MAKE) 635 636dnl -------------------------------------------------------------------------- 637AC_MSG_CHECKING(if local doc directory should be linked to help page) 638CF_ARG_ENABLE(local-docs, 639[ --enable-local-docs link local doc-directory to help-page], 640 [use_local_docs=$enableval], 641 [use_local_docs=no]) 642AC_MSG_RESULT($use_local_docs) 643 644LYNXDOC_MAKE='' 645if test $use_local_docs = no ; then 646 LYNXDOC_MAKE='#' 647fi 648AC_SUBST(LYNXDOC_MAKE) 649 650dnl -------------------------------------------------------------------------- 651 652AC_MSG_CHECKING(for MIME library directory) 653CF_WITH_PATH(mime-libdir, 654[ --with-mime-libdir=DIR MIME data, mime.types and mailcap], 655MIME_LIBDIR, 656[/etc]) 657AC_MSG_RESULT($MIME_LIBDIR) 658MIME_LIBDIR=`echo "$MIME_LIBDIR" | sed -e 's,/$,,' -e 's,$,/,'` 659AC_DEFINE_UNQUOTED(MIME_LIBDIR,"$MIME_LIBDIR",[Define to default path for MIME library]) 660 661dnl -------------------------------------------------------------------------- 662AC_MSG_CHECKING(if locale-charset selection logic should be used) 663CF_ARG_ENABLE(locale-charset, 664[ --enable-locale-charset use locale-charset selection logic], 665 [use_locale_charset=$enableval], 666 [use_locale_charset=yes]) 667AC_MSG_RESULT($use_locale_charset) 668test $use_locale_charset != no && AC_DEFINE(USE_LOCALE_CHARSET,1,[Define to 1 if locale-charset selection logic should be used]) 669 670dnl -------------------------------------------------------------------------- 671dnl Check for subsets of compiled-in tables. 672dnl -------------------------------------------------------------------------- 673CHARSET_DEFS= 674AC_SUBST(CHARSET_DEFS) 675 676AC_MSG_CHECKING(if you want only a few charsets) 677AC_ARG_WITH(charsets, 678[ --with-charsets=list limit charsets to given list of MIME names], 679[cf_charsets=$withval], 680[cf_charsets=]) 681 682if test -n "$cf_charsets" ; then 683 AC_MSG_RESULT(yes) 684 AC_DEFINE(ALL_CHARSETS,0,[Define to 0 if xxx]) 685 cf_min_charsets=us-ascii,iso-8859-1,utf-8 686 if test "$cf_charsets" = "no" ; then 687 cf_charsets=minimal 688 fi 689 if test "$cf_charsets" = "minimal" ; then 690 CF_VERBOSE(using minimal list of charsets: $cf_min_charsets) 691 fi 692 cf_charsets=`echo $cf_charsets | sed -e "s/minimal/$cf_min_charsets/g" -e 's/,/ /g'` 693 for cf_charset in $cf_charsets 694 do 695 cf_def_charset=`echo $cf_charset | sed -e 's/+/_/g' -e 's/-/_/g'` 696 cf_use_charset=no 697 # check charsets that are defined via .tbl files 698 if ( egrep '^M'$cf_charset'$' $srcdir/src/chrtrans/*.tbl 2>/dev/null >/dev/null ) 699 then 700 cf_use_charset=yes 701 # check charsets that are "built-in" 702 else 703 for cf_tst_charset in big5 euc_cn euc_jp euc_kr shift_jis x_transparent 704 do 705 if test "$cf_tst_charset" = "$cf_def_charset" 706 then 707 cf_use_charset=yes 708 break 709 fi 710 done 711 fi 712 if test $cf_use_charset=yes 713 then 714 CF_VERBOSE(found $cf_charset) 715 CHARSET_DEFS="-DNO_CHARSET_${cf_def_charset}=0 $CHARSET_DEFS" 716 else 717 CF_VERBOSE(not found $cf_charset) 718 fi 719 done 720else 721 AC_MSG_RESULT(no) 722fi 723 724dnl -------------------------------------------------------------------------- 725dnl Checks for standard headers 726dnl -------------------------------------------------------------------------- 727 728AC_HEADER_STDC 729AC_HEADER_TIME 730AC_HEADER_DIRENT 731dnl Don't check for sys/wait.h here since it is covered by another test. 732AC_CHECK_HEADERS( \ 733 arpa/inet.h \ 734 fcntl.h \ 735 limits.h \ 736 stdlib.h \ 737 string.h \ 738 sys/fcntl.h \ 739 sys/filio.h \ 740 sys/ioctl.h \ 741 sys/param.h \ 742 sys/timeb.h \ 743 sys/time.h \ 744 syslog.h \ 745 termio.h \ 746 termios.h \ 747 unistd.h \ 748 vfork.h \ 749) 750CF_TERMIO_AND_TERMIOS 751CF_FUNC_SIGACTION 752CF_FUNC_WAIT 753AC_TYPE_GETGROUPS 754AC_TYPE_OFF_T 755AC_TYPE_PID_T 756AC_TYPE_UID_T 757AC_TYPE_MODE_T 758CF_CHECK_TYPE(ssize_t, int) 759CF_CHECK_TYPE(socklen_t, int, [ 760#include <sys/types.h> 761#include <sys/socket.h> 762]) 763CF_TYPE_LONG_LONG 764CF_TM_GMTOFF 765 766CF_CHECK_SIZEOF(int,4) 767CF_CHECK_SIZEOF(long,4) 768CF_CHECK_SIZEOF(off_t,4) 769CF_CHECK_SIZEOF(time_t,4) 770AC_CHECK_TYPE(intptr_t, long) 771 772dnl -------------------------------------------------------------------------- 773dnl Checks for library units 774dnl -------------------------------------------------------------------------- 775 776AC_FUNC_ALLOCA 777AC_FUNC_VFORK 778CF_FIONBIO 779CF_REMOVE_BROKEN 780CF_FUNC_LSTAT 781AC_CHECK_FUNCS( \ 782 atoll \ 783 ctermid \ 784 cuserid \ 785 ftime \ 786 getcwd \ 787 getgroups \ 788 gettimeofday \ 789 getuid \ 790 mktemp \ 791 mkdtemp \ 792 popen \ 793 putenv \ 794 readdir \ 795 setuid \ 796 strerror \ 797 truncate \ 798 ttyname \ 799 unsetenv \ 800 usleep \ 801 vasprintf \ 802 waitpid \ 803) 804AC_REPLACE_FUNCS( \ 805 mktime \ 806 strstr \ 807) 808 809CF_SRAND(lynx_) 810CF_CHECK_FUNCDECLS([#include <string.h>], strstr) 811CF_CHECK_FUNCDECLS([ 812#include <stdio.h> 813#include <grp.h>], getgrgid getgrnam) 814 815dnl -------------------------------------------------------------------------- 816dnl Checks for external-data 817dnl -------------------------------------------------------------------------- 818 819CF_BOOL_DEFS 820CF_ERRNO 821CF_SET_ERRNO 822CF_LOCALE 823CF_NGROUPS 824CF_SYS_ERRLIST 825CF_UTMP 826CF_CHECK_EXTERN_DATA(h_errno,int) 827 828AC_SUBST(EXTRA_OBJS) 829 830dnl -------------------------------------------------------------------------- 831dnl Experimental options that don't need to test system features 832dnl -------------------------------------------------------------------------- 833 834CF_HELP_MESSAGE( 835Experimental Options:) 836 837dnl -------------------------------------------------------------------------- 838AC_MSG_CHECKING(if bibp: URLs should be supported) 839CF_ARG_DISABLE(bibp-urls, 840[ --disable-bibp-urls disable support for bibp: URLs], 841 [use_bibp_urls=$enableval], 842 [use_bibp_urls=yes]) 843AC_MSG_RESULT($use_bibp_urls) 844test $use_bibp_urls = no && AC_DEFINE(DISABLE_BIBP,1,[Define to 1 if bibp: URLs should be supported]) 845 846dnl -------------------------------------------------------------------------- 847AC_MSG_CHECKING(if configuration info should be browsable) 848CF_ARG_DISABLE(config-info, 849[ --disable-config-info disable browsable configuration-info], 850 [use_config_info=$enableval], 851 [use_config_info=yes]) 852AC_MSG_RESULT($use_config_info) 853test $use_config_info = no && AC_DEFINE(NO_CONFIG_INFO,1,[Define to 1 if configuration info should be browsable]) 854 855dnl -------------------------------------------------------------------------- 856AC_MSG_CHECKING(if new-style forms-based options screen should be used) 857CF_ARG_DISABLE(forms-options, 858[ --disable-forms-options disable forms-based options], 859 [use_forms_options=$enableval], 860 [use_forms_options=yes]) 861AC_MSG_RESULT($use_forms_options) 862test $use_forms_options = no && AC_DEFINE(NO_OPTION_FORMS,1,[Define to 1 if new-style forms-based options screen should be used]) 863 864dnl -------------------------------------------------------------------------- 865AC_MSG_CHECKING(if old-style options menu should be used) 866CF_ARG_DISABLE(menu-options, 867[ --disable-menu-options disable old-style option menu], 868 [use_menu_options=$enableval], 869 [use_menu_options=yes]) 870AC_MSG_RESULT($use_menu_options) 871test $use_menu_options = no && AC_DEFINE(NO_OPTION_MENU,1,[Define to 1 if old-style options menu should be used]) 872 873dnl -------------------------------------------------------------------------- 874AC_MSG_CHECKING(if sessions code should be used) 875CF_ARG_DISABLE(sessions, 876[ --disable-sessions use sessions code], 877 [use_sessions=$enableval], 878 [use_sessions=yes]) 879AC_MSG_RESULT($use_sessions) 880if test $use_sessions != no ; then 881 AC_DEFINE(USE_SESSIONS,1,[Define to 1 if sessions code should be used]) 882 EXTRA_OBJS="$EXTRA_OBJS LYSession\$o" 883fi 884 885dnl -------------------------------------------------------------------------- 886AC_MSG_CHECKING(if session-caching code should be used) 887CF_ARG_DISABLE(session-cache, 888[ --disable-session-cache use session-caching code], 889 [use_session_cache=$enableval], 890 [use_session_cache=yes]) 891AC_MSG_RESULT($use_session_cache) 892if test $use_session_cache != no ; then 893 AC_DEFINE(USE_CACHEJAR,1,[Define to 1 if session-caching code should be used]) 894fi 895 896dnl -------------------------------------------------------------------------- 897AC_MSG_CHECKING(if address-list page should be used) 898CF_ARG_DISABLE(addrlist-page, 899[ --disable-addrlist-page disable address-list page], 900 [use_addrlist_page=$enableval], 901 [use_addrlist_page=yes]) 902AC_MSG_RESULT($use_addrlist_page) 903test $use_addrlist_page != no && AC_DEFINE(USE_ADDRLIST_PAGE,1,[Define to 1 if address-list page should be used]) 904 905dnl -------------------------------------------------------------------------- 906AC_MSG_CHECKING(if experimental CJK logic should be used) 907CF_ARG_ENABLE(cjk, 908[ --enable-cjk use experimental CJK logic], 909 [use_cjk=$enableval], 910 [use_cjk=no]) 911AC_MSG_RESULT($use_cjk) 912test $use_cjk != no && AC_DEFINE(CJK_EX,1,[Define to 1 if experimental CJK logic should be used]) 913 914dnl -------------------------------------------------------------------------- 915AC_MSG_CHECKING(if experimental Japanese UTF-8 logic should be used) 916CF_ARG_ENABLE(japanese-utf8, 917[ --enable-japanese-utf8 use experimental Japanese UTF-8 logic], 918 [use_ja_utf8=$enableval], 919 [use_ja_utf8=no]) 920AC_MSG_RESULT($use_ja_utf8) 921if test $use_ja_utf8 != no ; then 922 AC_DEFINE(EXP_JAPANESEUTF8_SUPPORT,1,[Define to 1 if experimental Japanese UTF-8 logic should be used]) 923 AM_ICONV 924 if test "$USE_NLS" != yes ; then 925 LIBS="$LIBICONV $LIBS" 926 fi 927fi 928 929use_dft_colors=no 930case $cf_cv_screen in 931curses|slang|ncurses*) 932 use_dft_colors=maybe 933 ;; 934esac 935 936dnl -------------------------------------------------------------------------- 937if test "$use_dft_colors" != no ; then 938AC_MSG_CHECKING(if you want to use default-colors) 939CF_ARG_ENABLE(default-colors, 940[ --enable-default-colors enable use of default-colors (ncurses/slang)], 941 [use_dft_colors=yes], 942 [use_dft_colors=no]) 943AC_MSG_RESULT($use_dft_colors) 944test $use_dft_colors = "yes" && AC_DEFINE(USE_DEFAULT_COLORS,1,[Define to 1 if you want to use default-colors]) 945fi 946 947dnl -------------------------------------------------------------------------- 948AC_MSG_CHECKING(if experimental keyboard-layout logic should be used) 949CF_ARG_ENABLE(kbd-layout, 950[ --enable-kbd-layout use experimental keyboard-layout support], 951 [use_kbd_layout=$enableval], 952 [use_kbd_layout=no]) 953AC_MSG_RESULT($use_kbd_layout) 954test $use_kbd_layout != no && AC_DEFINE(EXP_KEYBOARD_LAYOUT,1,[Define to 1 if experimental keyboard-layout logic should be used]) 955 956dnl -------------------------------------------------------------------------- 957AC_MSG_CHECKING(if experimental nested-table logic should be used) 958CF_ARG_ENABLE(nested-tables, 959[ --enable-nested-tables use experimental nested-table support], 960 [use_nested_tables=$enableval], 961 [use_nested_tables=no]) 962AC_MSG_RESULT($use_nested_tables) 963test $use_nested_tables != no && AC_DEFINE(EXP_NESTED_TABLES,1,[Define to 1 if experimental nested-table logic should be used]) 964 965dnl -------------------------------------------------------------------------- 966dnl Miscellaneous options that don't need to test system features 967dnl -------------------------------------------------------------------------- 968 969CF_HELP_MESSAGE( 970Miscellaneous Options:) 971 972dnl -------------------------------------------------------------------------- 973AC_MSG_CHECKING(if alternative line-edit bindings should be used) 974CF_ARG_ENABLE(alt-bindings, 975[ --disable-alt-bindings disable alternative line-edit bindings], 976 [use_alt_bindings=$enableval], 977 [use_alt_bindings=yes]) 978AC_MSG_RESULT($use_alt_bindings) 979test $use_alt_bindings != no && AC_DEFINE(USE_ALT_BINDINGS,1,[Define to 1 if alternative line-edit bindings should be used]) 980 981dnl -------------------------------------------------------------------------- 982AC_MSG_CHECKING(if ascii case-conversion should be used) 983CF_ARG_DISABLE(ascii-ctypes, 984[ --disable-ascii-ctypes disable use of ascii case-conversion], 985 [use_ascii_ctypes=$enableval], 986 [use_ascii_ctypes=yes]) 987AC_MSG_RESULT($use_ascii_ctypes) 988test $use_ascii_ctypes != no && AC_DEFINE(USE_ASCII_CTYPES,1,[Define to 1 if ascii case-conversion should be used]) 989 990dnl -------------------------------------------------------------------------- 991AC_MSG_CHECKING(if you want to use extended HTML DTD logic) 992CF_ARG_DISABLE(extended-dtd, 993[ --disable-extended-dtd disable extended HTML DTD logic], 994 [use_ext_htmldtd=no], 995 [use_ext_htmldtd=yes]) 996AC_MSG_RESULT($use_ext_htmldtd) 997test $use_ext_htmldtd = "no" && AC_DEFINE(NO_EXTENDED_HTMLDTD,1,[Define to 1 if you want to use extended HTML DTD logic]) 998 999dnl -------------------------------------------------------------------------- 1000AC_MSG_CHECKING(if file-upload logic should be used) 1001CF_ARG_DISABLE(file-upload, 1002[ --disable-file-upload disable file-upload support], 1003 [use_file_upload=$enableval], 1004 [use_file_upload=yes]) 1005AC_MSG_RESULT($use_file_upload) 1006test $use_file_upload != no && AC_DEFINE(USE_FILE_UPLOAD,1,[Define to 1 if file-upload logic should be used]) 1007 1008dnl -------------------------------------------------------------------------- 1009AC_MSG_CHECKING(if IDNA support should be used) 1010CF_ARG_DISABLE(idna, 1011[ --disable-idna disable IDNA support], 1012 [use_idna=$enableval], 1013 [use_idna=yes]) 1014AC_MSG_RESULT($use_idna) 1015 1016if test "$use_idna" = yes ; then 1017 CF_WITH_IDNA($use_idna) 1018fi 1019 1020dnl -------------------------------------------------------------------------- 1021AC_MSG_CHECKING(if element-justification logic should be used) 1022CF_ARG_DISABLE(justify-elts, 1023[ --disable-justify-elts disable element-justification logic], 1024 [use_justify_elts=$enableval], 1025 [use_justify_elts=yes]) 1026AC_MSG_RESULT($use_justify_elts) 1027test $use_justify_elts != no && AC_DEFINE(USE_JUSTIFY_ELTS,1,[Define to 1 if element-justification logic should be used]) 1028 1029dnl -------------------------------------------------------------------------- 1030AC_MSG_CHECKING(if partial-display should be used) 1031CF_ARG_DISABLE(partial, 1032[ --disable-partial disable partial-display logic], 1033 [use_partial_display=$enableval], 1034 [use_partial_display=yes]) 1035AC_MSG_RESULT($use_partial_display) 1036test $use_partial_display != no && AC_DEFINE(DISP_PARTIAL,1,[Define to 1 if partial-display should be used]) 1037 1038dnl -------------------------------------------------------------------------- 1039AC_MSG_CHECKING(if persistent-cookie logic should be used) 1040CF_ARG_DISABLE(persistent-cookies, 1041[ --disable-persistent-cookies disable persistent-cookie support], 1042 [use_filed_cookies=$enableval], 1043 [use_filed_cookies=yes]) 1044AC_MSG_RESULT($use_filed_cookies) 1045test $use_filed_cookies != no && AC_DEFINE(USE_PERSISTENT_COOKIES,1,[Define to 1 if persistent-cookie logic should be used]) 1046 1047dnl -------------------------------------------------------------------------- 1048AC_MSG_CHECKING(if html source should be colorized) 1049CF_ARG_DISABLE(prettysrc, 1050[ --disable-prettysrc disable colorization of HTML source], 1051 [use_prettysrc=$enableval], 1052 [use_prettysrc=yes]) 1053AC_MSG_RESULT($use_prettysrc) 1054test $use_prettysrc != no && AC_DEFINE(USE_PRETTYSRC,1,[Define to 1 if html source should be colorized]) 1055 1056dnl -------------------------------------------------------------------------- 1057AC_MSG_CHECKING(if progress-bar code should be used) 1058CF_ARG_DISABLE(progressbar, 1059[ --disable-progressbar disable progress-bar], 1060 [use_progressbar=$enableval], 1061 [use_progressbar=yes]) 1062AC_MSG_RESULT($use_progressbar) 1063test $use_progressbar != no && AC_DEFINE(USE_PROGRESSBAR,1,[Define to 1 if progress-bar code should be used]) 1064 1065dnl -------------------------------------------------------------------------- 1066AC_MSG_CHECKING(if read-progress message should show ETA) 1067CF_ARG_DISABLE(read-eta, 1068[ --disable-read-eta disable read-progress message shows ETA], 1069 [use_read_eta=$enableval], 1070 [use_read_eta=yes]) 1071AC_MSG_RESULT($use_read_eta) 1072test $use_read_eta != no && AC_DEFINE(USE_READPROGRESS,1,[Define to 1 if read-progress message should show ETA]) 1073 1074dnl -------------------------------------------------------------------------- 1075AC_MSG_CHECKING(if source caching should be used) 1076CF_ARG_DISABLE(source-cache, 1077[ --disable-source-cache do not cache HTML source for parse mode changes], 1078 [use_source_cache=$enableval], 1079 [use_source_cache=yes]) 1080AC_MSG_RESULT($use_source_cache) 1081test $use_source_cache != no && AC_DEFINE(USE_SOURCE_CACHE,1,[Define to 1 if source caching should be used]) 1082 1083dnl -------------------------------------------------------------------------- 1084AC_MSG_CHECKING(if scrollbar code should be used) 1085CF_ARG_DISABLE(scrollbar, 1086[ --disable-scrollbar disable scrollbar with mouse], 1087 [use_scrollbar=$enableval], 1088 [use_scrollbar=yes]) 1089AC_MSG_RESULT($use_scrollbar) 1090 1091dnl -------------------------------------------------------------------------- 1092AC_MSG_CHECKING(if charset-selection logic should be used) 1093CF_ARG_ENABLE(charset-choice, 1094[ --enable-charset-choice use charset-selection logic], 1095 [use_charset_choice=$enableval], 1096 [use_charset_choice=no]) 1097AC_MSG_RESULT($use_charset_choice) 1098test $use_charset_choice != no && AC_DEFINE(USE_CHARSET_CHOICE,1,[Define to 1 if charset-selection logic should be used]) 1099 1100dnl -------------------------------------------------------------------------- 1101AC_MSG_CHECKING(if you want to use external commands) 1102CF_ARG_ENABLE(externs, 1103[ --enable-externs use external commands], 1104 [use_externs=yes], 1105 [use_externs=no]) 1106AC_MSG_RESULT($use_externs) 1107if test $use_externs != "no" ; then 1108 AC_DEFINE(USE_EXTERNALS,1,[Define to 1 if you want to use external commands]) 1109 EXTRA_OBJS="$EXTRA_OBJS LYExtern\$o" 1110fi 1111 1112dnl -------------------------------------------------------------------------- 1113AC_MSG_CHECKING(if you want to use setfont support) 1114CF_ARG_ENABLE(font-switch, 1115[ --enable-font-switch use Linux setfont for character-translation], 1116 [use_setfont=yes], 1117 [use_setfont=no]) 1118AC_MSG_RESULT($use_setfont) 1119if test $use_setfont = yes ; then 1120 case $host_os in 1121 linux*) 1122 CF_PATH_PROG(SETFONT, consolechars, setfont) 1123 ;; 1124 os2*) 1125 SETFONT=built-in 1126 CF_VERBOSE(Assume $host_os has font-switching) 1127 ;; 1128 *) 1129 SETFONT=unknown 1130 CF_VERBOSE(Assume $host_os has no font-switching) 1131 ;; 1132 esac 1133 if test -z "$SETFONT" ; then 1134 AC_MSG_WARN(Cannot find a font-setting program) 1135 elif test "$SETFONT" != unknown ; then 1136 AC_DEFINE(EXP_CHARTRANS_AUTOSWITCH,1,[Define to 1 if you want to use setfont support]) 1137 fi 1138fi 1139 1140dnl -------------------------------------------------------------------------- 1141AC_MSG_CHECKING(if you want cgi-link support) 1142CF_ARG_ENABLE(cgi-links, 1143[ --enable-cgi-links support cgi links w/o a http daemon], 1144 [AC_DEFINE(LYNXCGI_LINKS,1,[Define to 1 if you want cgi-link support])]) 1145AC_MSG_RESULT($enableval) 1146 1147dnl -------------------------------------------------------------------------- 1148AC_MSG_CHECKING(if you want change-exec support) 1149CF_ARG_ENABLE(change-exec, 1150[ --enable-change-exec allow users to change exec options], 1151 [use_change_exec=yes], 1152 [use_change_exec=no]) 1153AC_MSG_RESULT($use_change_exec) 1154test $use_change_exec = yes && AC_DEFINE(ENABLE_OPTS_CHANGE_EXEC,1,[Define to 1 if you want change-exec support]) 1155 1156dnl -------------------------------------------------------------------------- 1157AC_MSG_CHECKING(if you want exec-links support) 1158CF_ARG_OPTION(exec-links, 1159[ --enable-exec-links allow lynx to execute programs accessed via a link], 1160 [use_exec_links=$enableval], 1161 [use_exec_links=$enableval], 1162 [$use_change_exec]) 1163AC_MSG_RESULT($use_exec_links) 1164test $use_exec_links = yes && AC_DEFINE(EXEC_LINKS,1,[Define to 1 if you want exec-links support]) 1165 1166dnl -------------------------------------------------------------------------- 1167AC_MSG_CHECKING(if you want exec-scripts support) 1168CF_ARG_OPTION(exec-scripts, 1169[ --enable-exec-scripts allow lynx to execute programs inferred from a link], 1170 [use_exec_scripts=$enableval], 1171 [use_exec_scripts=$enableval], 1172 [$use_change_exec]) 1173AC_MSG_RESULT($use_exec_scripts) 1174test $use_exec_scripts = yes && AC_DEFINE(EXEC_SCRIPTS,1,[Define to 1 if you want exec-scripts support]) 1175 1176dnl -------------------------------------------------------------------------- 1177AC_MSG_CHECKING(if you want internal-links feature) 1178CF_ARG_ENABLE(internal-links, 1179[ --enable-internal-links handle following links to same doc differently], 1180 [use_internal_links=yes], 1181 [use_internal_links=no]) 1182AC_MSG_RESULT($use_internal_links) 1183test $use_internal_links = yes && AC_DEFINE(TRACK_INTERNAL_LINKS,1,[Define to 1 if you want internal-links feature]) 1184 1185dnl -------------------------------------------------------------------------- 1186AC_MSG_CHECKING(if you want to fork NSL requests) 1187CF_ARG_ENABLE(nsl-fork, 1188[ --enable-nsl-fork fork NSL requests, allowing them to be aborted], 1189 [use_nsl_fork=yes], 1190 [use_nsl_fork=no]) 1191AC_MSG_RESULT($use_nsl_fork) 1192if test $use_nsl_fork = yes ; then 1193 case $host_os in 1194 mingw*) 1195 AC_DEFINE(_WINDOWS_NSL,1,[Define to 1 if we want NSL-fork with Windows]) 1196 ;; 1197 *) 1198 AC_DEFINE(NSL_FORK,1,[Define to 1 if we want NSL-fork]) 1199 ;; 1200 esac 1201fi 1202 1203dnl -------------------------------------------------------------------------- 1204AC_MSG_CHECKING(if you want to log URL requests via syslog) 1205CF_ARG_ENABLE(syslog, 1206[ --enable-syslog log URL requests via syslog], 1207 [use_syslog=yes], 1208 [use_syslog=no]) 1209AC_MSG_RESULT($use_syslog) 1210test $use_syslog = yes && AC_DEFINE(SYSLOG_REQUESTED_URLS,1,[Define to 1 if you want to log URL requests via syslog]) 1211 1212dnl -------------------------------------------------------------------------- 1213AC_MSG_CHECKING(if you want to underline links) 1214CF_ARG_ENABLE(underlines, 1215[ --enable-underlines underline links rather than using boldface], 1216 [use_underline=yes], 1217 [use_underline=no]) 1218AC_MSG_RESULT($use_underline) 1219test $use_underline = yes && AC_DEFINE(UNDERLINE_LINKS,1,[Define to 1 if xxx]) 1220test $use_underline = no && AC_DEFINE(UNDERLINE_LINKS,0,[Define to 0 if xxx]) 1221 1222dnl -------------------------------------------------------------------------- 1223AC_MSG_CHECKING(if help files should be gzip'ed) 1224CF_ARG_ENABLE(gzip-help, 1225[ --enable-gzip-help install gzip'ed help files], 1226 [use_gzip_help=$enableval], 1227 [use_gzip_help=no]) 1228AC_MSG_RESULT($use_gzip_help) 1229 1230dnl -------------------------------------------------------------------------- 1231AC_MSG_CHECKING(if you want to use libbz2 for decompression of some bzip2 files) 1232AC_ARG_WITH(bzlib, 1233[ --with-bzlib use libbz2 for decompression of some bzip2 files], 1234 [use_bzlib=$withval], 1235 [use_bzlib=no]) 1236AC_MSG_RESULT($use_bzlib) 1237 1238if test ".$use_bzlib" != ".no" ; then 1239 CF_WITH_BZLIB($use_bzlib) 1240 test "x$cf_cv_find_linkage_bz2" = "xyes" && AC_DEFINE(USE_BZLIB,1,[Define to 1 if you want to use libbz2 for decompression of some bzip2 files]) 1241fi 1242 1243dnl -------------------------------------------------------------------------- 1244AC_MSG_CHECKING(if you want to use zlib for decompression of some gzip files) 1245AC_ARG_WITH(zlib, 1246[ --with-zlib use zlib for decompression of some gzip files], 1247 [use_zlib=$withval], 1248 [use_zlib=no]) 1249AC_MSG_RESULT($use_zlib) 1250 1251if test ".$use_zlib" != ".no" ; then 1252 CF_WITH_ZLIB($use_zlib) 1253 test "x$cf_cv_find_linkage_z" = "xyes" && AC_DEFINE(USE_ZLIB,1,[Define to 1 if you want to use zlib for decompression of some gzip files]) 1254fi 1255 1256dnl -------------------------------------------------------------------------- 1257CF_HELP_MESSAGE( 1258Other Network Services:) 1259 1260dnl -------------------------------------------------------------------------- 1261AC_MSG_CHECKING(if you want to exclude FINGER code) 1262CF_ARG_DISABLE(finger, 1263[ --disable-finger disable FINGER logic], 1264 [use_finger=yes], 1265 [use_finger=no]) 1266AC_MSG_RESULT($use_finger) 1267test $use_finger != "no" && AC_DEFINE(DISABLE_FINGER,1,[Define to 1 if you want to exclude FINGER code]) 1268 1269dnl -------------------------------------------------------------------------- 1270AC_MSG_CHECKING(if you want to exclude GOPHER code) 1271CF_ARG_DISABLE(gopher, 1272[ --disable-gopher disable GOPHER logic], 1273 [use_gopher=yes], 1274 [use_gopher=no]) 1275AC_MSG_RESULT($use_gopher) 1276test $use_gopher != "no" && AC_DEFINE(DISABLE_GOPHER,1,[Define to 1 if you want to exclude GOPHER code]) 1277 1278dnl -------------------------------------------------------------------------- 1279AC_MSG_CHECKING(if you want to exclude NEWS code) 1280CF_ARG_DISABLE(news, 1281[ --disable-news disable NEWS logic], 1282 [use_news=yes], 1283 [use_news=no]) 1284AC_MSG_RESULT($use_news) 1285test $use_news != "no" && AC_DEFINE(DISABLE_NEWS,1,[Define to 1 if you want to exclude NEWS code]) 1286 1287dnl -------------------------------------------------------------------------- 1288AC_MSG_CHECKING(if you want to exclude FTP code) 1289CF_ARG_DISABLE(ftp, 1290[ --disable-ftp disable FTP logic], 1291 [use_ftp=yes], 1292 [use_ftp=no]) 1293AC_MSG_RESULT($use_ftp) 1294test $use_ftp != "no" && AC_DEFINE(DISABLE_FTP,1,[Define to 1 if you want to exclude FTP code]) 1295 1296dnl -------------------------------------------------------------------------- 1297AC_MSG_CHECKING(if you want to include WAIS code) 1298CF_ARG_ENABLE(wais, 1299[ --enable-wais enable WAIS logic], 1300 [use_wais=yes], 1301 [use_wais=no]) 1302AC_MSG_RESULT($use_wais) 1303 1304MAKE_WAIS="#" 1305if test $use_wais != "no" 1306then 1307 AC_CHECK_LIB(wais,fs_free,[ 1308 CF_MATH_LIB 1309 CF_ADD_LIB(wais) 1310 AC_CHECK_HEADERS(wais.h) 1311 MAKE_WAIS= 1312 ],[AC_MSG_WARN(could not find WAIS library)]) 1313fi 1314AC_SUBST(MAKE_WAIS) 1315 1316dnl -------------------------------------------------------------------------- 1317dnl DirEd (directory-editor) options 1318dnl -------------------------------------------------------------------------- 1319 1320CF_HELP_MESSAGE( 1321Directory Editor Options:) 1322 1323# All DirEd functions that were enabled on compilation can be disabled 1324# or modified at run time via DIRED_MENU symbols in lynx.cfg. 1325AC_MSG_CHECKING(if directory-editor code should be used) 1326CF_ARG_DISABLE(dired, 1327[ --disable-dired disable optional directory-editor, DirEd], 1328 [use_dired=$enableval], 1329 [use_dired=yes]) 1330AC_MSG_RESULT($use_dired) 1331 1332if test ".$use_dired" != ".no" ; then 1333 EXTRA_OBJS="$EXTRA_OBJS LYLocal\$o" 1334 AC_DEFINE(DIRED_SUPPORT,1,[Define to 1 if we want dired support]) 1335 1336 AC_MSG_CHECKING(if you wish to allow extracting from archives via DirEd) 1337 CF_ARG_DISABLE(dired-dearchive, 1338 [ --disable-dired-dearchive disable dearchiving commands],[AC_DEFINE(ARCHIVE_ONLY,1,[Define to 1 if you wish to allow extracting from archives via DirEd])]) 1339 AC_MSG_RESULT($enableval) 1340 1341 AC_MSG_CHECKING(if DirEd mode should override keys) 1342 CF_ARG_DISABLE(dired-override, 1343 [ --disable-dired-override disable DirEd override keymap],,[AC_DEFINE(OK_OVERRIDE,1,[Define to 1 if DirEd mode should override keys])]) 1344 AC_MSG_RESULT($enableval) 1345 1346 AC_MSG_CHECKING(if you wish to allow permissions commands via DirEd) 1347 CF_ARG_DISABLE(dired-permit, 1348 [ --disable-dired-permit disable chmod/attrib commands],,[AC_DEFINE(OK_PERMIT,1,[Define to 1 if you wish to allow permissions commands via DirEd])]) 1349 AC_MSG_RESULT($enableval) 1350 1351 AC_MSG_CHECKING(if you wish to allow executable-permission commands via DirEd) 1352 CF_ARG_DISABLE(dired-xpermit, 1353 [ --disable-dired-xpermit disable chmod/attrib commands],[AC_DEFINE(NO_CHANGE_EXECUTE_PERMS,1,[Define to 1 if you wish to allow executable-permission commands via DirEd])]) 1354 AC_MSG_RESULT($enableval) 1355 1356 AC_MSG_CHECKING(if you wish to allow "tar" commands from DirEd) 1357 CF_ARG_DISABLE(dired-tar, 1358 [ --disable-dired-tar disable "tar" command],,[AC_DEFINE(OK_TAR,1,[Define to 1 if if you wish to allow "tar" commands from DirEd])]) 1359 AC_MSG_RESULT($enableval) 1360 1361 AC_MSG_CHECKING(if you wish to allow "uudecode" commands from DirEd) 1362 CF_ARG_DISABLE(dired-uudecode, 1363 [ --disable-dired-uudecode disable "uudecode" command],,[AC_DEFINE(OK_UUDECODE,1,[Define to 1 if you wish to allow "uudecode" commands from DirEd])]) 1364 AC_MSG_RESULT($enableval) 1365 1366 AC_MSG_CHECKING(if you wish to allow "zip" and "unzip" commands from DirEd) 1367 CF_ARG_DISABLE(dired-zip, 1368 [ --disable-dired-zip disable "zip", "unzip" commands],,[AC_DEFINE(OK_ZIP,1,[Define to 1 if you wish to allow "zip" and "unzip" commands from DirEd])]) 1369 AC_MSG_RESULT($enableval) 1370 1371 AC_MSG_CHECKING(if you wish to allow "gzip" and "gunzip" commands from DirEd) 1372 CF_ARG_DISABLE(dired-gzip, 1373 [ --disable-dired-gzip disable "gzip", "gunzip" commands],,[AC_DEFINE(OK_GZIP,1,[Define to 1 if you wish to allow "gzip" and "gunzip" commands from DirEd])]) 1374 AC_MSG_RESULT($enableval) 1375fi 1376 1377dnl -------------------------------------------------------------------------- 1378AC_MSG_CHECKING(if you want long-directory listings) 1379CF_ARG_DISABLE(long-list, 1380[ --disable-long-list disable long "ls -l" directory listings],, 1381 [AC_DEFINE(LONG_LIST,1,[Define to 1 if you want long-directory listings])]) 1382AC_MSG_RESULT($enableval) 1383 1384dnl -------------------------------------------------------------------------- 1385AC_MSG_CHECKING(if parent-directory references are permitted) 1386CF_ARG_DISABLE(parent-dir-refs, 1387[ --disable-parent-dir-refs 1388 disable "Up-to" links in directory listings], 1389 [AC_DEFINE(NO_PARENT_DIR_REFERENCE,1,[Define to 1 if parent-directory references are permitted])]) 1390AC_MSG_RESULT($enableval) 1391 1392dnl -------------------------------------------------------------------------- 1393CF_PATH_PROG(TELNET, telnet) 1394CF_PATH_PROG(TN3270, tn3270) 1395CF_PATH_PROG(RLOGIN, rlogin) 1396 1397CF_PATH_PROG(MV, mv) 1398 1399CF_PATH_PROG(GZIP, gzip) 1400CF_PATH_PROG(UNCOMPRESS,gunzip) 1401CF_PATH_PROG(UNZIP, unzip) 1402CF_PATH_PROG(BZIP2, bzip2) 1403 1404CF_PATH_PROG(TAR, tar, pax gtar gnutar bsdtar star) 1405CF_TAR_OPTIONS($TAR) 1406AC_DEFINE_UNQUOTED(TAR_UP_OPTIONS, "$TAR_UP_OPTIONS",[Define to command for tar'ing up files]) 1407AC_DEFINE_UNQUOTED(TAR_DOWN_OPTIONS, "$TAR_DOWN_OPTIONS",[Define to command for untar'ing files]) 1408AC_DEFINE_UNQUOTED(TAR_FILE_OPTIONS, "$TAR_FILE_OPTIONS",[Define to options for tar to work with files]) 1409AC_DEFINE_UNQUOTED(TAR_PIPE_OPTIONS, "$TAR_PIPE_OPTIONS",[Define to options for tar to work with pipes]) 1410 1411dnl -------------------------------------------------------------------------- 1412dnl Test features that rely on configure-definitions 1413dnl -------------------------------------------------------------------------- 1414if test ".$use_dired" != ".no" ; then 1415 1416CF_PATH_PROG(COMPRESS, compress) 1417CF_PATH_PROG(RM, rm) 1418CF_PATH_PROG(UUDECODE, uudecode) 1419CF_PATH_PROG(ZCAT, zcat) 1420CF_PATH_PROG(ZIP, zip) 1421 1422dnl 'INSTALL' is a special case, since the configure script has to find a 1423dnl BSD-compatible one so the build/install works properly. 1424case "$INSTALL" in 1425$srcdir*) # (vi 1426 AC_DEFINE_UNQUOTED(INSTALL_PATH,"install") 1427 ;; 1428*) # (vi 1429 cf_save_INSTALL="$INSTALL" 1430 CF_PATH_PROG(INSTALL, install) 1431 INSTALL="$cf_save_INSTALL" 1432 ;; 1433esac 1434fi 1435 1436COMPRESS_PROG= 1437COMPRESS_EXT= 1438if test $use_gzip_help = yes ; then 1439 COMPRESS_PROG="$ac_cv_path_GZIP -9" 1440 COMPRESS_EXT=.gz 1441fi 1442AC_SUBST(COMPRESS_PROG) 1443AC_SUBST(COMPRESS_EXT) 1444 1445if test $cf_cv_screen = pdcurses ; then 1446 CF_HELP_MESSAGE(Special Libraries for PDCurses X11:) 1447 CF_PDCURSES_X11 1448else 1449 CF_TERMIO_AND_CURSES(LYCurses.h) 1450fi 1451 1452### These tests must be run after establishing the curses library. 1453if test $cf_cv_screen != slang ; then 1454 AC_CHECK_HEADERS($cf_cv_screen/term.h term.h) 1455 CF_ALT_CHAR_SET 1456 CF_FANCY_CURSES 1457 CF_FUNC_CURSES_VERSION 1458 CF_NCURSES_BROKEN 1459 CF_COLOR_CURSES 1460 CF_SIZECHANGE 1461 CF_TTYTYPE 1462 if test "$use_wide_curses" = yes ; then 1463 CF_WIDEC_CURSES 1464 fi 1465 CF_CURSES_FUNCS( \ 1466 assume_default_colors \ 1467 cbreak \ 1468 define_key \ 1469 delscreen \ 1470 getattrs \ 1471 getbegx \ 1472 getbegy \ 1473 keypad \ 1474 napms \ 1475 newpad \ 1476 newterm \ 1477 pnoutrefresh \ 1478 resizeterm \ 1479 touchline \ 1480 touchwin \ 1481 use_default_colors \ 1482 use_legacy_coding \ 1483 wattr_get \ 1484 wborder \ 1485 wredrawln \ 1486 wresize \ 1487 ) 1488 AC_CHECK_FUNCS( \ 1489 _nc_free_and_exit \ 1490 _nc_freeall \ 1491 ) 1492fi 1493 1494if test $use_color_style != no ; then 1495 if test .$cf_cv_color_curses != .yes ; then 1496 AC_ERROR(Configuration does not support color-styles) 1497 fi 1498 if test $cf_cv_screen = slang ; then 1499 AC_ERROR(Configuration does not support color-styles) 1500 fi 1501fi 1502 1503if test $use_scrollbar != no ; then 1504 if test .$cf_cv_fancy_curses != .yes ; then 1505 AC_MSG_WARN(Configuration does not support ACS_xxx definitions) 1506 else 1507 AC_DEFINE(USE_SCROLLBAR,1,[Define to 1 if configuration supports ACS_xxx definitions]) 1508 fi 1509fi 1510 1511# use rpath for libraries in unusual places 1512CF_DISABLE_RPATH_HACK 1513 1514### Finally, build config.h and the makefiles 1515test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh 1516AC_SUBST(CONFIG_SHELL) 1517 1518CFLAGS="$CFLAGS $EXTRA_CFLAGS" 1519srcdir="$srcdir" 1520SRCDIR_CLEAN="#" 1521if test -n "$srcdir" ; then 1522 echo srcdir is $srcdir 1523 mkdir -p WWW/Library/Implementation 1524 mkdir -p src/chrtrans 1525 test "$USE_INCLUDED_LIBINTL" = yes && mkdir -p intl 1526 test "$srcdir" != "." && SRCDIR_CLEAN="" 1527fi 1528 1529AC_SUBST(SRCDIR_CLEAN) 1530AC_OUTPUT( 1531 [makefile \ 1532 WWW/Library/Implementation/makefile \ 1533 src/makefile \ 1534 src/chrtrans/makefile \ 1535 $SUB_MAKEFILE 1536 ],[ 1537 if test "$USE_NLS" = yes ; then 1538 if test "$use_our_messages" = yes ; then 1539 echo creating po/makefile 1540 rm -f po/temp$$ 1541 sed -e 's%^.*LYMessages.c% ../LYMessages.c%' \ 1542 -e '$s/\\//' po/POTFILES >po/temp$$ 1543 sed -e "/POTFILES =/r po/temp$$" \ 1544 po/makefile.in > po/makefile 1545 rm -f po/temp$$ 1546 fi 1547 fi 1548 ],[ 1549 USE_NLS=$USE_NLS 1550 use_our_messages=$use_our_messages 1551 ] 1552) 1553