diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2012-10-08 12:18:29 +0100 |
---|---|---|
committer | Roger Pau Monne <roger.pau@citrix.com> | 2012-10-08 12:18:29 +0100 |
commit | 58109c79513670eb5d35e8eae0c58c2f7a293c91 (patch) | |
tree | 6fc6c0242a8f2069030c85ffc22818aa74750cef /tools | |
parent | fa8e0b69fe9b04b9c0d30938179c38bbb032a621 (diff) | |
download | xen-58109c79513670eb5d35e8eae0c58c2f7a293c91.tar.gz xen-58109c79513670eb5d35e8eae0c58c2f7a293c91.tar.bz2 xen-58109c79513670eb5d35e8eae0c58c2f7a293c91.zip |
autoconf: add -Werror to libutil.h header check
libutil.h is only needed on BSDs, but not in Linux. Debian package
libbsd-dev-0.3.0-1 installed a libutil.h overlay that contains a
Perform the libutil.h check with -Werror, so we don't include this
bogus header.
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/configure | 7 | ||||
-rw-r--r-- | tools/m4/ptyfuncs.m4 | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/configure b/tools/configure index 2e20a61ed4..9e342ede8e 100755 --- a/tools/configure +++ b/tools/configure @@ -6543,6 +6543,10 @@ $as_echo "$ax_cv_pthread_flags" >&6; } + + saved_CPPFLAGS="$CPPFLAGS" + + CPPFLAGS="$CPPFLAGS -Werror" ac_fn_c_check_header_mongrel "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default" if test "x$ac_cv_header_libutil_h" = x""yes; then : @@ -6553,6 +6557,9 @@ $as_echo "#define INCLUDE_LIBUTIL_H <libutil.h>" >>confdefs.h fi + + CPPFLAGS="$saved_CPPFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty et al" >&5 $as_echo_n "checking for openpty et al... " >&6; } if test "${ax_cv_ptyfuncs_libs+set}" = set; then : diff --git a/tools/m4/ptyfuncs.m4 b/tools/m4/ptyfuncs.m4 index bfea3e10b7..3e37b5a23c 100644 --- a/tools/m4/ptyfuncs.m4 +++ b/tools/m4/ptyfuncs.m4 @@ -1,7 +1,14 @@ AC_DEFUN([AX_CHECK_PTYFUNCS], [ + dnl This is a workaround for a bug in Debian package + dnl libbsd-dev-0.3.0-1. Once we no longer support that + dnl package we can remove the addition of -Werror to + dnl CPPFLAGS. + AX_SAVEVAR_SAVE(CPPFLAGS) + CPPFLAGS="$CPPFLAGS -Werror" AC_CHECK_HEADER([libutil.h],[ AC_DEFINE([INCLUDE_LIBUTIL_H],[<libutil.h>],[libutil header file name]) ]) + AX_SAVEVAR_RESTORE(CPPFLAGS) AC_CACHE_CHECK([for openpty et al], [ax_cv_ptyfuncs_libs], [ for ax_cv_ptyfuncs_libs in -lutil "" NOT_FOUND; do if test "x$ax_cv_ptyfuncs_libs" = "xNOT_FOUND"; then |