X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=f3adbf5fa85c5f434acf1abfd90e1daf8d1d442f;hp=f3a5da8eeae009a329a72f05ece959d6e9f46a3a;hb=87f20fc6e737084b06b6343c8c7206404daec4a2;hpb=9ee3995474454b7d956885e0fe5c8cac2ae25d42 diff --git a/configure.in b/configure.in index f3a5da8e..f3adbf5f 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2014,2015 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,19 +28,20 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.585 2014/09/20 20:42:49 tom Exp $ +dnl $Id: configure.in,v 1.599 2015/02/21 21:12:07 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.585 $) +AC_REVISION($Revision: 1.599 $) 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 @@ -209,6 +210,23 @@ AC_SYS_LONG_FILE_NAMES 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, @@ -444,20 +462,28 @@ 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 - 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) -AC_ARG_ENABLE(lib-suffixes, +CF_ARG_DISABLE(lib-suffixes, [ --disable-lib-suffixes disable library suffixes], - [disable_lib_suffixes=$enableval], - [disable_lib_suffixes=no]) + [disable_lib_suffixes=yes], + [disable_lib_suffixes=no], + no) AC_MSG_RESULT($disable_lib_suffixes) ### If we're building with rpath, try to link non-standard libs that way too. @@ -763,7 +789,9 @@ NCURSES_WCHAR_T=0 NCURSES_WINT_T=0 # Check to define _XOPEN_SOURCE "automatically" +CPPFLAGS_before_XOPEN="$CPPFLAGS" CF_XOPEN_SOURCE(500) +CPPFLAGS_after_XOPEN="$CPPFLAGS" # Work around breakage on OS X CF_SIGWINCH @@ -1388,7 +1416,7 @@ CF_DISABLE_GNAT_PROJECTS ### Checks for libraries. case $cf_cv_system_name in #(vi -*mingw32*) #(vi +*mingw32*|*mingw64*) #(vi CPPFLAGS="$CPPFLAGS -DWINVER=0x0501" LIBS=" -lpsapi $LIBS" ;; @@ -1525,6 +1553,7 @@ else AC_FUNC_SETVBUF_REVERSED fi AC_CHECK_TYPE(intptr_t, long) +AC_CHECK_TYPE(ssize_t, int) CF_TYPE_SIGACTION CF_SIZECHANGE CF_FUNC_MEMMOVE @@ -1722,8 +1751,9 @@ LIB_SUBSETS="${LIB_SUBSETS}base" 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" @@ -2010,7 +2040,7 @@ AC_SUBST(CXX_NAME) # workaround for g++ versus Solaris (20131116) case $cf_cv_system_name in #(vi -solaris2*) #(vi +solaris2*) case "x$CPPFLAGS" in #(vi *-D_XOPEN_SOURCE_EXTENDED*) CF_VERBOSE(moving _XOPEN_SOURCE_EXTENDED to work around g++ problem) @@ -2021,6 +2051,26 @@ solaris2*) #(vi ;; esac +# Help to automatically enable the extended curses features when using either +# the *-config or the ".pc" files by adding defines. +AC_MSG_CHECKING(for defines to add to ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config script) +PKG_CFLAGS= +for cf_loop1 in $CPPFLAGS_after_XOPEN +do + cf_found=no + for cf_loop2 in $CPPFLAGS_before_XOPEN + do + if test "x$cf_loop1" = "x$cf_loop2" + then + cf_found=yes + break + fi + done + test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1" +done +AC_MSG_RESULT($PKG_CFLAGS) +AC_SUBST(PKG_CFLAGS) + # AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this. case "x$NCURSES_OSPEED" in #(vi *short*) #(vi @@ -2044,8 +2094,57 @@ xshort|xint|xlong) ;; 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 + +UNALTERED_SYMS= +cf_filter_syms=no + +if test -n "$RESULTING_SYMS" +then + case $cf_cv_abi_version in + [[6789]]) + CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version) + cf_filter_syms=yes + ;; + *) + CF_VERBOSE(will map symbols to default ABI) + ;; + esac +fi + +if test "x$WILDCARD_SYMS" = xno +then + cf_filter_syms=yes +fi + +UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'` +if test $cf_filter_syms = yes +then + RESULTING_SYMS=resulting.map +fi +AC_SUBST(UNALTERED_SYMS) + AC_OUTPUT( \ include/MKterm.h.awk \ include/curses.head:include/curses.h.in \ @@ -2070,6 +2169,7 @@ fi ### 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" @@ -2096,7 +2196,9 @@ TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" TINFO_NAME="$TINFO_NAME" TINFO_SUFFIX="$TINFO_SUFFIX" +UNALTERED_SYMS="$UNALTERED_SYMS" USE_OLD_MAKERULES="$USE_OLD_MAKERULES" +WILDCARD_SYMS="$WILDCARD_SYMS" WITH_CURSES_H="$with_curses_h" WITH_ECHO="${enable_echo:=yes}" WITH_OVERWRITE="$with_overwrite" @@ -2121,9 +2223,9 @@ 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" host="$host" target="$target" +with_shared_cxx="$with_shared_cxx" ],cat)dnl ${MAKE:-make} preinstall