configure.in 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321
  1. dnl Process this file with autoconf to produce a configure script.
  2. dnl written jan/1997
  3. dnl by T.E.Dickey <dickey@invisible-island.net>
  4. dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>
  5. dnl ---------------------------------------------------------------------------
  6. dnl Copyright 1997-2005,2006 by Thomas E. Dickey
  7. dnl
  8. dnl Permission to use, copy, modify, and distribute this software and its
  9. dnl documentation for any purpose and without fee is hereby granted,
  10. dnl provided that the above copyright notice appear in all copies and that
  11. dnl both that copyright notice and this permission notice appear in
  12. dnl supporting documentation, and that the name of the above listed
  13. dnl copyright holder(s) not be used in advertising or publicity pertaining
  14. dnl to distribution of the software without specific, written prior
  15. dnl permission.
  16. dnl
  17. dnl THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
  18. dnl TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  19. dnl AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
  20. dnl LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  21. dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  22. dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  23. dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24. dnl ---------------------------------------------------------------------------
  25. dnl
  26. dnl ask PRCS to plug-in the project-version for the configure-script.
  27. dnl $Format: "AC_REVISION($ProjectVersion$)"$
  28. AC_REVISION(2.8.6rel.4)
  29. # Save the original $CFLAGS so we can distinguish whether the user set those
  30. # in the environment, or whether autoconf added -O and -g options:
  31. ORIGINAL_CFLAGS="$CFLAGS"
  32. # For autoconf 2.13, make sure we have no cache file at the beginning of this
  33. # script. That fixes problems with tests whose cached values change from one
  34. # run to the next, as well as with tests that are order-dependent.
  35. rm -f config.cache
  36. AC_PREREQ(2.13.20020210)
  37. AC_INIT(userdefs.h)
  38. # autoconf 2.5x defaults to no cache file; we need the cache file's information
  39. # for building the config page. But start with it empty to avoid confusion by
  40. # people who don't do a "make distclean" after applying patches.
  41. cache_file=config.cache
  42. rm -f config.cache; touch config.cache
  43. CONFIG_H=lynx_cfg.h
  44. AC_CONFIG_HEADER($CONFIG_H:config.hin)
  45. CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
  46. AC_ARG_WITH(system-type,
  47. [ --with-system-type=XXX test: override derived host system-type],
  48. [AC_MSG_WARN(overriding system type $host_os to $withval)
  49. host_os=$withval])
  50. PACKAGE=lynx
  51. dnl ask PRCS to plug-in the project-version for the packages.
  52. # $Format: "VERSION=$ProjectVersion$"$
  53. VERSION=2.8.6rel.4
  54. AC_SUBST(PACKAGE)
  55. AC_SUBST(VERSION)
  56. AC_SUBST(DESTDIR)
  57. AC_SUBST(CONFIG_H)
  58. dnl Set of available languages (based on source distribution)
  59. test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
  60. AC_PREFIX_DEFAULT(/usr/local)
  61. dnl --------------------------------------------------------------------------
  62. dnl Checks for location of programs
  63. dnl --------------------------------------------------------------------------
  64. dnl Only add to this case statement when a system has a compiler that is not
  65. dnl detected by AC_PROG_CC.
  66. case $host_os in
  67. openedition)
  68. : ${CFLAGS="-D_ALL_SOURCE -Wl,EDIT=NO"}
  69. : ${CC=c89}
  70. ;;
  71. esac
  72. AC_PROG_CC
  73. AC_PROG_CPP
  74. AC_PROG_LN_S
  75. AC_PROG_MAKE_SET
  76. AC_PROG_INSTALL
  77. AC_CHECK_PROGS(LINT, lint alint lclint tdlint, [])
  78. AC_AIX
  79. AC_ISC_POSIX
  80. CF_BUILD_CC([#],[])
  81. AC_CHECK_TOOL(RANLIB, ranlib, ':')
  82. AC_CHECK_TOOL(AR, ar, ar)
  83. CF_SUBST(archiver options,AR_OPTS,rv)
  84. dnl --------------------------------------------------------------------------
  85. dnl Debug/development/test
  86. dnl --------------------------------------------------------------------------
  87. CF_HELP_MESSAGE(
  88. Development Options:)
  89. CF_DISABLE_ECHO
  90. # special case for WWW/*
  91. if test -n "$ECHO_CC" ; then
  92. DONT_ECHO_CC="$SHOW_CC ;"
  93. else
  94. DONT_ECHO_CC=''
  95. fi
  96. AC_SUBST(DONT_ECHO_CC)
  97. AC_MSG_CHECKING(if you want to check memory-leaks)
  98. CF_ARG_ENABLE(find-leaks,
  99. [ --enable-find-leaks logic for testing memory leaks],
  100. [with_leak_checks=yes],
  101. [with_leak_checks=no])
  102. AC_MSG_RESULT($with_leak_checks)
  103. test "$with_leak_checks" = "yes" && AC_DEFINE(LY_FIND_LEAKS)
  104. # The comment about adding -g to $CFLAGS is unclear. Autoconf tries to add
  105. # a -g flag; we remove it if the user's $CFLAGS was not set and debugging is
  106. # disabled.
  107. AC_MSG_CHECKING(if you want to enable debug-code)
  108. CF_ARG_ENABLE(debug,
  109. [ --enable-debug compile w/ debugging (if \$CFLAGS is set, add -g there, too)],
  110. [with_debug=yes],
  111. [with_debug=no])
  112. AC_MSG_RESULT($with_debug)
  113. if test "$with_debug" = "yes" ; then
  114. case $host_os in
  115. ultrix*|osf*)
  116. test -z "$ORIGINAL_CFLAGS" && CF_STRIP_O_OPT(CFLAGS)
  117. if test -z "$GCC" ; then
  118. CFLAGS="$CFLAGS -g3"
  119. fi
  120. ;;
  121. esac
  122. else
  123. case $host_os in
  124. osf*) #(vi
  125. test -z "$GCC" && CFLAGS="$CFLAGS -std1"
  126. test -z "$ORIGINAL_CFLAGS" && CF_STRIP_G_OPT(CFLAGS)
  127. ;;
  128. *)
  129. test -z "$ORIGINAL_CFLAGS" && CF_STRIP_G_OPT(CFLAGS)
  130. ;;
  131. esac
  132. fi
  133. AC_MSG_CHECKING(if you want to enable lynx trace code *recommended* )
  134. CF_ARG_DISABLE(trace,
  135. [ --disable-trace disable logic for trace code],
  136. [with_trace=$enableval],
  137. [with_trace=yes])
  138. AC_MSG_RESULT($with_trace)
  139. test $with_trace = no && AC_DEFINE(NO_LYNX_TRACE)
  140. AC_MSG_CHECKING(if you want verbose trace code)
  141. CF_ARG_ENABLE(vertrace,
  142. [ --enable-vertrace verbose trace code],
  143. [with_vertrace=yes],
  144. [with_vertrace=no])
  145. AC_MSG_RESULT($with_vertrace)
  146. test $with_vertrace = yes && AC_DEFINE(LY_TRACELINE,__LINE__)
  147. if test -n "$GCC"
  148. then
  149. AC_MSG_CHECKING(if you want to turn on gcc warnings)
  150. CF_ARG_ENABLE(warnings,
  151. [ --enable-warnings GCC compiler warnings],
  152. [with_warnings=yes],
  153. [with_warnings=no])
  154. AC_MSG_RESULT($with_warnings)
  155. if test "$with_warnings" = "yes"
  156. then
  157. CF_GCC_ATTRIBUTES
  158. CF_GCC_WARNINGS
  159. fi
  160. fi
  161. AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
  162. AC_ARG_WITH(dbmalloc,
  163. [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
  164. [with_dbmalloc=$withval],
  165. [with_dbmalloc=no])
  166. AC_MSG_RESULT($with_dbmalloc)
  167. if test $with_dbmalloc = yes ; then
  168. AC_CHECK_LIB(dbmalloc,debug_malloc)
  169. fi
  170. AC_MSG_CHECKING(if you want to link with dmalloc for testing)
  171. AC_ARG_WITH(dmalloc,
  172. [ --with-dmalloc test: use Gray Watson's dmalloc library],
  173. [with_dmalloc=$withval],
  174. [with_dmalloc=no])
  175. AC_MSG_RESULT($with_dmalloc)
  176. if test $with_dmalloc = yes ; then
  177. AC_CHECK_LIB(dmalloc,dmalloc_debug)
  178. fi
  179. dnl --------------------------------------------------------------------------
  180. dnl Checks for compiler & standard-library characteristics
  181. dnl --------------------------------------------------------------------------
  182. dnl If we're able to run this script, this is true!
  183. AC_DEFINE(UNIX)
  184. AC_C_CONST
  185. dnl Only add to this case statement things that we cannot design tests for.
  186. CF_PROG_EXT
  187. TRY_CFLAGS=
  188. case $host_os in
  189. aix4*)
  190. TRY_CFLAGS="$TRY_CFLAGS -DAIX4 -D_BSD=44 -D_AIX"
  191. LIBS="$LIBS -lbsd"
  192. ;;
  193. aix*)
  194. TRY_CFLAGS="$TRY_CFLAGS -D_ACS_COMPAT_CODE"
  195. LIBS="$LIBS -lbsd"
  196. ;;
  197. apollo*)
  198. TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4"
  199. ;;
  200. bsdi*)
  201. TRY_CFLAGS="$TRY_CFLAGS -DBSDI"
  202. ;;
  203. clix*)
  204. # Tested on CLIX 3.1 (T.Dickey). The original makefile entry
  205. # contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also
  206. # references -lmalloc and -lbsd.
  207. AC_CHECK_LIB(c_s,strcmp)
  208. ;;
  209. convex*)
  210. TRY_CFLAGS="$TRY_CFLAGS -D__STDC__ -Dunix"
  211. ;;
  212. cygwin*)
  213. TRY_CFLAGS="$TRY_CFLAGS -DWIN_EX -D_WINDOWS_NSL"
  214. LIBS="$LIBS -luser32"
  215. ;;
  216. dgux*)
  217. TRY_CFLAGS="$TRY_CFLAGS -DDGUX"
  218. ;;
  219. hpux*)
  220. TRY_CFLAGS="$TRY_CFLAGS -DSNAKE -D_XOPEN_SOURCE_EXTENDED"
  221. test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000 -DSYS_HPUX"
  222. ;;
  223. isc*)
  224. # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
  225. TRY_CFLAGS="$TRY_CFLAGS -DISC -DPOSIX_JC"
  226. LIBS="$LIBS -linet -lnsl_s -lcposix"
  227. ;;
  228. irix6.*) #(vi
  229. TRY_CFLAGS="$TRY_CFLAGS -DSYS_IRIX64"
  230. ;;
  231. irix*)
  232. # The original makefile used the $CFLAGS option -cckr for some form
  233. # of K&R compatibility. However, this causes compilation warnings for
  234. # varargs on IRIX 5.2, and does not appear to be needed.
  235. ;;
  236. linux*)
  237. TRY_CFLAGS="$TRY_CFLAGS -DLINUX"
  238. ;;
  239. msdosdjgpp*)
  240. LIBS="$LIBS -lwatt"
  241. TRY_CFLAGS="$TRY_CFLAGS -DDOSPATH -DNOUSERS"
  242. ;;
  243. next*)
  244. TRY_CFLAGS="$TRY_CFLAGS -DNEXT"
  245. ;;
  246. openbsd* | ekkobsd* | mirbsd*)
  247. LIBS="$LIBS -lcompat"
  248. ;;
  249. osf4*)
  250. # The -Olimit flag (see below) is no longer available with
  251. # Digital C 5.2, which is bundled with Digital UNIX 4.0.
  252. TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
  253. ;;
  254. osf*)
  255. # Increase the maximum size of functions that will be optimized.
  256. test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000"
  257. TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
  258. ;;
  259. sco3.2v5*)
  260. test $ac_cv_prog_gcc != yes && TRY_CFLAGS="$TRY_CFLAGS -belf"
  261. ;;
  262. sco*)
  263. LIBS="$LIBS -lmalloc"
  264. # It's a little late to do much, but try to warn user if he's using
  265. # SCO's cc (which is reported to have broken const/volatile).
  266. case "$CC" in #(vi
  267. cc|*/cc)
  268. AC_MSG_WARN(You should consider using gcc or rcc if available)
  269. unset ac_cv_prog_CC
  270. AC_CHECK_PROGS(CC,gcc rcc,$CC)
  271. ;;
  272. esac
  273. ;;
  274. sequent-ptx)
  275. TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
  276. ;;
  277. sequent-ptx2)
  278. TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT"
  279. ;;
  280. sony-newsos*)
  281. TRY_CFLAGS="$TRY_CFLAGS -I/usr/sony/include"
  282. AC_CHECK_HEADERS(jcurses.h)
  283. ;;
  284. svr4)
  285. TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DSVR4"
  286. ;;
  287. sunos3*)
  288. TRY_CFLAGS="$TRY_CFLAGS -DSUN"
  289. ;;
  290. sunos4*)
  291. TRY_CFLAGS="$TRY_CFLAGS -DSUN -DSUN4"
  292. ;;
  293. ultrix*)
  294. # Increase the maximum size of functions that will be optimized.
  295. test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7"
  296. TRY_CFLAGS="$TRY_CFLAGS -DULTRIX"
  297. AC_CHECK_HEADERS(cursesX.h,
  298. [AC_DEFINE(HAVE_CURSESX_H)
  299. cf_cv_ncurses_header=cursesX.h])
  300. ;;
  301. esac
  302. CF_ANSI_CC_REQD
  303. dnl --------------------------------------------------------------------------
  304. dnl --------------------------------------------------------------------------
  305. CF_HELP_MESSAGE(
  306. Basic Configuration Options:)
  307. CF_LARGEFILE
  308. dnl internationalization macros
  309. CF_BUNDLED_INTL(makefile,disable)
  310. INTLDIR_CPPFLAGS="#"
  311. if test -z "$INTLDIR_MAKE" ; then
  312. INTLDIR_CPPFLAGS=
  313. fi
  314. AC_SUBST(INTLDIR_CPPFLAGS)
  315. CF_WITH_PATH(nls-datadir,
  316. [ --with-nls-datadir=DIR NLS data, parent of locale],
  317. NLS_DATADIR,
  318. [PREFIX/DATADIR],
  319. [$prefix/$DATADIRNAME])
  320. AC_MSG_CHECKING(if you want full utility pathnames)
  321. CF_ARG_DISABLE(full-paths,
  322. [ --disable-full-paths control whether full utility pathnames are used],
  323. [with_full_paths=no],
  324. [with_full_paths=yes])
  325. AC_MSG_RESULT($with_full_paths)
  326. test $with_full_paths = no && AC_DEFINE(USE_EXECVP)
  327. CF_DEFINE_PROG(system mailer, SYSTEM_MAIL,
  328. /usr/mmdf/bin/submit \
  329. /usr/sbin/sendmail \
  330. /usr/lib/sendmail \
  331. )
  332. CF_SYSTEM_MAIL_FLAGS
  333. if test -n "$SYSTEM_MAIL" ; then
  334. if test $with_full_paths = no ; then
  335. SYSTEM_MAIL=`basename $SYSTEM_MAIL`
  336. fi
  337. fi
  338. CF_XOPEN_SOURCE(600,199506L)
  339. CF_SIGWINCH
  340. dnl Collect tests for compiler options into one place
  341. if test -n "$TRY_CFLAGS" ; then
  342. CF_CHECK_CFLAGS($TRY_CFLAGS)
  343. fi
  344. dnl --------------------------------------------------------------------------
  345. dnl Checks for library configuration (added right-to-left)
  346. dnl --------------------------------------------------------------------------
  347. ### Look for network libraries first, since some functions (such as gethostname)
  348. ### are used in a lot of places.
  349. AC_CACHE_CHECK(if you want ssl library,cf_cv_use_libssl,[
  350. AC_ARG_WITH(ssl,
  351. [ --with-ssl{=path} link with ssl library if available],
  352. [cf_cv_use_libssl=$withval],
  353. [cf_cv_use_libssl=no])
  354. ])
  355. if test "x$cf_cv_use_libssl" = "xno" ; then
  356. AC_CACHE_CHECK(if you want experimental gnutls support,cf_cv_use_libgnutls,[
  357. AC_ARG_WITH(gnutls,
  358. [ --with-gnutls{=path} link with experimental gnutls support],
  359. [cf_cv_use_libgnutls=$withval],
  360. [cf_cv_use_libgnutls=no])
  361. ])
  362. fi
  363. AC_CACHE_CHECK(if you want socks library,cf_cv_use_libsocks,[
  364. AC_ARG_WITH(socks,
  365. [ --with-socks{=path} link with socks library if available],
  366. [cf_cv_use_libsocks=$withval],
  367. [cf_cv_use_libsocks=no])
  368. ])
  369. AC_CACHE_CHECK(if you want socks5 library,cf_cv_use_libsocks5,[
  370. AC_ARG_WITH(socks5,
  371. [ --with-socks5{=path} link with socks5 library if available],
  372. [cf_cv_use_libsocks5=$withval],
  373. [cf_cv_use_libsocks5=no])
  374. ])
  375. if test "x$cf_cv_use_libsocks" != xno ; then
  376. CF_SOCKS($cf_cv_use_libsocks)
  377. elif test "x$cf_cv_use_libsocks5" != xno ; then
  378. CF_SOCKS5($cf_cv_use_libsocks5)
  379. else
  380. CF_NETLIBS
  381. fi
  382. CF_INET_ADDR
  383. if test "x$cf_cv_use_libssl" != xno ; then
  384. CF_SSL($cf_cv_use_libssl)
  385. elif test "x$cf_cv_use_libgnutls" != xno ; then
  386. CF_GNUTLS($cf_cv_use_libgnutls)
  387. fi
  388. dnl This has to be cached, since there's a lot of interdependent tests.
  389. AC_CACHE_CHECK(for screen type, cf_cv_screen,[
  390. AC_ARG_WITH(screen,
  391. [ --with-screen=XXX select screen type (XXX is curses (default),
  392. ncurses, ncursesw, pdcurses or slang)],
  393. [
  394. case $withval in
  395. curses|ncurses|ncursesw|pdcurses|slang)
  396. cf_cv_screen=$withval
  397. ;;
  398. *) AC_ERROR(Unexpected value)
  399. ;;
  400. esac],
  401. [cf_cv_screen=curses])])
  402. case $cf_cv_screen in
  403. curses|ncurses*)
  404. CF_WITH_CURSES_DIR
  405. ;;
  406. esac
  407. cf_wide_curses=no
  408. dft_color_style=yes
  409. case $cf_cv_screen in
  410. curses)
  411. CF_CURSES_CPPFLAGS
  412. CF_NCURSES_VERSION
  413. CF_CURSES_LIBS
  414. CF_CURS_PERFORMANCE
  415. CF_CURS_TOUCHLINE
  416. ;;
  417. ncurses)
  418. CF_NCURSES_CPPFLAGS
  419. CF_NCURSES_LIBS
  420. CF_NCURSES_VERSION
  421. ;;
  422. ncursesw)
  423. CF_UTF8_LIB
  424. CF_NCURSES_CPPFLAGS(ncursesw)
  425. CF_NCURSES_LIBS(ncursesw)
  426. CF_NCURSES_VERSION
  427. cf_wide_curses=yes
  428. ;;
  429. pdcurses)
  430. cf_cv_ncurses_header=xcurses.h
  431. # do this last, since it changes definition of main: CF_PDCURSES_X11
  432. ;;
  433. slang)
  434. CF_SLANG_UNIX_DEFS
  435. dft_color_style=no
  436. ;;
  437. esac
  438. AC_MSG_CHECKING(if you want the wide-curses features)
  439. CF_ARG_ENABLE(widec,
  440. [ --enable-widec enable wide-curses features],
  441. [use_wide_curses=$enableval],
  442. [use_wide_curses=$cf_wide_curses])
  443. AC_MSG_RESULT($use_wide_curses)
  444. AC_MSG_CHECKING(for the default configuration-file)
  445. CF_WITH_PATH(cfg-file,
  446. [ --with-cfg-file{=path} specify the default configuration file
  447. ],
  448. LYNX_CFG_FILE,
  449. SYSCONFDIR/lynx.cfg,
  450. $sysconfdir/lynx.cfg)
  451. AC_MSG_RESULT($LYNX_CFG_FILE)
  452. test "$LYNX_CFG_FILE" = no && LYNX_CFG_FILE=
  453. AC_DEFINE_UNQUOTED(LYNX_CFG_FILE,"$LYNX_CFG_FILE")
  454. dnl --------------------------------------------------------------------------
  455. dnl Check for subsets of compiled-in tables.
  456. dnl --------------------------------------------------------------------------
  457. CHARSET_DEFS=
  458. AC_SUBST(CHARSET_DEFS)
  459. AC_MSG_CHECKING(if you want only a few charsets)
  460. AC_ARG_WITH(charsets,
  461. [ --with-charsets=list limit charsets to given list of MIME names],
  462. [cf_charsets=$withval],
  463. [cf_charsets=])
  464. if test -n "$cf_charsets" ; then
  465. AC_MSG_RESULT(yes)
  466. AC_DEFINE(ALL_CHARSETS,0)
  467. cf_min_charsets=us-ascii,iso-8859-1,utf-8
  468. if test "$cf_charsets" = "no" ; then
  469. cf_charsets=minimal
  470. fi
  471. if test "$cf_charsets" = "minimal" ; then
  472. CF_VERBOSE(using minimal list of charsets: $cf_min_charsets)
  473. fi
  474. cf_charsets=`echo $cf_charsets | sed -e "s/minimal/$cf_min_charsets/g" -e 's/,/ /g'`
  475. for cf_charset in $cf_charsets
  476. do
  477. cf_def_charset=`echo $cf_charset | sed -e 's/+/_/g' -e 's/-/_/g'`
  478. cf_use_charset=no
  479. # check charsets that are defined via .tbl files
  480. if ( egrep '^M'$cf_charset'$' $srcdir/src/chrtrans/*.tbl 2>/dev/null >/dev/null )
  481. then
  482. cf_use_charset=yes
  483. # check charsets that are "built-in"
  484. else
  485. for cf_tst_charset in big5 euc_cn euc_jp euc_kr shift_jis x_transparent
  486. do
  487. if test "$cf_tst_charset" = "$cf_def_charset"
  488. then
  489. cf_use_charset=yes
  490. break
  491. fi
  492. done
  493. fi
  494. if test $cf_use_charset=yes
  495. then
  496. CF_VERBOSE(found $cf_charset)
  497. CHARSET_DEFS="-DNO_CHARSET_${cf_def_charset}=0 $CHARSET_DEFS"
  498. else
  499. CF_VERBOSE(not found $cf_charset)
  500. fi
  501. done
  502. else
  503. AC_MSG_RESULT(no)
  504. fi
  505. dnl --------------------------------------------------------------------------
  506. dnl Checks for standard headers
  507. dnl --------------------------------------------------------------------------
  508. AC_HEADER_STDC
  509. AC_HEADER_TIME
  510. AC_HEADER_DIRENT
  511. dnl Don't check for sys/wait.h here since it is covered by another test.
  512. AC_CHECK_HEADERS( \
  513. arpa/inet.h \
  514. fcntl.h \
  515. limits.h \
  516. stdlib.h \
  517. string.h \
  518. sys/fcntl.h \
  519. sys/filio.h \
  520. sys/ioctl.h \
  521. sys/param.h \
  522. sys/timeb.h \
  523. sys/time.h \
  524. syslog.h \
  525. termio.h \
  526. termios.h \
  527. unistd.h \
  528. vfork.h \
  529. )
  530. CF_TERMIO_AND_TERMIOS
  531. CF_FUNC_SIGACTION
  532. CF_FUNC_WAIT
  533. CF_VARARGS
  534. AC_TYPE_GETGROUPS
  535. AC_TYPE_PID_T
  536. AC_TYPE_UID_T
  537. AC_TYPE_MODE_T
  538. CF_CHECK_TYPE(socklen_t, int, [#include <sys/socket.h>])
  539. dnl --------------------------------------------------------------------------
  540. dnl Checks for library units
  541. dnl --------------------------------------------------------------------------
  542. AC_FUNC_ALLOCA
  543. AC_FUNC_VFORK
  544. CF_FIONBIO
  545. CF_REMOVE_BROKEN
  546. CF_FUNC_LSTAT
  547. AC_CHECK_FUNCS( \
  548. ctermid \
  549. cuserid \
  550. ftime \
  551. getcwd \
  552. getgroups \
  553. gettimeofday \
  554. getuid \
  555. mktemp \
  556. mkdtemp \
  557. popen \
  558. putenv \
  559. readdir \
  560. setuid \
  561. strerror \
  562. truncate \
  563. ttyname \
  564. unsetenv \
  565. usleep \
  566. vasprintf \
  567. waitpid \
  568. zError \
  569. )
  570. AC_REPLACE_FUNCS( \
  571. mktime \
  572. strstr \
  573. )
  574. CF_SRAND(lynx_)
  575. CF_CHECK_FUNCDECLS([#include <string.h>], strstr)
  576. CF_CHECK_FUNCDECLS([
  577. #include <stdio.h>
  578. #include <grp.h>], getgrgid getgrnam)
  579. dnl --------------------------------------------------------------------------
  580. dnl Checks for external-data
  581. dnl --------------------------------------------------------------------------
  582. CF_BOOL_DEFS
  583. CF_ERRNO
  584. CF_SET_ERRNO
  585. CF_LOCALE
  586. CF_NGROUPS
  587. CF_SYS_ERRLIST
  588. CF_UTMP
  589. CF_CHECK_EXTERN_DATA(h_errno,int)
  590. dnl --------------------------------------------------------------------------
  591. dnl Experimental options that don't need to test system features
  592. dnl --------------------------------------------------------------------------
  593. CF_HELP_MESSAGE(
  594. Experimental Options:)
  595. AC_MSG_CHECKING(if bibp: URLs should be supported)
  596. CF_ARG_DISABLE(bibp-urls,
  597. [ --disable-bibp-urls disable support for bibp: URLs],
  598. [use_bibp_urls=$enableval],
  599. [use_bibp_urls=yes])
  600. AC_MSG_RESULT($use_bibp_urls)
  601. test $use_bibp_urls = no && AC_DEFINE(DISABLE_BIBP)
  602. AC_MSG_CHECKING(if configuration info should be browsable)
  603. CF_ARG_DISABLE(config-info,
  604. [ --disable-config-info disable browsable configuration-info],
  605. [use_config_info=$enableval],
  606. [use_config_info=yes])
  607. AC_MSG_RESULT($use_config_info)
  608. test $use_config_info = no && AC_DEFINE(NO_CONFIG_INFO)
  609. AC_MSG_CHECKING(if new-style forms-based options screen should be used)
  610. CF_ARG_DISABLE(forms-options,
  611. [ --disable-forms-options disable forms-based options],
  612. [use_forms_options=$enableval],
  613. [use_forms_options=yes])
  614. AC_MSG_RESULT($use_forms_options)
  615. test $use_forms_options = no && AC_DEFINE(NO_OPTION_FORMS)
  616. AC_MSG_CHECKING(if old-style options menu should be used)
  617. CF_ARG_DISABLE(menu-options,
  618. [ --disable-menu-options disable old-style option menu],
  619. [use_menu_options=$enableval],
  620. [use_menu_options=yes])
  621. AC_MSG_RESULT($use_menu_options)
  622. test $use_menu_options = no && AC_DEFINE(NO_OPTION_MENU)
  623. AC_MSG_CHECKING(if experimental address-list page should be used)
  624. CF_ARG_ENABLE(addrlist-page,
  625. [ --enable-addrlist-page use experimental address-list page],
  626. [use_addrlist_page=$enableval],
  627. [use_addrlist_page=no])
  628. AC_MSG_RESULT($use_addrlist_page)
  629. test $use_addrlist_page != no && AC_DEFINE(EXP_ADDRLIST_PAGE)
  630. AC_MSG_CHECKING(if experimental charset-selection logic should be used)
  631. CF_ARG_ENABLE(charset-choice,
  632. [ --enable-charset-choice use experimental charset-selection logic],
  633. [use_charset_choice=$enableval],
  634. [use_charset_choice=no])
  635. AC_MSG_RESULT($use_charset_choice)
  636. test $use_charset_choice != no && AC_DEFINE(EXP_CHARSET_CHOICE)
  637. AC_MSG_CHECKING(if experimental CJK logic should be used)
  638. CF_ARG_ENABLE(cjk,
  639. [ --enable-cjk use experimental CJK logic],
  640. [use_cjk=$enableval],
  641. [use_cjk=no])
  642. AC_MSG_RESULT($use_cjk)
  643. test $use_cjk != no && AC_DEFINE(CJK_EX)
  644. AC_MSG_CHECKING(if experimental Japanese UTF-8 logic should be used)
  645. CF_ARG_ENABLE(japanese-utf8,
  646. [ --enable-japanese-utf8 use experimental Japanese UTF-8 logic],
  647. [use_ja_utf8=$enableval],
  648. [use_ja_utf8=no])
  649. AC_MSG_RESULT($use_ja_utf8)
  650. if test $use_ja_utf8 != no ; then
  651. AC_DEFINE(EXP_JAPANESEUTF8_SUPPORT)
  652. AC_CHECK_LIB(iconv,libiconv_open)
  653. fi
  654. AC_MSG_CHECKING(if color-style code should be used)
  655. CF_ARG_DISABLE(color-style,
  656. [ --disable-color-style use color style (ncurses/curses)],
  657. [use_color_style=$enableval],
  658. [use_color_style=$dft_color_style])
  659. case $use_color_style in
  660. no)
  661. AC_MSG_RESULT(no)
  662. INSTALL_LSS=
  663. ;;
  664. *)
  665. AC_DEFINE(USE_COLOR_STYLE)
  666. AC_MSG_RESULT(yes)
  667. AC_MSG_CHECKING(for location of style-sheet file)
  668. CF_WITH_PATH(lss-file,
  669. [ --with-lss-file{=path} specify the default style-sheet file
  670. ],
  671. LYNX_LSS_FILE,
  672. SYSCONFDIR/lynx.lss,
  673. $sysconfdir/lynx.lss)
  674. AC_MSG_RESULT($LYNX_LSS_FILE)
  675. test "$LYNX_LSS_FILE" = no && LYNX_LSS_FILE=
  676. AC_DEFINE_UNQUOTED(LYNX_LSS_FILE,"$LYNX_LSS_FILE")
  677. INSTALL_LSS=install-lss
  678. ;;
  679. esac
  680. AC_SUBST(INSTALL_LSS)
  681. use_dft_colors=no
  682. case $cf_cv_screen in
  683. curses|slang|ncurses*)
  684. use_dft_colors=maybe
  685. ;;
  686. esac
  687. if test "$use_dft_colors" != no ; then
  688. AC_MSG_CHECKING(if you want to use default-colors)
  689. CF_ARG_ENABLE(default-colors,
  690. [ --enable-default-colors enable use of default-colors (ncurses/slang)],
  691. [use_dft_colors=yes],
  692. [use_dft_colors=no])
  693. AC_MSG_RESULT($use_dft_colors)
  694. test $use_dft_colors = "yes" && AC_DEFINE(USE_DEFAULT_COLORS)
  695. fi
  696. AC_MSG_CHECKING(if experimental htmlized lynx.cfg should be built)
  697. CF_ARG_ENABLE(htmlized-cfg,
  698. [ --enable-htmlized-cfg build experimental htmlized lynx.cfg],
  699. [use_exp_htmlized_cfg=$enableval],
  700. [use_exp_htmlized_cfg=no])
  701. AC_MSG_RESULT($use_exp_htmlized_cfg)
  702. LYNXCFG_MAKE=''
  703. LYNXCFG_URL=''
  704. if test $use_exp_htmlized_cfg = no ; then
  705. LYNXCFG_MAKE='#'
  706. LYNXCFG_URL='http://www.hippo.ru/%7Ehvv/'
  707. fi
  708. AC_SUBST(LYNXCFG_MAKE)
  709. AC_SUBST(LYNXCFG_URL)
  710. ### check for ipv6 support
  711. AC_MSG_CHECKING([whether to enable ipv6])
  712. CF_ARG_ENABLE(ipv6,
  713. [ --enable-ipv6 use experimental ipv6 (with ipv4) support],
  714. [AC_DEFINE(ENABLE_IPV6)])
  715. AC_MSG_RESULT($enableval)
  716. if test "$enableval" = "yes"; then
  717. CF_CHECK_IPV6
  718. fi
  719. dnl AC_REPLACE_FUNCS(getaddrinfo getnameinfo)
  720. AC_MSG_CHECKING(if experimental keyboard-layout logic should be used)
  721. CF_ARG_ENABLE(kbd-layout,
  722. [ --enable-kbd-layout use experimental keyboard-layout support],
  723. [use_kbd_layout=$enableval],
  724. [use_kbd_layout=no])
  725. AC_MSG_RESULT($use_kbd_layout)
  726. test $use_kbd_layout != no && AC_DEFINE(EXP_KEYBOARD_LAYOUT)
  727. dnl AC_MSG_CHECKING(if experimental JavaScript support should be used)
  728. dnl CF_ARG_ENABLE(libjs,
  729. dnl [ --enable-libjs use experimental JavaScript support (Mozilla libjs)],
  730. dnl [use_libjs=$enableval],
  731. dnl [use_libjs=no])
  732. dnl AC_MSG_RESULT($use_libjs)
  733. dnl test $use_libjs != no && AC_DEFINE(EXP_LIBJS)
  734. AC_MSG_CHECKING(if experimental locale-charset selection logic should be used)
  735. CF_ARG_ENABLE(locale-charset,
  736. [ --enable-locale-charset use experimental locale-charset selection logic],
  737. [use_locale_charset=$enableval],
  738. [use_locale_charset=yes])
  739. AC_MSG_RESULT($use_locale_charset)
  740. test $use_locale_charset != no && AC_DEFINE(EXP_LOCALE_CHARSET)
  741. AC_MSG_CHECKING(if experimental nested-table logic should be used)
  742. CF_ARG_ENABLE(nested-tables,
  743. [ --enable-nested-tables use experimental nested-table support],
  744. [use_nested_tables=$enableval],
  745. [use_nested_tables=no])
  746. AC_MSG_RESULT($use_nested_tables)
  747. test $use_nested_tables != no && AC_DEFINE(EXP_NESTED_TABLES)
  748. AC_MSG_CHECKING(if scrollbar code should be used)
  749. CF_ARG_ENABLE(scrollbar,
  750. [ --enable-scrollbar use experimental scrollbar, with mouse],
  751. [use_scrollbar=$enableval],
  752. [use_scrollbar=no])
  753. AC_MSG_RESULT($use_scrollbar)
  754. dnl --------------------------------------------------------------------------
  755. dnl Miscellaneous options that don't need to test system features
  756. dnl --------------------------------------------------------------------------
  757. CF_HELP_MESSAGE(
  758. Miscellaneous Options:)
  759. AC_MSG_CHECKING(if alternative line-edit bindings should be used)
  760. CF_ARG_ENABLE(alt-bindings,
  761. [ --disable-alt-bindings disable alternative line-edit bindings],
  762. [use_alt_bindings=$enableval],
  763. [use_alt_bindings=yes])
  764. AC_MSG_RESULT($use_alt_bindings)
  765. test $use_alt_bindings != no && AC_DEFINE(EXP_ALT_BINDINGS)
  766. AC_MSG_CHECKING(if you want to use extended HTML DTD logic)
  767. CF_ARG_DISABLE(extended-dtd,
  768. [ --disable-extended-dtd disable extended HTML DTD logic],
  769. [use_ext_htmldtd=no],
  770. [use_ext_htmldtd=yes])
  771. AC_MSG_RESULT($use_ext_htmldtd)
  772. test $use_ext_htmldtd = "no" && AC_DEFINE(NO_EXTENDED_HTMLDTD)
  773. AC_MSG_CHECKING(if file-upload logic should be used)
  774. CF_ARG_DISABLE(file-upload,
  775. [ --disable-file-upload use file-upload support],
  776. [use_file_upload=$enableval],
  777. [use_file_upload=yes])
  778. AC_MSG_RESULT($use_file_upload)
  779. test $use_file_upload != no && AC_DEFINE(USE_FILE_UPLOAD)
  780. AC_MSG_CHECKING(if element-justification logic should be used)
  781. CF_ARG_DISABLE(justify-elts,
  782. [ --enable-justify-elts use element-justification logic],
  783. [use_justify_elts=$enableval],
  784. [use_justify_elts=yes])
  785. AC_MSG_RESULT($use_justify_elts)
  786. test $use_justify_elts != no && AC_DEFINE(EXP_JUSTIFY_ELTS)
  787. AC_MSG_CHECKING(if partial-display should be used)
  788. CF_ARG_DISABLE(partial,
  789. [ --disable-partial use partial-display logic],
  790. [use_partial_display=$enableval],
  791. [use_partial_display=yes])
  792. AC_MSG_RESULT($use_partial_display)
  793. test $use_partial_display != no && AC_DEFINE(DISP_PARTIAL)
  794. AC_MSG_CHECKING(if persistent-cookie logic should be used)
  795. CF_ARG_DISABLE(persistent-cookies,
  796. [ --disable-persistent-cookies disable persistent-cookie support],
  797. [use_filed_cookies=$enableval],
  798. [use_filed_cookies=yes])
  799. AC_MSG_RESULT($use_filed_cookies)
  800. test $use_filed_cookies != no && AC_DEFINE(USE_PERSISTENT_COOKIES)
  801. AC_MSG_CHECKING(if html source should be colorized)
  802. CF_ARG_DISABLE(prettysrc,
  803. [ --disable-prettysrc colorize HTML source],
  804. [use_prettysrc=$enableval],
  805. [use_prettysrc=yes])
  806. AC_MSG_RESULT($use_prettysrc)
  807. test $use_prettysrc != no && AC_DEFINE(USE_PRETTYSRC)
  808. AC_MSG_CHECKING(if read-progress message should show ETA)
  809. CF_ARG_DISABLE(read-eta,
  810. [ --disable-read-eta read-progress message shows ETA],
  811. [use_read_eta=$enableval],
  812. [use_read_eta=yes])
  813. AC_MSG_RESULT($use_read_eta)
  814. test $use_read_eta != no && AC_DEFINE(USE_READPROGRESS)
  815. AC_MSG_CHECKING(if source caching should be used)
  816. CF_ARG_DISABLE(source-cache,
  817. [ --disable-source-cache cache HTML source for parse mode changes],
  818. [use_source_cache=$enableval],
  819. [use_source_cache=yes])
  820. AC_MSG_RESULT($use_source_cache)
  821. test $use_source_cache != no && AC_DEFINE(USE_SOURCE_CACHE)
  822. AC_SUBST(EXTRA_OBJS)
  823. AC_MSG_CHECKING(if you want to use external commands)
  824. CF_ARG_ENABLE(externs,
  825. [ --enable-externs use external commands],
  826. [use_externs=yes],
  827. [use_externs=no])
  828. AC_MSG_RESULT($use_externs)
  829. if test $use_externs != "no" ; then
  830. AC_DEFINE(USE_EXTERNALS)
  831. EXTRA_OBJS="$EXTRA_OBJS LYExtern\$o"
  832. fi
  833. AC_MSG_CHECKING(if you want to use setfont support)
  834. CF_ARG_ENABLE(font-switch,
  835. [ --enable-font-switch use Linux setfont for character-translation],
  836. [use_setfont=yes],
  837. [use_setfont=no])
  838. AC_MSG_RESULT($use_setfont)
  839. if test $use_setfont = yes ; then
  840. case $host_os in
  841. linux*)
  842. CF_PATH_PROG(SETFONT, consolechars, setfont)
  843. ;;
  844. *)
  845. SETFONT=unknown
  846. CF_VERBOSE(Assume $host_os has font-switching)
  847. ;;
  848. esac
  849. if test -n "$SETFONT" ; then
  850. AC_DEFINE(EXP_CHARTRANS_AUTOSWITCH)
  851. else
  852. AC_MSG_WARN(Cannot find a font-setting program)
  853. fi
  854. fi
  855. AC_MSG_CHECKING(if you want cgi-link support)
  856. CF_ARG_ENABLE(cgi-links,
  857. [ --enable-cgi-links support cgi links w/o a http daemon],
  858. [AC_DEFINE(LYNXCGI_LINKS)])
  859. AC_MSG_RESULT($enableval)
  860. AC_MSG_CHECKING(if you want change-exec support)
  861. CF_ARG_ENABLE(change-exec,
  862. [ --enable-change-exec allow users to change exec options],
  863. [use_change_exec=yes],
  864. [use_change_exec=no])
  865. AC_MSG_RESULT($use_change_exec)
  866. test $use_change_exec = yes && AC_DEFINE(ENABLE_OPTS_CHANGE_EXEC)
  867. AC_MSG_CHECKING(if you want exec-links support)
  868. CF_ARG_OPTION(exec-links,
  869. [ --enable-exec-links allow lynx to execute programs accessed via a link],
  870. [use_exec_links=$enableval],
  871. [use_exec_links=$enableval],
  872. [$use_change_exec])
  873. AC_MSG_RESULT($use_exec_links)
  874. test $use_exec_links = yes && AC_DEFINE(EXEC_LINKS)
  875. AC_MSG_CHECKING(if you want exec-scripts support)
  876. CF_ARG_OPTION(exec-scripts,
  877. [ --enable-exec-scripts allow lynx to execute programs inferred from a link],
  878. [use_exec_scripts=$enableval],
  879. [use_exec_scripts=$enableval],
  880. [$use_change_exec])
  881. AC_MSG_RESULT($use_exec_scripts)
  882. test $use_exec_scripts = yes && AC_DEFINE(EXEC_SCRIPTS)
  883. AC_MSG_CHECKING(if you want internal-links feature)
  884. CF_ARG_ENABLE(internal-links,
  885. [ --enable-internal-links handle following links to same doc differently],
  886. [use_internal_links=yes],
  887. [use_internal_links=no])
  888. AC_MSG_RESULT($use_internal_links)
  889. test $use_internal_links = no && AC_DEFINE(DONT_TRACK_INTERNAL_LINKS)
  890. AC_MSG_CHECKING(if you want to fork NSL requests)
  891. CF_ARG_ENABLE(nsl-fork,
  892. [ --enable-nsl-fork fork NSL requests, allowing them to be aborted],
  893. [use_nsl_fork=yes],
  894. [use_nsl_fork=no])
  895. AC_MSG_RESULT($use_nsl_fork)
  896. test $use_nsl_fork = yes && AC_DEFINE(NSL_FORK)
  897. AC_MSG_CHECKING(if you want to log URL requests via syslog)
  898. CF_ARG_ENABLE(syslog,
  899. [ --enable-syslog log URL requests via syslog],
  900. [use_syslog=yes],
  901. [use_syslog=no])
  902. AC_MSG_RESULT($use_syslog)
  903. test $use_syslog = yes && AC_DEFINE(SYSLOG_REQUESTED_URLS)
  904. AC_MSG_CHECKING(if you want to underline links)
  905. CF_ARG_ENABLE(underlines,
  906. [ --enable-underlines underline links rather than using boldface],
  907. [use_underline=yes],
  908. [use_underline=no])
  909. AC_MSG_RESULT($use_underline)
  910. test $use_underline = yes && AC_DEFINE(UNDERLINE_LINKS,1)
  911. test $use_underline = no && AC_DEFINE(UNDERLINE_LINKS,0)
  912. AC_MSG_CHECKING(if help files should be gzip'ed)
  913. CF_ARG_ENABLE(gzip-help,
  914. [ --enable-gzip-help install gzip'ed help files],
  915. [use_gzip_help=$enableval],
  916. [use_gzip_help=no])
  917. AC_MSG_RESULT($use_gzip_help)
  918. AC_MSG_CHECKING(if you want to use libbz2 for decompression of some bzip2 files)
  919. AC_ARG_WITH(bzlib,
  920. [ --with-bzlib use libbz2 for decompression of some bzip2 files],
  921. [use_bzlib=$withval],
  922. [use_bzlib=no])
  923. AC_MSG_RESULT($use_bzlib)
  924. if test ".$use_bzlib" != ".no" ; then
  925. CF_WITH_BZLIB
  926. AC_DEFINE(USE_BZLIB)
  927. fi
  928. AC_MSG_CHECKING(if you want to use zlib for decompression of some gzip files)
  929. AC_ARG_WITH(zlib,
  930. [ --with-zlib use zlib for decompression of some gzip files],
  931. [use_zlib=$withval],
  932. [use_zlib=no])
  933. AC_MSG_RESULT($use_zlib)
  934. if test ".$use_zlib" != ".no" ; then
  935. CF_WITH_ZLIB
  936. AC_DEFINE(USE_ZLIB)
  937. fi
  938. CF_HELP_MESSAGE(
  939. Other Network Services:)
  940. AC_MSG_CHECKING(if you want to exclude FINGER code)
  941. CF_ARG_DISABLE(finger,
  942. [ --disable-finger disable FINGER logic],
  943. [use_finger=yes],
  944. [use_finger=no])
  945. AC_MSG_RESULT($use_finger)
  946. test $use_finger != "no" && AC_DEFINE(DISABLE_FINGER)
  947. AC_MSG_CHECKING(if you want to exclude GOPHER code)
  948. CF_ARG_DISABLE(gopher,
  949. [ --disable-gopher disable GOPHER logic],
  950. [use_gopher=yes],
  951. [use_gopher=no])
  952. AC_MSG_RESULT($use_gopher)
  953. test $use_gopher != "no" && AC_DEFINE(DISABLE_GOPHER)
  954. AC_MSG_CHECKING(if you want to exclude NEWS code)
  955. CF_ARG_DISABLE(news,
  956. [ --disable-news disable NEWS logic],
  957. [use_news=yes],
  958. [use_news=no])
  959. AC_MSG_RESULT($use_news)
  960. test $use_news != "no" && AC_DEFINE(DISABLE_NEWS)
  961. AC_MSG_CHECKING(if you want to exclude FTP code)
  962. CF_ARG_DISABLE(ftp,
  963. [ --disable-ftp disable FTP logic],
  964. [use_ftp=yes],
  965. [use_ftp=no])
  966. AC_MSG_RESULT($use_ftp)
  967. test $use_ftp != "no" && AC_DEFINE(DISABLE_FTP)
  968. dnl --------------------------------------------------------------------------
  969. dnl DirEd (directory-editor) options
  970. dnl --------------------------------------------------------------------------
  971. CF_HELP_MESSAGE(
  972. Directory Editor Options:)
  973. # All DirEd functions that were enabled on compilation can be disabled
  974. # or modified at run time via DIRED_MENU symbols in lynx.cfg.
  975. AC_MSG_CHECKING(if directory-editor code should be used)
  976. CF_ARG_DISABLE(dired,
  977. [ --disable-dired disable optional directory-editor, DirEd],
  978. [use_dired=$enableval],
  979. [use_dired=yes])
  980. AC_MSG_RESULT($use_dired)
  981. if test ".$use_dired" != ".no" ; then
  982. EXTRA_OBJS="$EXTRA_OBJS LYLocal\$o"
  983. AC_DEFINE(DIRED_SUPPORT)
  984. AC_MSG_CHECKING(if you wish to allow extracting from archives via DirEd)
  985. CF_ARG_DISABLE(dired-dearchive,
  986. [ --disable-dired-dearchive disable dearchiving commands],[AC_DEFINE(ARCHIVE_ONLY)])
  987. AC_MSG_RESULT($enableval)
  988. AC_MSG_CHECKING(if DirEd mode should override keys)
  989. CF_ARG_DISABLE(dired-override,
  990. [ --disable-dired-override disable DirEd override keymap],,[AC_DEFINE(OK_OVERRIDE)])
  991. AC_MSG_RESULT($enableval)
  992. AC_MSG_CHECKING(if you wish to allow permissions commands via DirEd)
  993. CF_ARG_DISABLE(dired-permit,
  994. [ --disable-dired-permit disable chmod/attrib commands],,[AC_DEFINE(OK_PERMIT)])
  995. AC_MSG_RESULT($enableval)
  996. AC_MSG_CHECKING(if you wish to allow executable-permission commands via DirEd)
  997. CF_ARG_DISABLE(dired-xpermit,
  998. [ --disable-dired-xpermit disable chmod/attrib commands],[AC_DEFINE(NO_CHANGE_EXECUTE_PERMS)])
  999. AC_MSG_RESULT($enableval)
  1000. AC_MSG_CHECKING(if you wish to allow "tar" commands from DirEd)
  1001. CF_ARG_DISABLE(dired-tar,
  1002. [ --disable-dired-tar disable "tar" command],,[AC_DEFINE(OK_TAR)])
  1003. AC_MSG_RESULT($enableval)
  1004. AC_MSG_CHECKING(if you wish to allow "uudecode" commands from DirEd)
  1005. CF_ARG_DISABLE(dired-uudecode,
  1006. [ --disable-dired-uudecode disable "uudecode" command],,[AC_DEFINE(OK_UUDECODE)])
  1007. AC_MSG_RESULT($enableval)
  1008. AC_MSG_CHECKING(if you wish to allow "zip" and "unzip" commands from DirEd)
  1009. CF_ARG_DISABLE(dired-zip,
  1010. [ --disable-dired-zip disable "zip", "unzip" commands],,[AC_DEFINE(OK_ZIP)])
  1011. AC_MSG_RESULT($enableval)
  1012. AC_MSG_CHECKING(if you wish to allow "gzip" and "gunzip" commands from DirEd)
  1013. CF_ARG_DISABLE(dired-gzip,
  1014. [ --disable-dired-gzip disable "gzip", "gunzip" commands],,[AC_DEFINE(OK_GZIP)])
  1015. AC_MSG_RESULT($enableval)
  1016. fi
  1017. AC_MSG_CHECKING(if you want long-directory listings)
  1018. CF_ARG_DISABLE(long-list,
  1019. [ --disable-long-list disable long "ls -l" directory listings],,
  1020. [AC_DEFINE(LONG_LIST)])
  1021. AC_MSG_RESULT($enableval)
  1022. AC_MSG_CHECKING(if parent-directory references are permitted)
  1023. CF_ARG_DISABLE(parent-dir-refs,
  1024. [ --disable-parent-dir-refs
  1025. disable "Up-to" links in directory listings],
  1026. [AC_DEFINE(NO_PARENT_DIR_REFERENCE)])
  1027. AC_MSG_RESULT($enableval)
  1028. CF_PATH_PROG(TELNET, telnet)
  1029. CF_PATH_PROG(TN3270, tn3270)
  1030. CF_PATH_PROG(RLOGIN, rlogin)
  1031. CF_PATH_PROG(MV, mv)
  1032. CF_PATH_PROG(GZIP, gzip)
  1033. CF_PATH_PROG(UNCOMPRESS,gunzip)
  1034. CF_PATH_PROG(UNZIP, unzip)
  1035. CF_PATH_PROG(BZIP2, bzip2)
  1036. CF_PATH_PROG(TAR, tar, pax gtar gnutar bsdtar star)
  1037. CF_TAR_OPTIONS($TAR)
  1038. AC_DEFINE_UNQUOTED(TAR_UP_OPTIONS, "$TAR_UP_OPTIONS")
  1039. AC_DEFINE_UNQUOTED(TAR_DOWN_OPTIONS, "$TAR_DOWN_OPTIONS")
  1040. AC_DEFINE_UNQUOTED(TAR_FILE_OPTIONS, "$TAR_FILE_OPTIONS")
  1041. AC_DEFINE_UNQUOTED(TAR_PIPE_OPTIONS, "$TAR_PIPE_OPTIONS")
  1042. dnl --------------------------------------------------------------------------
  1043. dnl Test features that rely on configure-definitions
  1044. dnl --------------------------------------------------------------------------
  1045. if test ".$use_dired" != ".no" ; then
  1046. CF_PATH_PROG(COMPRESS, compress)
  1047. CF_PATH_PROG(RM, rm)
  1048. CF_PATH_PROG(UUDECODE, uudecode)
  1049. CF_PATH_PROG(ZCAT, zcat)
  1050. CF_PATH_PROG(ZIP, zip)
  1051. dnl 'INSTALL' is a special case, since the configure script has to find a
  1052. dnl BSD-compatible one so the build/install works properly.
  1053. case "$INSTALL" in
  1054. $srcdir*) # (vi
  1055. AC_DEFINE_UNQUOTED(INSTALL_PATH,"install")
  1056. ;;
  1057. *) # (vi
  1058. cf_save_INSTALL="$INSTALL"
  1059. CF_PATH_PROG(INSTALL, install)
  1060. INSTALL="$cf_save_INSTALL"
  1061. ;;
  1062. esac
  1063. fi
  1064. COMPRESS_PROG=
  1065. COMPRESS_EXT=
  1066. if test $use_gzip_help = yes ; then
  1067. COMPRESS_PROG="$ac_cv_path_GZIP -9"
  1068. COMPRESS_EXT=.gz
  1069. fi
  1070. AC_SUBST(COMPRESS_PROG)
  1071. AC_SUBST(COMPRESS_EXT)
  1072. if test $cf_cv_screen = pdcurses ; then
  1073. CF_HELP_MESSAGE(Special Libraries for PDCurses X11:)
  1074. CF_PDCURSES_X11
  1075. else
  1076. CF_TERMIO_AND_CURSES(LYCurses.h)
  1077. fi
  1078. ### These tests must be run after establishing the curses library.
  1079. if test $cf_cv_screen != slang ; then
  1080. AC_CHECK_HEADERS($cf_cv_screen/term.h term.h)
  1081. CF_ALT_CHAR_SET
  1082. CF_FANCY_CURSES
  1083. CF_FUNC_CURSES_VERSION
  1084. CF_NCURSES_BROKEN
  1085. CF_COLOR_CURSES
  1086. CF_SIZECHANGE
  1087. CF_TTYTYPE
  1088. if test "$use_wide_curses" = yes ; then
  1089. CF_WIDEC_CURSES
  1090. fi
  1091. CF_CURSES_FUNCS( \
  1092. assume_default_colors \
  1093. cbreak \
  1094. define_key \
  1095. delscreen \
  1096. getattrs \
  1097. getbegx \
  1098. getbegy \
  1099. keypad \
  1100. napms \
  1101. newpad \
  1102. newterm \
  1103. pnoutrefresh \
  1104. resizeterm \
  1105. touchline \
  1106. touchwin \
  1107. use_default_colors \
  1108. use_legacy_coding \
  1109. wattr_get \
  1110. wborder \
  1111. wredrawln \
  1112. wresize \
  1113. )
  1114. fi
  1115. if test $use_color_style != no ; then
  1116. if test .$cf_cv_color_curses != .yes ; then
  1117. AC_ERROR(Configuration does not support color-styles)
  1118. fi
  1119. if test $cf_cv_screen = slang ; then
  1120. AC_ERROR(Configuration does not support color-styles)
  1121. fi
  1122. fi
  1123. if test $use_scrollbar != no ; then
  1124. if test .$cf_cv_fancy_curses != .yes ; then
  1125. AC_MSG_WARN(Configuration does not support ACS_xxx definitions)
  1126. else
  1127. AC_DEFINE(USE_SCROLLBAR)
  1128. fi
  1129. fi
  1130. ### Finally, build config.h and the makefiles
  1131. test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
  1132. AC_SUBST(CONFIG_SHELL)
  1133. CFLAGS="$CFLAGS $EXTRA_CFLAGS"
  1134. srcdir="$srcdir"
  1135. SRCDIR_CLEAN="#"
  1136. if test -n "$srcdir" ; then
  1137. echo srcdir is $srcdir
  1138. $CONFIG_SHELL $MKINSTALLDIRS WWW/Library/Implementation
  1139. $CONFIG_SHELL $MKINSTALLDIRS src/chrtrans
  1140. test "$USE_INCLUDED_LIBINTL" = yes && $CONFIG_SHELL $MKINSTALLDIRS intl
  1141. test "$srcdir" != "." && SRCDIR_CLEAN=""
  1142. fi
  1143. AC_SUBST(SRCDIR_CLEAN)
  1144. AC_OUTPUT(
  1145. [makefile \
  1146. WWW/Library/Implementation/makefile \
  1147. src/makefile \
  1148. src/chrtrans/makefile \
  1149. $SUB_MAKEFILE
  1150. ],[
  1151. if test "$USE_NLS" = yes ; then
  1152. if test "$use_our_messages" = yes ; then
  1153. echo creating po/makefile
  1154. rm -f po/temp$$
  1155. sed -e 's%^.*LYMessages.c% ../LYMessages.c%' \
  1156. -e '$s/\\//' po/POTFILES >po/temp$$
  1157. sed -e "/POTFILES =/r po/temp$$" \
  1158. po/makefile.in > po/makefile
  1159. rm -f po/temp$$
  1160. fi
  1161. fi
  1162. ],[
  1163. USE_NLS=$USE_NLS
  1164. use_our_messages=$use_our_messages
  1165. ]
  1166. )