about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorNaohiro Tamura <naohirot@fujitsu.com>2021-05-22 02:42:48 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-04 10:16:00 -0300
commitb190bccc8a7e4919d3bd68a153577284f201819a (patch)
tree04374fc6123931c91c08adb77c372986ce9c9053 /sysdeps/unix/sysv
parent57094e576aed174317fb7de2da34be8536891678 (diff)
downloadglibc-b190bccc8a7e4919d3bd68a153577284f201819a.tar.gz
glibc-b190bccc8a7e4919d3bd68a153577284f201819a.tar.xz
glibc-b190bccc8a7e4919d3bd68a153577284f201819a.zip
configure: Replaced obsolete AC_TRY_COMPILE
This patch replaced obsolete AC_TRY_COMPILE to AC_COMPILE_IFELSE or
AC_PREPROC_IFELSE.
It has been confirmed that GNU 'autoconf' 2.69 suppressed obsolete
warnings, updated the following files:
  - configure
  - sysdeps/mach/configure
  - sysdeps/mach/hurd/configure
  - sysdeps/s390/configure
  - sysdeps/unix/sysv/linux/configure
and didn't change the following files:
  - sysdeps/ieee754/ldbl-opt/configure
  - sysdeps/unix/sysv/linux/powerpc/configure

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/configure9
-rw-r--r--sysdeps/unix/sysv/linux/configure.ac8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/configure.ac8
3 files changed, 13 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index cace758c01..4ff02c9b6d 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -6,6 +6,7 @@ if test -n "$sysheaders"; then
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
 $as_echo_n "checking installed Linux kernel header files... " >&6; }
 if ${libc_cv_linux320+:} false; then :
@@ -25,12 +26,12 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
   libc_cv_linux320='3.2.0 or later'
 else
   libc_cv_linux320='missing or too old!'
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5
 $as_echo "$libc_cv_linux320" >&6; }
@@ -84,12 +85,12 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
   libc_minimum_kernel=ok
 else
   libc_minimum_kernel='too old!'
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
 $as_echo "$libc_minimum_kernel" >&6; }
 if test "$libc_minimum_kernel" = ok; then
diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac
index 13abda0a51..197b7e66c8 100644
--- a/sysdeps/unix/sysv/linux/configure.ac
+++ b/sysdeps/unix/sysv/linux/configure.ac
@@ -8,12 +8,12 @@ if test -n "$sysheaders"; then
 fi
 define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
 AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
-AC_TRY_COMPILE([#include <linux/version.h>
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <linux/version.h>
 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < ]dnl
 patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
 [ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
 # error kernel headers missing or too old
-#endif], [],
+#endif]], [[]])],
 	       [libc_cv_linuxVER='LIBC_LINUX_VERSION or later'],
 	       [libc_cv_linuxVER='missing or too old!'])])
 if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
@@ -52,10 +52,10 @@ changequote(,)dnl
 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
 changequote([,])dnl
-AC_TRY_COMPILE([#include <linux/version.h>
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <linux/version.h>
 #if LINUX_VERSION_CODE < $decnum
 # error kernel headers too old
-#endif], [], [libc_minimum_kernel=ok], [libc_minimum_kernel='too old!'])
+#endif]], [[]])], [libc_minimum_kernel=ok], [libc_minimum_kernel='too old!'])
 AC_MSG_RESULT($libc_minimum_kernel)
 if test "$libc_minimum_kernel" = ok; then
   AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum)
diff --git a/sysdeps/unix/sysv/linux/powerpc/configure.ac b/sysdeps/unix/sysv/linux/powerpc/configure.ac
index b8e5f9ac32..598e44ab71 100644
--- a/sysdeps/unix/sysv/linux/powerpc/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/configure.ac
@@ -6,11 +6,11 @@ AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format,
 	       libc_cv_mlong_double_128ibm, [dnl
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -mlong-double-128"
-AC_TRY_COMPILE([#include <float.h>], [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <float.h>]], [[
 #if LDBL_MANT_DIG != 106
 # error "compiler doesn't implement IBM extended format of long double"
 #endif
-long double foobar (long double x) { return x; }],
+long double foobar (long double x) { return x; }]])],
 	       libc_cv_mlong_double_128ibm=yes,
 	       libc_cv_mlong_double_128ibm=no)
 CFLAGS="$save_CFLAGS"])
@@ -20,11 +20,11 @@ if test "$libc_cv_mlong_double_128ibm" = no; then
 		 libc_cv_mabi_ibmlongdouble, [dnl
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble"
-  AC_TRY_COMPILE([#include <float.h>], [
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <float.h>]], [[
 #if LDBL_MANT_DIG != 106
 # error "compiler doesn't implement IBM extended format of long double"
 #endif
-long double foobar (long double x) { return x; }],
+long double foobar (long double x) { return x; }]])],
 		 libc_cv_mabi_ibmlongdouble=yes,
 		 libc_cv_mabi_ibmlongdouble=no)
   CFLAGS="$save_CFLAGS"])