diff options
author | Idar Tollefsen <itollefs@cisco.com> | 2012-01-01 16:38:08 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2012-06-27 21:18:24 +0100 |
commit | e6d6cbf5e374a95d0735e1a12a3b4f78220ffa38 (patch) | |
tree | 66207655927e5864c9af12780f5c2a7cd28b4c27 | |
parent | c3ec4870981af82e3a1bde5e1612968ad01cf328 (diff) | |
download | gstreamer-e6d6cbf5e374a95d0735e1a12a3b4f78220ffa38.tar.gz |
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
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | m4/check-checks.m4 | 2 |
2 files changed, 17 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 0c95416995..a447470deb 100644 --- a/configure.ac +++ b/configure.ac @@ -302,40 +302,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" @@ -414,12 +414,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 **************************************** @@ -428,10 +428,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; diff --git a/m4/check-checks.m4 b/m4/check-checks.m4 index cd996ce440..349a1b5013 100644 --- a/m4/check-checks.m4 +++ b/m4/check-checks.m4 @@ -16,7 +16,7 @@ AC_SUBST(CHECK_MICRO_VERSION) AC_SUBST(CHECK_VERSION) dnl Checks for header files and declarations -AC_CHECK_HEADERS([unistd.h sys/wait.h sys/time.h]) +AC_CHECK_HEADERS([unistd.h sys/wait.h sys/time.h], [], [], [AC_INCLUDES_DEFAULT]) AC_CHECK_FUNCS([localtime_r]) |