mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-07 13:18:01 +02:00
build: Simplify checks for straightforward header files
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
1b0e79cb43
commit
e8a2e1dcea
1 changed files with 20 additions and 28 deletions
48
configure.ac
48
configure.ac
|
|
@ -423,6 +423,26 @@ unsetenv
|
||||||
usleep
|
usleep
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# This construct is only suitable for headers that are self-contained
|
||||||
|
# and do not require extra headers to be included first. More complex
|
||||||
|
# headers need their own checks. Please keep sorted in LC_ALL=C order
|
||||||
|
AC_CHECK_HEADERS_ONCE([
|
||||||
|
alloca.h
|
||||||
|
byteswap.h
|
||||||
|
crt_externs.h
|
||||||
|
dirent.h
|
||||||
|
errno.h
|
||||||
|
locale.h
|
||||||
|
signal.h
|
||||||
|
stdint.h
|
||||||
|
sys/prctl.h
|
||||||
|
sys/resource.h
|
||||||
|
sys/syslimits.h
|
||||||
|
sys/time.h
|
||||||
|
unistd.h
|
||||||
|
ws2tcpip.h
|
||||||
|
])
|
||||||
|
|
||||||
#### Integer sizes
|
#### Integer sizes
|
||||||
|
|
||||||
AC_CHECK_SIZEOF(char)
|
AC_CHECK_SIZEOF(char)
|
||||||
|
|
@ -661,9 +681,6 @@ if test "x$ac_cv_header_syslog_h" = "xyes"; then
|
||||||
AC_CHECK_DECLS([LOG_PERROR], [], [], [[#include <syslog.h>]])
|
AC_CHECK_DECLS([LOG_PERROR], [], [], [[#include <syslog.h>]])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For test-segfault.c
|
|
||||||
AC_CHECK_HEADERS_ONCE([sys/prctl.h])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for dirfd)
|
AC_MSG_CHECKING(for dirfd)
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
@ -699,32 +716,11 @@ closedir(dirp);
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sys/resource.h)
|
|
||||||
AC_CHECK_HEADERS([sys/time.h])
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(dirent.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([execinfo.h],
|
AC_CHECK_HEADERS([execinfo.h],
|
||||||
[AC_SEARCH_LIBS([backtrace], [execinfo],
|
[AC_SEARCH_LIBS([backtrace], [execinfo],
|
||||||
[AC_DEFINE([HAVE_BACKTRACE], [1],
|
[AC_DEFINE([HAVE_BACKTRACE], [1],
|
||||||
[Define to 1 if you have backtrace().])])])
|
[Define to 1 if you have backtrace().])])])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(errno.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(signal.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(locale.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(byteswap.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(unistd.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([stdint.h])
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(ws2tcpip.h)
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(alloca.h)
|
|
||||||
|
|
||||||
# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
|
# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
|
||||||
#
|
#
|
||||||
case $host_os in
|
case $host_os in
|
||||||
|
|
@ -801,9 +797,6 @@ dnl check for writev header and writev function so we're
|
||||||
dnl good to go if HAVE_WRITEV gets defined.
|
dnl good to go if HAVE_WRITEV gets defined.
|
||||||
AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
|
AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
|
||||||
|
|
||||||
dnl needed on darwin for NAME_MAX
|
|
||||||
AC_CHECK_HEADERS(sys/syslimits.h)
|
|
||||||
|
|
||||||
dnl Make it easy to check if we have MSG_NOSIGNAL without actually having to include sys/socket.h
|
dnl Make it easy to check if we have MSG_NOSIGNAL without actually having to include sys/socket.h
|
||||||
AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [[ #include <sys/types.h>
|
AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [[ #include <sys/types.h>
|
||||||
#include <sys/socket.h> ]])
|
#include <sys/socket.h> ]])
|
||||||
|
|
@ -1721,7 +1714,6 @@ AC_DEFINE_UNQUOTED([DBUS_SESSION_BUS_CONNECT_ADDRESS],
|
||||||
[Fallback address for session bus clients])
|
[Fallback address for session bus clients])
|
||||||
|
|
||||||
# darwin needs this to initialize the environment
|
# darwin needs this to initialize the environment
|
||||||
AC_CHECK_HEADERS(crt_externs.h)
|
|
||||||
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
|
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
|
||||||
AH_VERBATIM(_DARWIN_ENVIRON,
|
AH_VERBATIM(_DARWIN_ENVIRON,
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue