dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.418 2007/04/28 18:54:05 tom Exp $
+dnl $Id: configure.in,v 1.431 2008/03/29 18:38:08 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.418 $)
+AC_REVISION($Revision: 1.431 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
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)
[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])
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,
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],
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)
[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
### checks for compiler characteristics
AC_LANG_C
AC_C_CONST
-CF_C_INLINE(NCURSES_INLINE,500)
+CF_C_INLINE(NCURSES_INLINE,1200)
CF_SIG_ATOMIC_T
if test $NCURSES_CHTYPE = auto ; then
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
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)
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} "
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)
### 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)