configure: Fix the <sys/sysmacros.h> check
PATCH 1/1 configure: Fix the <sys/sysmacros.h> check
AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_ defined by <sys/types.h> alone. It is, but it warns, and that's ugly. To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so the warning makes the compilation test fail.
--- configure.ac | 4 ++++ 1 file changed, 4 insertions(+)
configure.ac +4 -0
@@ -54,7 +54,11 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA +save_CFLAGS="$CFLAGS" +export CFLAGS="$CFLAGS -Werror" AC_HEADER_MAJOR +CFLAGS="$save_CFLAGS" + AC_CHECK_HEADERS([sys/sysctl.h sys/select.h]) # Initialize libtool
Signature · 6 lines
2.12.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 15 lines · Adam Jackson
AC_HEADER_MAJORonly definesMAJOR_IN_SYSMACROSifmajor()is _not_ defined by <sys/types.h> alone. It is, but it warns, and that's ugly. To fix this, push -Werror into CFLAGS when invokingAC_HEADER_MAJORso the warning makes the compilation test fail.Signed-off-by Adam Jackson <[email protected]>--- configure.ac | 4 ++++ 1 file changed, 4 insertions(+)configure.ac +0
-0
configure.ac AC_USE_SYSTEM_EXTENSIONS · line 61
Quoted 8 lines
configure.ac +4
-0@@ -54,7 +54,11 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA +save_CFLAGS="$CFLAGS" +export CFLAGS="$CFLAGS -Werror" AC_HEADER_MAJOR +CFLAGS="$save_CFLAGS" +
IIRC the Sun compiler supports (albeit undocumented) Werror if anyone is using it. So this should be fine.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel