about summary refs log tree commit diff
path: root/sysdeps/mach
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/mach
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/mach')
-rw-r--r--sysdeps/mach/configure38
-rw-r--r--sysdeps/mach/configure.ac8
-rw-r--r--sysdeps/mach/hurd/configure5
-rw-r--r--sysdeps/mach/hurd/configure.ac10
4 files changed, 12 insertions, 49 deletions
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
index c6ea9be20b..739f1028a4 100644
--- a/sysdeps/mach/configure
+++ b/sysdeps/mach/configure
@@ -1,42 +1,4 @@
 
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
 # ac_fn_c_check_header_preproc LINENO HEADER VAR
 # ----------------------------------------------
 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac
index cadecae884..61b00d66b1 100644
--- a/sysdeps/mach/configure.ac
+++ b/sysdeps/mach/configure.ac
@@ -25,8 +25,8 @@ dnl If not, compile with -Dfoo_t=bar_t.
 dnl
 AC_DEFUN([mach_TYPE_CHECK], [dnl
 AC_CACHE_CHECK(for $1 in mach/mach_types.h, libc_cv_mach_$1,
-AC_TRY_COMPILE([#include <mach/mach_types.h>], [extern $1 foo;],
-libc_cv_mach_$1=$1, libc_cv_mach_$1=$2))
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach/mach_types.h>]], [[extern $1 foo;]])],
+[libc_cv_mach_$1=$1], [libc_cv_mach_$1=$2]))
 if test [$]libc_cv_mach_$1 != $1; then
   DEFINES="$DEFINES -D$1=$2"
 fi])
@@ -42,10 +42,10 @@ dnl The creation_time field is a GNU Mach addition the other variants lack.
 dnl
 AC_CACHE_CHECK(for creation_time in task_basic_info,
 	       libc_cv_mach_task_creation_time, [dnl
-AC_TRY_COMPILE([#include <mach/task_info.h>], [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach/task_info.h>]], [[
 extern struct task_basic_info *i;
 long s = i->creation_time.seconds;
-], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)])
+]])], [libc_cv_mach_task_creation_time=yes], [libc_cv_mach_task_creation_time=no])])
 if test $libc_cv_mach_task_creation_time = no; then
   AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time])
 fi
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
index 4876e1f176..8d0702ad43 100644
--- a/sysdeps/mach/hurd/configure
+++ b/sysdeps/mach/hurd/configure
@@ -9,6 +9,7 @@ if test -n "$sysheaders"; then
 fi
 
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Hurd header version" >&5
 $as_echo_n "checking Hurd header version... " >&6; }
 if ${libc_cv_hurd_version+:} false; then :
@@ -29,12 +30,12 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
   libc_cv_hurd_version=ok
 else
   libc_cv_hurd_version=bad
 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_hurd_version" >&5
 $as_echo "$libc_cv_hurd_version" >&6; }
diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac
index 9a049b1d86..82d085af33 100644
--- a/sysdeps/mach/hurd/configure.ac
+++ b/sysdeps/mach/hurd/configure.ac
@@ -11,14 +11,14 @@ if test -n "$sysheaders"; then
 fi
 
 AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl
-AC_TRY_COMPILE(dnl
-[#include <hurd/version.h>], [
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM(dnl
+[[#include <hurd/version.h>]], [[
 #define NEED_VERSION 20020609
 #if HURD_INTERFACE_VERSION < NEED_VERSION
 # error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
-#endif],
-	       libc_cv_hurd_version=ok,
-	       libc_cv_hurd_version=bad)])
+#endif]])],
+	       [libc_cv_hurd_version=ok],
+	       [libc_cv_hurd_version=bad])])
 if test "x$libc_cv_hurd_version" != xok; then
   AC_MSG_ERROR(Hurd headers not installed or too old)
 fi