summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2022-11-11 07:05:26 -0700
committerTodd C. Miller <Todd.Miller@sudo.ws>2022-11-11 07:05:26 -0700
commit31973b75d0cd4be4e1cce9ac60dab352c27e12b5 (patch)
tree872e7e4bf36a52daa16aa54a83916fc1923f81ee /configure.ac
parentd5b99587a8be2bb92c99385c93ee12b686301c3d (diff)
downloadsudo-31973b75d0cd4be4e1cce9ac60dab352c27e12b5.tar.gz
configure: avoid running unnecessary tests on modern systems.
Remove AC_SYS_POSIX_TERMIOS, AC_TYPE_MODE_T, AC_TYPE_UID_T. Add missing checks for int16_t, uint16_t, int32_t, and int64_t. Only check for intmax_t, uintmax_t and bit-width types if missing both inttypes.h and stdint.h. Remove unused clockid_t replacement.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 11 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 88b3304c5..7bea54773 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2506,10 +2506,6 @@ case "$host_os" in
fi
;;
esac
-AC_SYS_POSIX_TERMIOS
-if test "$ac_cv_sys_posix_termios" != "yes"; then
- AC_MSG_ERROR([must have POSIX termios to build sudo])
-fi
SUDO_MAILDIR
if test ${with_logincap-'no'} != "no"; then
AC_CHECK_HEADERS([login_cap.h], [LOGINCAP_USAGE='[[-c class]] '; LCMAN=1
@@ -2533,23 +2529,21 @@ fi
dnl
dnl typedef checks
dnl
-AC_TYPE_MODE_T
-AC_TYPE_UID_T
-AC_CHECK_TYPE([clockid_t], [], [AC_DEFINE(clockid_t, int)], [#include <sys/types.h>
-#include <time.h>])
+if test X"${ac_cv_header_stdint_h}${ac_cv_header_inttypes_h}" = X"nono"; then
+ AC_CHECK_TYPE(uint8_t, unsigned char)
+ AC_CHECK_TYPE(int16_t, unsigned int)
+ AC_CHECK_TYPE(uint16_t, unsigned int)
+ AC_CHECK_TYPE(int32_t, unsigned int)
+ AC_CHECK_TYPE(uint32_t, unsigned int)
+ AC_CHECK_TYPE(int64_t, unsigned long long)
+ AC_CHECK_TYPE(uint64_t, unsigned long long)
+ AC_CHECK_TYPE(intmax_t, long long)
+ AC_CHECK_TYPE(uintmax_t, unsigned long long)
+fi
AC_CHECK_TYPE([sig_atomic_t], [], [AC_DEFINE(sig_atomic_t, int)], [#include <sys/types.h>
#include <signal.h>])
AC_CHECK_TYPES([struct in6_addr], [], [], [#include <sys/types.h>
#include <netinet/in.h>])
-AC_TYPE_LONG_LONG_INT
-if test X"$ac_cv_type_long_long_int" != X"yes"; then
- AC_MSG_ERROR([C compiler does not appear to support the long long int type])
-fi
-AC_CHECK_TYPE(intmax_t, long long)
-AC_CHECK_TYPE(uintmax_t, unsigned long long)
-AC_CHECK_TYPE(uint8_t, unsigned char)
-AC_CHECK_TYPE(uint32_t, unsigned int)
-AC_CHECK_TYPE(uint64_t, unsigned long long)
AC_CHECK_TYPE(socklen_t, [], [AC_DEFINE(socklen_t, unsigned int)], [
AC_INCLUDES_DEFAULT
#include <sys/socket.h>])