From 4100c9210dba2ba280b08e474f67d139a4a6a571 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 1 Dec 2017 12:43:19 +0100 Subject: [PATCH] configure: Replace AC_HEADER_MAJOR macro to handle glibc 2.25 sys/types.h breakage. Signed-off-by: Alexandre Julliard --- aclocal.m4 | 16 ++++++++++++++++ configure | 36 ++---------------------------------- configure.ac | 2 +- 3 files changed, 19 insertions(+), 35 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 9364188e334..2c11de08c53 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -35,6 +35,22 @@ AS_VAR_IF([ac_cv_prog_$1],[], AC_CHECK_PROG([$1],[$2],[$2],[$3],[$4])])], [AS_VAR_COPY([$1],[ac_cv_prog_$1])])]) +dnl WINE_HEADER_MAJOR() +dnl +dnl Same as AC_HEADER_MAJOR but fixed to handle the glibc 2.25 sys/types.h breakage +dnl +AC_DEFUN([WINE_HEADER_MAJOR], +[AC_CHECK_HEADER(sys/mkdev.h, + [AC_DEFINE(MAJOR_IN_MKDEV, 1, + [Define to 1 if `major', `minor', and `makedev' are + declared in .])]) +if test $ac_cv_header_sys_mkdev_h = no; then + AC_CHECK_HEADER(sys/sysmacros.h, + [AC_DEFINE(MAJOR_IN_SYSMACROS, 1, + [Define to 1 if `major', `minor', and `makedev' + are declared in .])]) +fi]) + dnl **** Initialize the programs used by other checks **** dnl dnl Usage: WINE_PATH_SONAME_TOOLS diff --git a/configure b/configure index e12fc0b3104..1da4efa6839 100755 --- a/configure +++ b/configure @@ -7051,35 +7051,6 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 -$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if ${ac_cv_header_sys_types_h_makedev+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return makedev(0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_header_sys_types_h_makedev=yes -else - ac_cv_header_sys_types_h_makedev=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 -$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } - -if test $ac_cv_header_sys_types_h_makedev = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : @@ -7088,9 +7059,8 @@ $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h fi - - if test $ac_cv_header_sys_mkdev_h = no; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h @@ -7098,9 +7068,7 @@ $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h fi - fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : diff --git a/configure.ac b/configure.ac index 4eafce1c65e..6cba83b16da 100644 --- a/configure.ac +++ b/configure.ac @@ -525,7 +525,7 @@ AC_CHECK_HEADERS(\ valgrind/valgrind.h \ zlib.h ) -AC_HEADER_MAJOR() +WINE_HEADER_MAJOR() AC_HEADER_STAT() dnl **** Checks for headers that depend on other ones ****