X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=8fa5e4eaaa56d161552672edccd28146fec0e0f4;hp=30e766003102a291f801a832af1148dc41bb831f;hb=396a05943b7da5039dd15d79c4385c7d2a75d6d4;hpb=3ec8f79f3ceda990461c80de2f96d66b886e00d5 diff --git a/configure.in b/configure.in index 30e76600..8fa5e4ea 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.419 2007/05/05 15:45:26 tom Exp $ +dnl $Id: configure.in,v 1.433 2008/04/12 23:39:06 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.419 $) +AC_REVISION($Revision: 1.433 $) 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, @@ -941,8 +969,18 @@ if test "$with_ext_mouse" = yes ; then fi AC_SUBST(NCURSES_MOUSE_VERSION) +# 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 + # 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], @@ -1010,6 +1048,7 @@ if test "$with_echo" = yes; then else ECHO_LINK='@ echo linking $@ ... ;' test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent" + test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent" fi AC_MSG_RESULT($with_echo) AC_SUBST(ECHO_LINK) @@ -1021,9 +1060,9 @@ 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 + CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum) if test "$cf_with_cxx" = yes ; then CF_GXX_WARNINGS(Wno-unused) fi @@ -1213,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 @@ -1328,9 +1378,22 @@ AC_SUBST(USE_CXX_BOOL) CF_HELP_MESSAGE(Ada95 Binding Options:) +dnl If the Ada95 source-tree is present, add that to the build unless it will +dnl not work, or was not requested. +if test -f "${srcdir}/Ada95/Makefile.in" ; then + +dnl libtool does not know anything about GNAT, though a change made in 1998 +dnl provided for it "someday". Disable the ada subtree if we are using +dnl libtool -TD 20070714 +if test "$cf_with_ada" != "no" ; then + if test "$with_libtool" != "no"; then + AC_MSG_WARN(libtool does not support Ada - disabling feature) + cf_with_ada=no + fi +fi + dnl Check for availability of GNU Ada Translator (GNAT). dnl At the moment we support no other Ada95 compiler. -if test -f "${srcdir}/Ada95/Makefile.in" ; then if test "$cf_with_ada" != "no" ; then cf_ada_make=gnatmake AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no) @@ -1430,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} " @@ -1587,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) @@ -1642,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)