]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 5.9 - patch 20130622
[ncurses.git] / configure.in
index e83fdc1c76722bd1c74476308a94003f7a50900d..abcf3359bd134be3d432ba620a469a8d7cccfad5 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.560 2012/11/03 19:39:31 tom Exp $
+dnl $Id: configure.in,v 1.567 2013/05/25 20:15:02 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.560 $)
+AC_REVISION($Revision: 1.567 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -45,11 +45,7 @@ CF_SUBST_NCURSES_VERSION
 CF_WITH_REL_VERSION(NCURSES)
 CF_WITH_ABI_VERSION
 
-CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
-AC_ARG_WITH(system-type,
-[  --with-system-type=XXX  test: override derived host system-type],
-[AC_MSG_WARN(overriding system type to $withval)
- cf_cv_system_name=$withval])
+CF_WITH_SYSTYPE
 
 ###    Save the given $CFLAGS to allow user-override.
 cf_user_CFLAGS="$CFLAGS"
@@ -274,6 +270,17 @@ test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
 
 fi
 
+if test "X$cf_with_cxx_binding" != Xno; then
+if test "x$with_shared" = "xyes"; then
+AC_MSG_CHECKING(if you want to build C++ shared libraries)
+AC_ARG_WITH(cxx-shared,
+       [  --with-cxx-shared       generate C++ shared-libraries],
+       [with_shared_cxx=$withval],
+       [with_shared_cxx=no])
+AC_MSG_RESULT($with_shared_cxx)
+fi
+fi
+
 ###############################################################################
 
 AC_MSG_CHECKING(for specified models)
@@ -437,8 +444,9 @@ os2*) #(vi
 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,
@@ -454,6 +462,7 @@ if test "$use_database" != no ; then
 else
        with_hashed_db=no
 fi
+AC_SUBST(NCURSES_USE_DATABASE)
 
 AC_MSG_CHECKING(for list of fallback descriptions)
 AC_ARG_WITH(fallbacks,
@@ -479,7 +488,7 @@ AC_SUBST(WHICH_XTERM)
 
 AC_MSG_CHECKING(if xterm backspace sends BS or DEL)
 AC_ARG_WITH(xterm-kbs,
-       [  --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL],
+       [  --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL],
        [with_xterm_kbs=$withval],
        [with_xterm_kbs=BS])
 case x$with_xterm_kbs in
@@ -570,6 +579,7 @@ AC_ARG_ENABLE(termcap,
        [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
@@ -579,37 +589,38 @@ if test "x$with_termcap" != "xyes" ; 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)
@@ -1320,7 +1331,7 @@ AC_CHECK_LIB(bsd, gettimeofday,
        ;;
 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.
@@ -1409,6 +1420,7 @@ setenv \
 setvbuf \
 sigaction \
 sigvec \
+strdup \
 strstr \
 tcgetpgrp \
 times \
@@ -1434,10 +1446,10 @@ if test "x$cross_compiling" = xyes ; then
 else
        AC_FUNC_SETVBUF_REVERSED
 fi
-AC_TYPE_SIGNAL
 AC_CHECK_TYPE(intptr_t, long)
 CF_TYPE_SIGACTION
 CF_SIZECHANGE
+CF_FUNC_MEMMOVE
 CF_FUNC_POLL
 CF_VA_COPY
 AC_FUNC_VFORK
@@ -1660,13 +1672,17 @@ CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
 AC_MSG_RESULT($DFT_OBJ_SUBDIR)
 
-# libtool thinks it can make c++ shared libraries (perhaps only g++)
 if test "x$cf_with_cxx" = xyes ; then
 AC_MSG_CHECKING(c++ library-dependency suffix)
 if test "$with_libtool" != "no"; then
+       # libtool thinks it can make c++ shared libraries (perhaps only g++)
+       CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
+elif test "$with_shared_cxx" != "no"; then
+       # also for g++ users...
        CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
 else
-       CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX,CXX_DEP_SUFFIX)dnl we normally make a static library
+       # we normally make a static library because C/C++ library rules differ
+       CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX,CXX_DEP_SUFFIX)
 fi
 AC_MSG_RESULT($CXX_LIB_SUFFIX)
 AC_SUBST(CXX_LIB_SUFFIX)
@@ -1891,6 +1907,17 @@ AC_SUBST(MAKE_TESTS)
 ADAHTML_DIR=../../doc/html/ada
 AC_SUBST(ADAHTML_DIR)
 
+# these could be configurable, but are not currently
+PANEL_NAME=panel
+MENU_NAME=menu
+FORM_NAME=form
+CXX_NAME=ncurses++
+
+AC_SUBST(PANEL_NAME)
+AC_SUBST(MENU_NAME)
+AC_SUBST(FORM_NAME)
+AC_SUBST(CXX_NAME)
+
 SUB_SCRIPTS=
 
 AC_OUTPUT( \
@@ -1967,6 +1994,7 @@ cf_with_ada="$cf_with_ada"
 cf_with_cxx_binding="$cf_with_cxx_binding"
 cf_with_manpages="$cf_with_manpages"
 cf_with_tests="$cf_with_tests"
+with_shared_cxx="$with_shared_cxx"
 host="$host"
 target="$target"