summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIdar Tollefsen <itollefs@cisco.com>2012-01-01 16:38:08 +0100
committerTim-Philipp Müller <tim@centricular.net>2012-06-27 21:08:28 +0100
commit7b80441f9d4ec1efb220875795d556370b022204 (patch)
tree154a889ee5ec8908904870df0155da462a95901c /configure.ac
parentd6e639151890a2ef35f2e3dfa23805bf943b0fd5 (diff)
build: Make sure AC_INCLUDES_DEFAULT is used
Without using AC_INCLUDES_DEFAULT explicitly, certain platforms will complain that the header was found, but not usable by the compiler. This happens for instance on Solaris where certain headers are needed to pull in proper defines. Also upgrade to newer autoconf syntax and use proper quoting. https://bugzilla.gnome.org/show_bug.cgi?id=667293
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 16 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index b434c9b074..6cd1508539 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,40 +296,40 @@ dnl check if we have ANSI C header files
AC_HEADER_STDC
dnl Check for ucontext.h
-AC_CHECK_HEADERS([ucontext.h])
+AC_CHECK_HEADERS([ucontext.h], [], [], [AC_INCLUDES_DEFAULT])
dnl Check for sys/socket.h
-AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
+AC_CHECK_HEADERS([sys/socket.h], [HAVE_SYS_SOCKET_H=yes], [HAVE_SYS_SOCKET_H=no], [AC_INCLUDES_DEFAULT])
AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
dnl check for sys/times.h for tests/examples/adapter/
-AC_CHECK_HEADERS([sys/times.h], HAVE_SYS_TIMES_H=yes)
-AC_CHECK_HEADERS([unistd.h], HAVE_UNISTD_H=yes)
+AC_CHECK_HEADERS([sys/times.h], [HAVE_SYS_TIMES_H=yes], [HAVE_SYS_TIME_H=no], [AC_INCLUDES_DEFAULT])
+AC_CHECK_HEADERS([unistd.h], [HAVE_UNISTD_H=yes], [HAVE_UNISTD_H=no], [AC_INCLUDES_DEFAULT])
AM_CONDITIONAL(HAVE_SYS_TIMES_H_AND_UNISTD_H, test "x$HAVE_SYS_TIMES_H" = "xyes" -a "x$HAVE_UNISTD_H" = "xyes")
dnl Check for process.h for getpid() on win32
-AC_CHECK_HEADERS([process.h])
+AC_CHECK_HEADERS([process.h], [], [], [AC_INCLUDES_DEFAULT])
dnl Check for sys/utsname.h for uname
-AC_CHECK_HEADERS([sys/utsname.h])
+AC_CHECK_HEADERS([sys/utsname.h], [], [], [AC_INCLUDES_DEFAULT])
dnl Check for stdio_ext.f for __fbufsize
-AC_CHECK_HEADERS([stdio_ext.h])
+AC_CHECK_HEADERS([stdio_ext.h], [], [], [AC_INCLUDES_DEFAULT])
dnl check for pthreads
-AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes)
+AC_CHECK_HEADERS([pthread.h], [HAVE_PTHREAD_H=yes], [HAVE_PTHREAD_H=no], [AC_INCLUDES_DEFAULT])
AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes")
dnl check for sys/prctl for setting thread name on Linux
-AC_CHECK_HEADERS([sys/prctl.h], HAVE_SYS_PRCTL_H=yes)
+AC_CHECK_HEADERS([sys/prctl.h], [], [], [AC_INCLUDES_DEFAULT])
dnl Check for valgrind.h
dnl separate from HAVE_VALGRIND because you can have the program, but not
dnl the dev package
-AC_CHECK_HEADERS([valgrind/valgrind.h], HAVE_VALGRIND_H=yes)
+AC_CHECK_HEADERS([valgrind/valgrind.h], [], [], [AC_INCLUDES_DEFAULT])
dnl used in gst/gstpoll.c
-AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
+AC_CHECK_HEADERS([winsock2.h], [HAVE_WINSOCK2_H=yes], [HAVE_WINSOCK2_H=no], [AC_INCLUDES_DEFAULT])
AM_CONDITIONAL(HAVE_WINSOCK2_H, test "x$HAVE_WINSOCK2_H" = "xyes")
if test "x$HAVE_WINSOCK2_H" = "xyes"; then
WIN32_LIBS="-lws2_32"
@@ -408,12 +408,12 @@ AC_CHECK_FUNCS([fgetpos])
AC_CHECK_FUNCS([fsetpos])
dnl check for poll(), ppoll() and pselect()
+AC_CHECK_HEADERS([sys/poll.h], [], [], [AC_INCLUDES_DEFAULT])
+AC_CHECK_HEADERS([poll.h], [], [], [AC_INCLUDES_DEFAULT])
AC_CHECK_FUNCS([poll])
AC_CHECK_FUNCS([ppoll])
AC_CHECK_FUNCS([pselect])
-AC_CHECK_HEADERS([sys/poll.h])
-
dnl ****************************************
dnl *** GLib POLL* compatibility defines ***
dnl ****************************************
@@ -422,10 +422,12 @@ AC_MSG_CHECKING([for broken poll])
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdlib.h>
#include <fcntl.h>
- #include <poll.h>
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
+ #ifdef HAVE_POLL_H
+ #include <poll.h>
+ #endif
int main(void) {
struct pollfd fds[1];
int fd;