]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 6.4 - patch 20230423
[ncurses.git] / configure.in
index 093dd4775ab14758090f53009089f5494f3580dc..8a74ab6eeee861cf367971372836d4aa9a0e93ad 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright 2018-2021,2022 Thomas E. Dickey                                *
+dnl Copyright 2018-2022,2023 Thomas E. Dickey                                *
 dnl Copyright 1998-2017,2018 Free Software Foundation, Inc.                  *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.753 2022/11/05 20:14:56 tom Exp $
+dnl $Id: configure.in,v 1.762 2023/04/22 22:16:28 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl For additional information, see
@@ -38,7 +38,7 @@ dnl     https://invisible-island.net/autoconf/my-autoconf.html
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.52.20210101)
-AC_REVISION($Revision: 1.753 $)
+AC_REVISION($Revision: 1.762 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -61,6 +61,9 @@ CF_CFG_DEFAULTS
 ### Defaults for ncurses ABI
 CF_ABI_DEFAULTS
 
+### override ABI version, e.g., packagers
+CF_WITH_ABI_ALTERED
+
 ###    Checks for programs.
 AC_ARG_WITH(ada,
        [  --without-ada           suppress check for Ada compiler, don't build demo],
@@ -183,22 +186,6 @@ AC_ARG_WITH(progs,
        [cf_with_progs=yes])
 AC_MSG_RESULT($cf_with_progs)
 
-if test -f "$srcdir/tack/tack.h" ; then
-       if test "x$cross_compiling" = xyes ; then
-               CF_VERBOSE(ignoring tack because we are cross-compiling)
-               cf_with_tack=no
-       else
-               AC_MSG_CHECKING(if you want to build the tack program)
-               AC_ARG_WITH(tack,
-                       [  --without-tack          suppress build/install with tack program],
-                       [cf_with_tack=$withval],
-                       [cf_with_tack=$cf_with_progs])
-               AC_MSG_RESULT($cf_with_tack)
-       fi
-else
-       cf_with_tack=no
-fi
-
 AC_MSG_CHECKING(if you want to build test-programs)
 AC_ARG_WITH(tests,
        [  --without-tests         suppress build/install with test-programs],
@@ -215,7 +202,6 @@ AC_MSG_RESULT($with_curses_h)
 
 modules_to_build="ncurses"
 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
-test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
 modules_to_build="$modules_to_build panel menu form"
 
 AC_ARG_PROGRAM
@@ -420,6 +406,10 @@ LIB_SUFFIX=
 AC_SUBST(LIB_SUFFIX)
 CF_PATHSEP
 
+# headers needed for checks...
+AC_CHECK_DECL(exit)
+AC_HEADER_DIRENT
+
 ###############################################################################
 
 AC_MSG_CHECKING(if you want to build a separate terminfo library)
@@ -865,16 +855,24 @@ AC_ARG_ENABLE(root-environ,
        [with_root_environ=$enableval],
        [with_root_environ=yes])
 AC_MSG_RESULT($with_root_environ)
-test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if root is allowed to use ncurses environment])
+test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if root/setuid application is allowed to use ncurses environment])
 
 AC_MSG_CHECKING(if you want to permit setuid programs to access all files)
-AC_ARG_ENABLE(root-environ,
+AC_ARG_ENABLE(root-access,
        [  --disable-root-access   restrict file-access when running setuid],
        [with_root_access=$enableval],
        [with_root_access=yes])
 AC_MSG_RESULT($with_root_access)
 test "x$with_root_access" = xyes && AC_DEFINE(USE_ROOT_ACCESS,1,[Define to 1 if setuid is allowed all file-access])
 
+AC_MSG_CHECKING(if you want to permit setuid use of ncurses environment variables)
+AC_ARG_ENABLE(setuid-environ,
+       [  --disable-setuid-environ restrict setuid use of ncurses environment variables],
+       [with_setuid_environ=$enableval],
+       [with_setuid_environ=$with_root_environ])
+AC_MSG_RESULT($with_setuid_environ)
+test "x$with_setuid_environ" = xyes && AC_DEFINE(USE_SETUID_ENVIRON,1,[Define to 1 if setuid/setgid application is allowed to use ncurses environment])
+
 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
 ###   to reduce storage requirements for the terminfo database.
 CF_LINK_FUNCS
@@ -1265,7 +1263,7 @@ if test "x$with_ext_mouse" = xyes ; then
        CF_NCURSES_ABI_6
 fi
 
-case $cf_cv_abi_version in
+case $cf_cv_abi_default in
 (5)
        NCURSES_MOUSE_VERSION=1
        ;;
@@ -1743,12 +1741,6 @@ case "$cf_cv_system_name" in
        CF_CHECK_LIBSSP
        ;;
 (*)
-AC_CHECK_FUNC(gettimeofday,
-       AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[
-
-AC_CHECK_LIB(bsd, gettimeofday,
-       AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function])
-       CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday
        ;;
 esac
 
@@ -1756,8 +1748,6 @@ CF_MATH_LIB(MATH_LIB,pow(sin(x),x))
 AC_SUBST(MATH_LIB)
 
 ###    Checks for header files.
-AC_STDC_HEADERS
-AC_HEADER_DIRENT
 AC_HEADER_TIME
 CF_REGEX
 
@@ -1769,6 +1759,7 @@ limits.h \
 locale.h \
 math.h \
 poll.h \
+sys/auxv.h \
 sys/ioctl.h \
 sys/param.h \
 sys/poll.h \
@@ -1824,12 +1815,15 @@ CF_ERRNO
 CF_LINK_DATAONLY
 
 ###    Checks for library functions.
+CF_FUNC_GETTIME
 AC_CHECK_FUNCS( \
 fpathconf \
 getcwd \
+getauxval \
 getegid \
 geteuid \
 getopt \
+getuid \
 issetugid \
 localeconv \
 poll \
@@ -2344,10 +2338,6 @@ AC_SUBST(TICS_LIST)
 AC_SUBST(TINFO_LIST)
 AC_SUBST(SHLIB_LIST)
 
-# used to separate tack out of the tree
-NCURSES_TREE=
-AC_SUBST(NCURSES_TREE)
-
 ### predefined stuff for the test programs
 AC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs])
 
@@ -2508,7 +2498,7 @@ cf_filter_syms=no
 if test -n "$RESULTING_SYMS"
 then
        cf_filter_syms=$cf_dft_filter_syms
-       CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
+       CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_default)
 fi
 
 if test "x$WILDCARD_SYMS" = xno
@@ -2539,8 +2529,6 @@ AC_SUBST(PRIVATE_LIBS)
 # This is used for the *-config script and *.pc data files.
 CF_LD_SEARCHPATH
 
-AC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack])
-
 AC_OUTPUT( \
        include/MKterm.h.awk \
        include/curses.head:include/curses.h.in \
@@ -2612,6 +2600,7 @@ WITH_OVERWRITE="$with_overwrite"
 cf_LIST_MODELS="$cf_list_models"
 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
+cf_cv_abi_default="$cf_cv_abi_default"
 cf_cv_abi_version="$cf_cv_abi_version"
 cf_cv_do_relink="$cf_cv_do_relink"
 cf_cv_do_reranlib="$cf_cv_do_reranlib"