dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.564 2013/03/16 23:32:24 tom Exp $
+dnl $Id: configure.in,v 1.573 2013/08/03 22:59:09 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.52.20030208)
-AC_REVISION($Revision: 1.564 $)
+AC_REVISION($Revision: 1.573 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
AC_MSG_CHECKING(if you want to build with Ada95)
AC_MSG_RESULT($cf_with_ada)
+AC_MSG_CHECKING(if you want to install terminal database)
+AC_ARG_ENABLE(db-install,
+ [ --disable-db-install suppress install of terminal database],
+ [cf_with_db_install=$enableval],
+ [cf_with_db_install=yes])
+AC_MSG_RESULT($cf_with_db_install)
+
AC_MSG_CHECKING(if you want to install manpages)
AC_ARG_WITH(manpages,
[ --without-manpages suppress install of manpages],
AC_MSG_CHECKING(if you want to build programs such as tic)
AC_ARG_WITH(progs,
- [ --without-progs suppress build with programs (e.g., tic)],
+ [ --without-progs suppress build/install with programs (e.g., tic)],
[cf_with_progs=$withval],
[cf_with_progs=yes])
AC_MSG_RESULT($cf_with_progs)
AC_MSG_CHECKING(if you want to build test-programs)
AC_ARG_WITH(tests,
- [ --without-tests suppress build with test-programs],
+ [ --without-tests suppress build/install with test-programs],
[cf_with_tests=$withval],
[cf_with_tests=yes])
AC_MSG_RESULT($cf_with_tests)
AC_CHECK_TOOL(RANLIB, ranlib, ':')
AC_CHECK_TOOL(LD, ld, ld)
AC_CHECK_TOOL(AR, ar, ar)
+AC_CHECK_TOOL(NM, nm, nm)
CF_AR_FLAGS
dnl Special option for use by system-builders: the install-prefix is used to
;;
esac
+# we will build libraries one-level down.
+rel_builddir=..
CF_SHARED_OPTS
if test "$CC_SHARED_OPTS" = "unknown"; then
for model in $cf_list_models; do
esac
AC_SUBST(TERMINFO_SRC)
+NCURSES_USE_DATABASE=0
if test "$use_database" != no ; then
- AC_DEFINE(USE_DATABASE,1,[Define to 1 if we should use the terminal database])
+ NCURSES_USE_DATABASE=1
AC_MSG_CHECKING(which terminfo source-file will be installed)
AC_ARG_WITH(database,
else
with_hashed_db=no
fi
+AC_SUBST(NCURSES_USE_DATABASE)
AC_MSG_CHECKING(for list of fallback descriptions)
AC_ARG_WITH(fallbacks,
[with_termcap=no])
AC_MSG_RESULT($with_termcap)
+NCURSES_USE_TERMCAP=0
if test "x$with_termcap" != "xyes" ; then
if test "$use_database" = no ; then
if test -z "$with_fallback" ; then
AC_DEFINE(PURE_TERMINFO,1,[Define to 1 if we should support only terminfo])
else
-if test "$with_ticlib" != no ; then
- AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined)
-fi
-
-AC_DEFINE(USE_TERMCAP,1,[Define to 1 if we should support termcap])
-AC_MSG_CHECKING(for list of termcap files)
-CF_WITH_PATHLIST(termpath,
- [ --with-termpath=XXX specify list of termcap files],
- TERMPATH,
- /etc/termcap:/usr/share/misc/termcap)
-AC_MSG_RESULT($TERMPATH)
-test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH",[Define to set the termcap searchlist])
-
-### use option --enable-getcap to use a hacked getcap for reading termcaps
-AC_MSG_CHECKING(if fast termcap-loader is needed)
-AC_ARG_ENABLE(getcap,
- [ --enable-getcap fast termcap load, no xrefs to terminfo],
- [with_getcap=$enableval],
- [with_getcap=no])
-AC_MSG_RESULT($with_getcap)
-test "x$with_getcap" = "xyes" && AC_DEFINE(USE_GETCAP,1,[Define to 1 to use fast termcap-loader])
-
-AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo)
-AC_ARG_ENABLE(getcap-cache,
- [ --enable-getcap-cache cache translated termcaps in ~/.terminfo],
- [with_getcap_cache=$enableval],
- [with_getcap_cache=no])
-AC_MSG_RESULT($with_getcap_cache)
-test "x$with_getcap_cache" = "xyes" && AC_DEFINE(USE_GETCAP_CACHE,1,[Define to 1 if translated termcap should be stored in $HOME/.terminfo])
+ if test "$with_ticlib" != no ; then
+ AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined)
+ fi
-fi
+ NCURSES_USE_TERMCAP=1
+ AC_MSG_CHECKING(for list of termcap files)
+ CF_WITH_PATHLIST(termpath,
+ [ --with-termpath=XXX specify list of termcap files],
+ TERMPATH,
+ /etc/termcap:/usr/share/misc/termcap)
+ AC_MSG_RESULT($TERMPATH)
+ test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH",[Define to set the termcap searchlist])
+
+ ### use option --enable-getcap to use a hacked getcap for reading termcaps
+ AC_MSG_CHECKING(if fast termcap-loader is needed)
+ AC_ARG_ENABLE(getcap,
+ [ --enable-getcap fast termcap load, no xrefs to terminfo],
+ [with_getcap=$enableval],
+ [with_getcap=no])
+ AC_MSG_RESULT($with_getcap)
+ test "x$with_getcap" = "xyes" && AC_DEFINE(USE_GETCAP,1,[Define to 1 to use fast termcap-loader])
+
+ AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo)
+ AC_ARG_ENABLE(getcap-cache,
+ [ --enable-getcap-cache cache translated termcaps in ~/.terminfo],
+ [with_getcap_cache=$enableval],
+ [with_getcap_cache=no])
+ AC_MSG_RESULT($with_getcap_cache)
+ test "x$with_getcap_cache" = "xyes" && AC_DEFINE(USE_GETCAP_CACHE,1,[Define to 1 if translated termcap should be stored in $HOME/.terminfo])
+
+fi
+AC_SUBST(NCURSES_USE_TERMCAP)
### Use option --disable-home-terminfo to completely remove ~/.terminfo
AC_MSG_CHECKING(if ~/.terminfo is wanted)
;;
esac
-CF_MATH_LIB(MATH_LIB,sin(x))
+CF_MATH_LIB(MATH_LIB,pow(sin(x),x))
AC_SUBST(MATH_LIB)
### Checks for header files.
else
AC_FUNC_SETVBUF_REVERSED
fi
-AC_TYPE_SIGNAL
AC_CHECK_TYPE(intptr_t, long)
CF_TYPE_SIGACTION
CF_SIZECHANGE
cf_with_ada=no
fi
+# do this "late" to avoid conflict with header-checks
+if test "x$with_widec" = xyes ; then
+ AC_CHECK_SIZEOF(wchar_t)
+fi
+
### Construct the ncurses library-subsets, if any, from this set of keywords:
### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
###
esac
AC_MSG_CHECKING(where we will install curses.h)
-test "$with_overwrite" = no && \
-test "x$includedir" = 'x${prefix}/include' && \
- includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
-AC_MSG_RESULT($includedir)
+AC_SUBST(includesubdir)
+includesubdir=
+if test "$with_overwrite" = no && \
+ ( test "x$includedir" = 'x${prefix}/include' || \
+ test "x$includedir" = "x${prefix}/include" )
+then
+ includesubdir="/ncurses${LIB_SUFFIX}"
+fi
+AC_MSG_RESULT(${includedir}${includesubdir})
### Resolve a conflict between normal and wide-curses by forcing applications
### that will need libutf8 to add it to their configure script.
cf_cv_term_driver="$with_term_driver"
cf_with_ada="$cf_with_ada"
cf_with_cxx_binding="$cf_with_cxx_binding"
+cf_with_db_install="$cf_with_db_install"
cf_with_manpages="$cf_with_manpages"
cf_with_tests="$cf_with_tests"
with_shared_cxx="$with_shared_cxx"