configure: Replace AC_HEADER_MAJOR macro to handle glibc 2.25 sys/types.h breakage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ff061b9edf
commit
4100c9210d
|
@ -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 <mkdev.h>.])])
|
||||
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 <sysmacros.h>.])])
|
||||
fi])
|
||||
|
||||
dnl **** Initialize the programs used by other checks ****
|
||||
dnl
|
||||
dnl Usage: WINE_PATH_SONAME_TOOLS
|
||||
|
|
|
@ -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 <sys/types.h>
|
||||
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,8 +7059,7 @@ $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
|
|||
fi
|
||||
|
||||
|
||||
|
||||
if test $ac_cv_header_sys_mkdev_h = no; then
|
||||
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 :
|
||||
|
||||
|
@ -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 :
|
||||
|
|
|
@ -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 ****
|
||||
|
|
Loading…
Reference in New Issue