X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=1a4a0c86ecac6e8518a798662257bfb812cc885c;hp=a1087f5878d7eb083569c3679cf19aca3aba81ff;hb=bd7ef7c2309fd00aa4576168c46f557c622cb9c3;hpb=c13e57306ae5c4431fddd0fe856c3bcae6aeeb2c diff --git a/configure.in b/configure.in index a1087f58..1a4a0c86 100644 --- a/configure.in +++ b/configure.in @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.421 2007/07/14 15:45:08 tom Exp $ +dnl $Id: configure.in,v 1.434 2008/05/17 19:50:19 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.13.20020210) -AC_REVISION($Revision: 1.421 $) +AC_REVISION($Revision: 1.434 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -150,13 +150,28 @@ CF_PROG_INSTALL CF_PROG_LINT AC_PROG_LN_S +AC_SYS_LONG_FILE_NAMES + +AC_MSG_CHECKING(if we should assume mixed-case filenames) +AC_ARG_ENABLE(mixed-case, + [ --enable-mixed-case tic should assume mixed-case filenames], + [enable_mixedcase=$enableval], + [enable_mixedcase=auto]) +AC_MSG_RESULT($enable_mixedcase) +if test "$enable_mixedcase" = "auto" ; then + CF_MIXEDCASE_FILENAMES +else + cf_cv_mixedcase=$enable_mixedcase + if test "$enable_mixedcase" = "yes" ; then + AC_DEFINE(MIXEDCASE_FILENAMES) + fi +fi + +# do this after mixed-case option (tags/TAGS is not as important as tic). AC_PROG_MAKE_SET CF_MAKE_TAGS CF_MAKEFLAGS -AC_SYS_LONG_FILE_NAMES -CF_MIXEDCASE_FILENAMES - dnl These are standard among *NIX systems, but not when cross-compiling AC_CHECK_TOOL(RANLIB, ranlib, ':') AC_CHECK_TOOL(LD, ld, ld) @@ -353,7 +368,7 @@ AC_ARG_ENABLE(rpath, [cf_cv_ld_rpath=no]) AC_MSG_RESULT($cf_cv_ld_rpath) AC_MSG_CHECKING(if shared libraries should be relinked during install) -AC_ARG_ENABLE(rpath, +AC_ARG_ENABLE(relink, [ --disable-relink relink shared libraries during install], [cf_cv_do_relink=$enableval], [cf_cv_do_relink=yes]) @@ -488,6 +503,19 @@ int main() { AC_MSG_RESULT($with_big_core) test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE) +### ISO C only guarantees 512-char strings, we have tables which load faster +### when constructed using "big" strings. +AC_MSG_CHECKING(if big-strings option selected) +AC_ARG_ENABLE(big-strings, + [ --disable-big-strings assume compiler has only standard-size strings], + [with_big_strings=no], + [with_big_strings=yes]) +AC_MSG_RESULT($with_big_strings) + +USE_BIG_STRINGS=0 +test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1 +AC_SUBST(USE_BIG_STRINGS) + ### use option --enable-termcap to compile in the termcap fallback support AC_MSG_CHECKING(if you want termcap-fallback support) AC_ARG_ENABLE(termcap, @@ -808,6 +836,40 @@ if test "$with_ext_const" = yes ; then fi AC_SUBST(NCURSES_CONST) +### use option --enable-ext-colors to turn on use of colors beyond 16. +AC_MSG_CHECKING(if you want to use extended colors) +AC_ARG_ENABLE(ext-colors, + [ --enable-ext-colors compile for 256-color support], + [with_ext_colors=$enableval], + [with_ext_colors=no]) +AC_MSG_RESULT($with_ext_colors) +NCURSES_EXT_COLORS=0 +if test "$with_ext_colors" = yes ; then + if test "$with_widec" != yes ; then + AC_MSG_ERROR(This option applies only to wide-character library) + else + # cannot be ABI 5 since it changes sizeof(cchar_t) + CF_NCURSES_ABI_6 + fi + NCURSES_EXT_COLORS=1 + AC_DEFINE(NCURSES_EXT_COLORS) +fi +AC_SUBST(NCURSES_EXT_COLORS) + +### use option --enable-ext-mouse to modify coding to support 5-button mice +AC_MSG_CHECKING(if you want to use extended mouse encoding) +AC_ARG_ENABLE(ext-mouse, + [ --enable-ext-mouse compile for extended mouse-encoding], + [with_ext_mouse=$enableval], + [with_ext_mouse=no]) +AC_MSG_RESULT($with_ext_mouse) +NCURSES_MOUSE_VERSION=1 +if test "$with_ext_mouse" = yes ; then + NCURSES_MOUSE_VERSION=2 + CF_NCURSES_ABI_6 +fi +AC_SUBST(NCURSES_MOUSE_VERSION) + AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code) AC_ARG_ENABLE(no-padding, [ --enable-no-padding compile with $NCURSES_NO_PADDING code], @@ -907,42 +969,18 @@ AC_ARG_ENABLE(colorfgbg, AC_MSG_RESULT($with_colorfgbg) test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG) -### use option --enable-ext-colors to turn on use of colors beyond 16. -AC_MSG_CHECKING(if you want to use experimental extended colors) -AC_ARG_ENABLE(ext-colors, - [ --enable-ext-colors compile for experimental 256-color support], - [with_ext_colors=$enableval], - [with_ext_colors=no]) -AC_MSG_RESULT($with_ext_colors) -NCURSES_EXT_COLORS=0 -if test "$with_ext_colors" = yes ; then - if test "$with_widec" != yes ; then - AC_MSG_ERROR(This option applies only to wide-character library) - else - # cannot be ABI 5 since it changes sizeof(cchar_t) - CF_NCURSES_ABI_6 - fi - NCURSES_EXT_COLORS=1 - AC_DEFINE(NCURSES_EXT_COLORS) -fi -AC_SUBST(NCURSES_EXT_COLORS) - -### use option --enable-ext-mouse to modify coding to support 5-button mice -AC_MSG_CHECKING(if you want to use experimental extended mouse encoding) -AC_ARG_ENABLE(ext-mouse, - [ --enable-ext-mouse compile for experimental mouse-encoding], - [with_ext_mouse=$enableval], - [with_ext_mouse=no]) -AC_MSG_RESULT($with_ext_mouse) -NCURSES_MOUSE_VERSION=1 -if test "$with_ext_mouse" = yes ; then - NCURSES_MOUSE_VERSION=2 - CF_NCURSES_ABI_6 +# This is still experimental (20080329), but should ultimately be moved to +# the script-block --with-normal, etc. +CF_WITH_PTHREAD +if test "$with_pthread" = "yes" ; then + AC_DEFINE(USE_PTHREADS) + enable_reentrant=yes fi -AC_SUBST(NCURSES_MOUSE_VERSION) # Reentrant code has to be opaque; there's little advantage to making ncurses -# opaque outside of that, so there is no --enable-opaque option. +# opaque outside of that, so there is no --enable-opaque option. We can use +# this option without --with-pthreads, but this will be always set for +# pthreads. AC_MSG_CHECKING(if you want experimental reentrant code) AC_ARG_ENABLE(reentrant, [ --enable-reentrant compile with experimental reentrant code], @@ -1022,7 +1060,7 @@ AC_ARG_ENABLE(warnings, [with_warnings=$enableval]) AC_MSG_RESULT($with_warnings) -if test -n "$with_warnings"; then +if test "x$with_warnings" = "xyes"; then ADAFLAGS="$ADAFLAGS -gnatg" CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum) if test "$cf_with_cxx" = yes ; then @@ -1214,9 +1252,20 @@ CF_SIZECHANGE CF_FUNC_MEMMOVE CF_FUNC_POLL +# special check for test/ditto.c +CF_FUNC_OPENPTY +if test "$cf_cv_func_openpty" != no ; then + AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>) + AC_DEFINE(USE_XTERM_PTY) + if test "$cf_cv_lib_util" = yes ; then + TEST_LIBS="-lutil $TEST_LIBS" + fi +fi +AC_SUBST(TEST_LIBS) + if test "$with_hashed_db" != no ; then AC_DEFINE(USE_HASHED_DB) - CF_HASHED_DB + CF_HASHED_DB($with_hashed_db) fi dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS @@ -1444,7 +1493,7 @@ fi AC_MSG_CHECKING(for library subsets) LIB_SUBSETS= -if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then +if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then LIB_SUBSETS="${LIB_SUBSETS}ticlib" if test "$with_ticlib" != no ; then LIB_SUBSETS="${LIB_SUBSETS} " @@ -1601,6 +1650,10 @@ if test "$with_dlsym" = yes ; then CF_REMOVE_LIB(TICS_LIST,$TICS_LIST,dl) fi +if test "$DFT_LWR_MODEL" = "libtool"; then + OBJEXT=lo +fi + # needed for Ada95 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'` AC_SUBST(TINFO_ARGS2) @@ -1656,6 +1709,11 @@ AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${ ### Now that we're done running tests, add the compiler-warnings, if any CF_ADD_CFLAGS($EXTRA_CFLAGS) +### If we're building with rpath, try to link non-standard libs that way too. +if test "$DFT_LWR_MODEL" = "shared"; then + CF_RPATH_HACK +fi + ### Define substitutions for header files to avoid name-pollution CF_SUBST_IF(["$cf_cv_have_tcgetattr" = yes], HAVE_TCGETATTR, 1, 0) CF_SUBST_IF(["$ac_cv_header_termio_h" = yes], HAVE_TERMIO_H, 1, 0)