summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-08-07 09:36:01 -0700
committerAndres Freund <andres@anarazel.de>2022-08-07 09:36:01 -0700
commita2a36d56b96fe17c4ad9649936dcf7406eb78cc9 (patch)
tree0b9f3e70f2d57da1b0cec2abf5465b6a436fab33 /configure.ac
parent20c105c4db56f784eebe39cb50ede8ad1bfa3899 (diff)
downloadpostgresql-a2a36d56b96fe17c4ad9649936dcf7406eb78cc9.tar.gz
Trust a few system headers to stand on their own
At some point in the past some headers (net/if.h on some BSDs in 2009, netinet/tcp.h on IRIX in 2000, sys/ucred.h in 2013 on then older openbsd), only compiled if other heades were included first, complicating configure tests. More recent tests indicate that that's not required anymore. Reviewed-By: Thomas Munro <thomas.munro@gmail.com> Discussion: https://postgr.es/m/20220807012914.ydz73yte6j3coulo@awork3.anarazel.de
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 3 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 1b6c963cb1..b5798bcb0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1452,6 +1452,8 @@ AC_CHECK_HEADERS(m4_normalize([
ifaddrs.h
langinfo.h
mbarrier.h
+ net/if.h
+ netinet/tcp.h
sys/epoll.h
sys/event.h
sys/ipc.h
@@ -1464,33 +1466,13 @@ AC_CHECK_HEADERS(m4_normalize([
sys/shm.h
sys/signalfd.h
sys/sockio.h
+ sys/ucred.h
sys/uio.h
sys/un.h
termios.h
ucred.h
]))
-# On BSD, test for net/if.h will fail unless sys/socket.h
-# is included first.
-AC_CHECK_HEADERS(net/if.h, [], [],
-[AC_INCLUDES_DEFAULT
-#include <sys/socket.h>
-])
-
-# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
-# is included first.
-AC_CHECK_HEADERS(sys/ucred.h, [], [],
-[AC_INCLUDES_DEFAULT
-#include <sys/param.h>
-])
-
-# At least on IRIX, test for netinet/tcp.h will fail unless
-# netinet/in.h is included first.
-AC_CHECK_HEADERS(netinet/tcp.h, [], [],
-[AC_INCLUDES_DEFAULT
-#include <netinet/in.h>
-])
-
if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
AC_CHECK_HEADERS(readline/readline.h, [],
[AC_CHECK_HEADERS(readline.h, [],