]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 5.9 - patch 20140802
[ncurses.git] / configure.in
index 1e59dc8c98e3b9e9dda91912afa2dacefad17812..b229618c4bc78105719a5052dfb2e9c93e6d20eb 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2013,2014 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.573 2013/08/03 22:59:09 tom Exp $
+dnl $Id: configure.in,v 1.583 2014/08/02 20:35:31 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.573 $)
+AC_REVISION($Revision: 1.583 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -421,6 +421,14 @@ if test "$CC_SHARED_OPTS" = "unknown"; then
        done
 fi
 
+# pretend that ncurses==ncursesw==ncursest
+AC_MSG_CHECKING(if you want to disable library suffixes)
+AC_ARG_ENABLE(lib-suffixes,
+       [  --disable-lib-suffixes  disable library suffixes],
+       [disable_lib_suffixes=$enableval],
+       [disable_lib_suffixes=no])
+AC_MSG_RESULT($disable_lib_suffixes)
+
 ### If we're building with rpath, try to link non-standard libs that way too.
 if test "$DFT_LWR_MODEL" = "shared"; then
        CF_DISABLE_RPATH_HACK
@@ -743,7 +751,9 @@ AC_ARG_ENABLE(widec,
        [with_widec=no])
 AC_MSG_RESULT($with_widec)
 if test "x$with_widec" = xyes ; then
-       LIB_SUFFIX="w${LIB_SUFFIX}"
+       if test "x$disable_lib_suffixes" = xno ; then
+               LIB_SUFFIX="w${LIB_SUFFIX}"
+       fi
        AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code])
        AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code])
 
@@ -1181,7 +1191,23 @@ if test "x$with_reentrant" = xyes ; then
                CF_ADD_LIB(pthread,TEST_LIBS)
                CF_ADD_LIB(pthread,TEST_LIBS2)
        else
-               LIB_SUFFIX="t${LIB_SUFFIX}"
+               # when not using weak symbols but with_reentrant,
+               # add 't' to the library suffix on all platforms
+               # except cygwin, where we only do that if ALSO
+               # compiling with full thread support.
+               case "$host" in
+               *cygwin* | *msys*) #(vi
+                       if test "$with_pthread" = "yes" ; then
+                               if test "x$disable_lib_suffixes" = "xno" ; then
+                                       LIB_SUFFIX="t${LIB_SUFFIX}"
+                               fi
+                       fi ;;
+               *)
+                       if test "x$disable_lib_suffixes" = "xno" ; then
+                               LIB_SUFFIX="t${LIB_SUFFIX}"
+                       fi
+                       ;;
+               esac
        fi
        AC_DEFINE(USE_REENTRANT,1,[Define to 1 to use experimental reentrant feature])
        CF_NCURSES_ABI_6
@@ -1261,7 +1287,7 @@ AC_MSG_RESULT($with_warnings)
 
 if test "x$with_warnings" = "xyes"; then
        CF_ADD_ADAFLAGS(-gnatg)
-       CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
+       CF_GCC_WARNINGS(Wno-unknown-pragmas Wswitch-enum)
        if test "x$cf_with_cxx" = xyes ; then
                CF_GXX_WARNINGS(Wno-unused)
        fi
@@ -1327,9 +1353,13 @@ fi
 
 AC_SUBST(ADA_TRACE)
 
+CF_DISABLE_GNAT_PROJECTS
+
 ###    Checks for libraries.
 case $cf_cv_system_name in #(vi
 *mingw32*) #(vi
+       CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
+       LIBS=" -lpsapi $LIBS"
        ;;
 *)
 AC_CHECK_FUNC(gettimeofday,
@@ -1591,9 +1621,10 @@ dnl At the moment we support no other Ada95 compiler.
                        CF_ADD_ADAFLAGS(-gnatpn)
                        CF_FIXUP_ADAFLAGS
 
+                       CF_GNATPREP_OPT_T
+
                        CF_GNAT_GENERICS
                        CF_GNAT_SIGINT
-                       CF_GNAT_PRAGMA_UNREF
                        CF_GNAT_PROJECTS
 
                        CF_WITH_ADA_COMPILER
@@ -1798,8 +1829,8 @@ fi
 
 if test "$DFT_LWR_MODEL" = shared ; then
        case $cf_cv_system_name in #(vi
-       cygwin*)
-               # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
+       cygwin*|msys*)
+               # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
                TINFO_SUFFIX=.dll
                ;;
        esac
@@ -1888,6 +1919,7 @@ CF_ADD_CFLAGS($EXTRA_CFLAGS)
 
 ### Define substitutions for header files to avoid name-pollution
 CF_SUBST_IF(["x$cf_cv_have_tcgetattr" = xyes], HAVE_TCGETATTR, 1, 0)
+CF_SUBST_IF(["x$ac_cv_header_stdint_h" = xyes], HAVE_STDINT_H, 1, 0)
 CF_SUBST_IF(["x$ac_cv_header_termio_h" = xyes], HAVE_TERMIO_H, 1, 0)
 CF_SUBST_IF(["x$ac_cv_header_termios_h" = xyes], HAVE_TERMIOS_H, 1, 0)
 
@@ -1938,6 +1970,42 @@ AC_SUBST(MENU_NAME)
 AC_SUBST(FORM_NAME)
 AC_SUBST(CXX_NAME)
 
+# workaround for g++ versus Solaris (20131116)
+case $cf_cv_system_name in #(vi
+solaris2*) #(vi
+       case "x$CPPFLAGS" in #(vi
+       *-D_XOPEN_SOURCE_EXTENDED*)
+               CF_VERBOSE(moving _XOPEN_SOURCE_EXTENDED to work around g++ problem)
+               CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
+               CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
+               ;;
+       esac
+       ;;
+esac
+
+# AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
+case "x$NCURSES_OSPEED" in #(vi
+*short*) #(vi
+       cf_compatible=1
+       ;;
+*)
+       cf_compatible=0
+       ;;
+esac
+AC_DEFINE_UNQUOTED(NCURSES_OSPEED_COMPAT,$cf_compatible,[Define to 1 if termcap variable ospeed is short])
+
+case "x$cf_cv_typeof_chtype" in
+xshort|xint|xlong)
+       cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
+       ;;
+esac
+
+case "x$cf_cv_typeof_mmask_t" in
+xshort|xint|xlong)
+       cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
+       ;;
+esac
+
 SUB_SCRIPTS=
 
 AC_OUTPUT( \