From 9c0908a778d0c57226c8a4e8ac6582d35b83739c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 29 May 2024 15:09:38 -0700 Subject: [PATCH] autoconf: remove workarounds for some very old systems Remove workarounds for some ridiculously old systems; these workarounds are basically untestable. Signed-off-by: H. Peter Anvin --- config.h | 31 +++++-------------------------- configure.ac | 54 ++++++++---------------------------------------------- 2 files changed, 13 insertions(+), 72 deletions(-) diff --git a/config.h b/config.h index b22d540..8c9af73 100644 --- a/config.h +++ b/config.h @@ -30,6 +30,10 @@ /* Standard includes */ #include +#include +#include +#include +#include #ifdef HAVE_SYS_TYPES_H #include @@ -39,21 +43,6 @@ #include #endif -#ifdef STDC_HEADERS -#include -#include -#else -#ifdef HAVE_STDLIB_H -#include -#endif -#endif - -#ifdef HAVE_MEMORY_H -#ifndef STDC_HEADERS -#include -#endif -#endif - #ifdef HAVE_STRING_H #include #endif @@ -80,15 +69,8 @@ #include #endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#if HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H #include -#else -#include -#endif #endif #ifdef HAVE_GRP_H @@ -99,9 +81,6 @@ #include #endif -#include -#include - #ifdef HAVE_SYS_SOCKET_H #include #else diff --git a/configure.ac b/configure.ac index 7ab7c5a..9a467b3 100644 --- a/configure.ac +++ b/configure.ac @@ -2,12 +2,13 @@ dnl dnl autoconf input file to generate MCONFIG dnl -AC_PREREQ(2.61) -AC_INIT(MCONFIG.in) +AC_PREREQ([2.71]) +AC_INIT +AC_CONFIG_SRCDIR([MCONFIG.in]) AC_PREFIX_DEFAULT(/usr) AC_USE_SYSTEM_EXTENSIONS -AC_ISC_POSIX +AC_SEARCH_LIBS([strerror],[cposix]) AC_PROG_CC AC_C_CONST @@ -30,21 +31,15 @@ PA_ADD_CFLAGS(-Wsign-compare) PA_ADD_CFLAGS(-pipe) PA_ADD_CFLAGS(-fno-strict-aliasing) -AC_HEADER_STDC AC_CHECK_HEADERS(inttypes.h) AC_CHECK_HEADERS(stdint.h) PA_CHECK_INTTYPES_H_SANE AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(grp.h) AC_CHECK_HEADERS(libgen.h) -AC_CHECK_HEADERS(memory.h) AC_CHECK_HEADERS(setjmp.h) -AC_CHECK_HEADERS(stddef.h) -AC_CHECK_HEADERS(stdlib.h) -AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sysexits.h) -AC_CHECK_HEADERS(time.h) AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(sys/file.h) AC_CHECK_HEADERS(sys/filio.h) @@ -53,7 +48,7 @@ AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(arpa/inet.h) AC_CHECK_HEADERS(netdb.h) -AC_HEADER_TIME + dnl This is needed on some versions of FreeBSD... AC_CHECK_HEADERS(machine/param.h) AC_CHECK_HEADERS(sys/socket.h) @@ -78,44 +73,10 @@ dnl isn't among the list of standard headers that autoconf checks dnl but POSIX requires for socklen_t to be defined. dnl AC_CHECK_TYPES(socklen_t,,, -[ -#include +[AC_INCLUDES_DEFAULT #if HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if HAVE_UNISTD_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif ]) AC_SEARCH_LIBS(socket, [socket ws2_32 wsock32], , [AC_MSG_ERROR(socket library not found)]) @@ -300,4 +261,5 @@ AC_PROG_INSTALL fi] AC_CONFIG_HEADERS(aconfig.h) -AC_OUTPUT(MCONFIG) +AC_CONFIG_FILES([MCONFIG]) +AC_OUTPUT -- 2.11.4.GIT