dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.582 2014/06/01 14:05:06 tom Exp $
+dnl $Id: configure.in,v 1.595 2014/12/21 17:25:38 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.582 $)
+AC_REVISION($Revision: 1.595 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
CF_TOP_BUILDDIR
CF_SUBST_NCURSES_VERSION
+CF_VERSION_INFO(NCURSES,ncurses)
CF_WITH_REL_VERSION(NCURSES)
CF_WITH_ABI_VERSION
cf_with_cxx=no; CXX=""; GXX="";])dnl
AC_PROG_CXX
popdef([AC_MSG_ERROR])dnl
+
+ AC_LANG_PUSH(C++)
+ if test "x$cf_with_cxx" != xno
+ then
+ # Several of the C++ configurations do not work, particularly when
+ # cross-compiling (20140913 -TD)
+ AC_MSG_CHECKING(if $CXX works)
+
+ save_CPPFLAGS="$CPPFLAGS"
+ eval cf_includedir=${includedir}
+ CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <stdio.h>
+],
+ [
+ printf("Hello world!\n")
+ ],
+ [cf_cxx_works=yes],
+ [cf_cxx_works=no])
+ CPPFLAGS="$save_CPPFLAGS"
+
+ AC_MSG_RESULT($cf_cxx_works)
+ if test "x$cf_cxx_works" = xno
+ then
+ AC_MSG_WARN([Ignore $CXX, since it cannot compile hello-world.])
+ cf_with_cxx=no; CXX=""; GXX="";
+ fi
+ fi
+ AC_LANG_POP
+
# autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
if test "$CXX" = "g++" ; then
AC_PATH_PROG(CXX,g++)
CF_PKG_CONFIG
CF_WITH_PKG_CONFIG_LIBDIR
CF_ENABLE_PC_FILES
+if test -z "$MAKE_PC_FILES"
+then
+ AC_MSG_CHECKING(for suffix to add to pc-files)
+AC_ARG_WITH(pc-suffix,
+ [ --with-pc-suffix suffixes pc-files],
+ [case "x$withval" in #(vi
+ xyes|xno) #(vi
+ PC_MODULE_SUFFIX=
+ ;;
+ *) PC_MODULE_SUFFIX="$withval"
+ ;;
+ esac])
+ test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
+ AC_MSG_RESULT($PC_MODULE_SUFFIX)
+ test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
+ AC_SUBST(PC_MODULE_SUFFIX)
+fi
AC_MSG_CHECKING(if we should assume mixed-case filenames)
AC_ARG_ENABLE(mixed-case,
# 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
- if test "$model" = "shared"; then
+for model in $cf_list_models; do
+ case $model in #(vi
+ libtool)
+ CF_WITH_LIBTOOL_OPTS
+ CF_WITH_EXPORT_SYMS
+ ;;
+ shared) #(vi
+ if test "$CC_SHARED_OPTS" = "unknown"; then
AC_ERROR(Shared libraries are not supported in this version)
fi
- done
-fi
+ CF_WITH_VERSIONED_SYMS
+ ;;
+ esac
+done
# pretend that ncurses==ncursesw==ncursest
AC_MSG_CHECKING(if you want to disable library suffixes)
### Checks for libraries.
case $cf_cv_system_name in #(vi
-*mingw32*) #(vi
+*mingw32*|*mingw64*) #(vi
+ CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
LIBS=" -lpsapi $LIBS"
;;
*)
getcwd \
getegid \
geteuid \
+getopt \
getttynam \
issetugid \
poll \
times \
vsnprintf \
)
+
+if test "x$ac_cv_func_getopt" = xno &&
+ test "x$cf_with_progs$cf_with_tests" != xnono; then
+ AC_MSG_ERROR(getopt is required for building programs)
+fi
+
if test "x$with_getcap" = "xyes" ; then
CF_CGETENT
fi
CF_ADD_ADAFLAGS(-gnatpn)
CF_FIXUP_ADAFLAGS
+ CF_GNATPREP_OPT_T
+
CF_GNAT_GENERICS
CF_GNAT_SIGINT
CF_GNAT_PROJECTS
if test "$with_term_driver" != no ; then
LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
case $cf_cv_system_name in #(vi
- *mingw32*) #(vi
+ *mingw32*|*mingw64*) #(vi
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
+ CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
;;
*) #(vi
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
;;
esac
+# substitute into misc/Makefile to suppress
+# (un)install.data from the
+# (un)install rules.
+if test "x$cf_with_db_install" = "xno"; then
+ MISC_INSTALL_DATA=
+ MISC_UNINSTALL_DATA=
+else
+ MISC_INSTALL_DATA=install.data
+ MISC_UNINSTALL_DATA=uninstall.data
+fi
+AC_SUBST(MISC_INSTALL_DATA)
+AC_SUBST(MISC_UNINSTALL_DATA)
+
SUB_SCRIPTS=
+dnl Override the package used for exported symbols
+if test -n "$PACKAGE"
+then
+ PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
+ export PACKAGE
+ echo "package: $PACKAGE"
+fi
+
+if test -n "$RESULTING_SYMS"
+then
+ UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
+ case $cf_cv_abi_version in
+ [[6789]])
+ CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
+ RESULTING_SYMS=resulting.map
+ ;;
+ *)
+ CF_VERBOSE(will map symbols to default ABI)
+ ;;
+ esac
+else
+ UNALTERED_SYMS=
+fi
+AC_SUBST(UNALTERED_SYMS)
+
AC_OUTPUT( \
include/MKterm.h.awk \
include/curses.head:include/curses.h.in \
### configuration-run into config.status
AWK="$AWK"
+ALTERNATE_SYMS="$ALTERNATE_SYMS"
DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
DFT_LWR_MODEL="$DFT_LWR_MODEL"
ECHO_LD="$ECHO_LD"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
TINFO_NAME="$TINFO_NAME"
TINFO_SUFFIX="$TINFO_SUFFIX"
+UNALTERED_SYMS="$UNALTERED_SYMS"
USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
WITH_CURSES_H="$with_curses_h"
WITH_ECHO="${enable_echo:=yes}"
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"
host="$host"
target="$target"
+with_shared_cxx="$with_shared_cxx"
],cat)dnl
${MAKE:-make} preinstall