From patchwork Wed Feb 17 01:17:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Tamura X-Patchwork-Id: 42071 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E2033875440; Wed, 17 Feb 2021 01:18:51 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa2.hc1455-7.c3s2.iphmx.com (esa2.hc1455-7.c3s2.iphmx.com [207.54.90.48]) by sourceware.org (Postfix) with ESMTPS id 9C7793851C3D for ; Wed, 17 Feb 2021 01:18:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9C7793851C3D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=fujitsu.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=naohirot@fujitsu.com IronPort-SDR: ZL/pxWWb7KO5+trTwmEq63+0v2LGJJTgsu/fIsB5zo6XklSzyc80XS7iAhZLCgfmrSck7uhd6C t2v5qMLeANBL9LJseEsoWGjKVBkcqcpxKzeiWlbbVnaOu2RtxpfjcM+nLclFlB1xmNYP80Ofbm uc722lGqo6acjKJh66kGXs1O3l+qhvdK2eFqhK1Apar4U6HNySjVO4/tLZ82JiU8aq6kQ5F++I NHAsRq8Y2H1bnrZB5Yi5XasIKDm2N50YKsjSK3ZIH8TfBuRhmnQi6qgA64/WgZJqmQNNkMbC50 u4o= X-IronPort-AV: E=McAfee;i="6000,8403,9897"; a="19643557" X-IronPort-AV: E=Sophos;i="5.81,184,1610377200"; d="scan'208";a="19643557" Received: from unknown (HELO yto-r1.gw.nic.fujitsu.com) ([218.44.52.217]) by esa2.hc1455-7.c3s2.iphmx.com with ESMTP; 17 Feb 2021 10:18:45 +0900 Received: from yto-m1.gw.nic.fujitsu.com (yto-nat-yto-m1.gw.nic.fujitsu.com [192.168.83.64]) by yto-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 7D6B8EC7AC for ; Wed, 17 Feb 2021 10:18:43 +0900 (JST) Received: from m3050.s.css.fujitsu.com (msm.b.css.fujitsu.com [10.134.21.208]) by yto-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id CAA91C9CE9 for ; Wed, 17 Feb 2021 10:18:42 +0900 (JST) Received: from bionic.lxd (unknown [10.126.53.116]) by m3050.s.css.fujitsu.com (Postfix) with ESMTP id C28B542D; Wed, 17 Feb 2021 10:18:42 +0900 (JST) From: Naohiro Tamura To: libc-alpha@sourceware.org Subject: [PATCH v2 1/3] Replaced obsolete AC_TRY_COMPILE to AC_COMPILE_IFELSE Date: Wed, 17 Feb 2021 01:17:20 +0000 Message-Id: <20210217011720.215896-1-naohirot@fujitsu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210216115912.213547-1-naohirot@fujitsu.com> References: <20210216115912.213547-1-naohirot@fujitsu.com> X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This patch replaced obsolete AC_TRY_COMPILE to AC_COMPILE_IFELSE. It has been confirmed that GNU 'autoconf' 2.69 doesn't change any 'configure' files and suppressed obsolete warnings. --- configure.ac | 16 ++++++++-------- sysdeps/ieee754/ldbl-opt/configure.ac | 8 ++++---- sysdeps/mach/configure.ac | 8 ++++---- sysdeps/mach/hurd/configure.ac | 10 +++++----- sysdeps/s390/configure.ac | 4 ++-- sysdeps/unix/sysv/linux/configure.ac | 8 ++++---- sysdeps/unix/sysv/linux/powerpc/configure.ac | 8 ++++---- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/configure.ac b/configure.ac index dfebb8a7cc..d8ccb6c119 100644 --- a/configure.ac +++ b/configure.ac @@ -466,10 +466,10 @@ AC_ARG_ENABLE([mathvec], [build_mathvec=$enableval], [build_mathvec=notset]) -AC_TRY_COMPILE([], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #ifndef __CET__ # error no CET compiler support -#endif], +#endif]])], [libc_cv_compiler_default_cet=yes], [libc_cv_compiler_default_cet=no]) @@ -1018,10 +1018,10 @@ AC_CHECK_PROG_VER(BISON, bison, --version, [2.7*|[3-9].*|[1-9][0-9]*], critic_missing="$critic_missing bison") AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [ -AC_TRY_COMPILE([], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) #error insufficient compiler -#endif], +#endif]])], [libc_cv_compiler_ok=yes], [libc_cv_compiler_ok=no])]) AS_IF([test $libc_cv_compiler_ok != yes], @@ -1628,10 +1628,10 @@ dnl Check for silly hacked compilers predefining _FORTIFY_SOURCE. dnl Since we are building the implementations of the fortified functions here, dnl having the macro defined interacts very badly. AC_CACHE_CHECK([for _FORTIFY_SOURCE predefine], libc_cv_predef_fortify_source, -[AC_TRY_COMPILE([], [ +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #ifdef _FORTIFY_SOURCE # error bogon -#endif], +#endif]])], [libc_cv_predef_fortify_source=no], [libc_cv_predef_fortify_source=yes])]) if test $libc_cv_predef_fortify_source = yes; then @@ -1676,7 +1676,7 @@ fi AC_CACHE_CHECK(for __builtin_trap with no external dependencies, libc_cv_builtin_trap, [dnl libc_cv_builtin_trap=no -AC_TRY_COMPILE([], [__builtin_trap ()], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[__builtin_trap ()]])],[ libc_undefs=`$NM -u conftest.o | LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \ 2>&AS_MESSAGE_LOG_FD` || { @@ -1685,7 +1685,7 @@ libc_undefs=`$NM -u conftest.o | echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'" if test -z "$libc_undefs"; then libc_cv_builtin_trap=yes -fi])]) +fi],[])]) if test $libc_cv_builtin_trap = yes; then AC_DEFINE([HAVE_BUILTIN_TRAP]) fi diff --git a/sysdeps/ieee754/ldbl-opt/configure.ac b/sysdeps/ieee754/ldbl-opt/configure.ac index a77fadd1c4..70e3b32dc6 100644 --- a/sysdeps/ieee754/ldbl-opt/configure.ac +++ b/sysdeps/ieee754/ldbl-opt/configure.ac @@ -6,13 +6,13 @@ AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128, libc_cv_mlong_double_128, [dnl save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mlong-double-128" -AC_TRY_COMPILE(, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #ifndef __LONG_DOUBLE_128__ # error "compiler did not predefine __LONG_DOUBLE_128__ as expected" #endif -long double foobar (long double x) { return x; }], - libc_cv_mlong_double_128=yes, - libc_cv_mlong_double_128=no) +long double foobar (long double x) { return x; }]])], + [libc_cv_mlong_double_128=yes], + [libc_cv_mlong_double_128=no]) CFLAGS="$save_CFLAGS"]) if test "$libc_cv_mlong_double_128" = no; then AC_MSG_ERROR([this configuration requires -mlong-double-128 support]) 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 ], [extern $1 foo;], -libc_cv_mach_$1=$1, libc_cv_mach_$1=$2)) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[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 ], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ 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.ac b/sysdeps/mach/hurd/configure.ac index eab0e5b6c1..eb80210711 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 ], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(dnl +[[#include ]], [[ #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 diff --git a/sysdeps/s390/configure.ac b/sysdeps/s390/configure.ac index dfe007a774..e502d34882 100644 --- a/sysdeps/s390/configure.ac +++ b/sysdeps/s390/configure.ac @@ -218,11 +218,11 @@ dnl overflow dnl (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269) AC_CACHE_CHECK([if $CC is sufficient to build libc on s390x], libc_cv_compiler_ok_on_s390x, [ -AC_TRY_COMPILE([], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #if !defined __GNUC__ || __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 1) #error insufficient compiler for building on s390x #endif -], +]])], [libc_cv_compiler_ok_on_s390x=yes], [libc_cv_compiler_ok_on_s390x=no])]) if test "$libc_cv_compiler_ok_on_s390x" != yes; then diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac index 13abda0a51..e1fffbf374 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 +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #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 +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #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 ], [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ #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 ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ #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"]) From patchwork Wed Feb 17 01:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naohiro Tamura X-Patchwork-Id: 42072 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 962593850439; Wed, 17 Feb 2021 01:21:35 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa12.hc1455-7.c3s2.iphmx.com (esa12.hc1455-7.c3s2.iphmx.com [139.138.37.100]) by sourceware.org (Postfix) with ESMTPS id E28F0386102F for ; Wed, 17 Feb 2021 01:21:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E28F0386102F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=fujitsu.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=naohirot@fujitsu.com IronPort-SDR: L6b7nfYipVXODdNRID0dRYD1KZOQ0JAGsc4eJQOkUoAQrdjH5OlTn3iOV8o8E4OkuLivapXIVC t5LOsp4eRPLmpvQZC5nx7PvzgsTaIF3ipIK76gh3O/EUpr11lh+p9TEgUtOJkSGssbJWaZoi4C egeK5Sg3B1REmN1ZatJymPim+NG6lJEnuAZSaEq40dwZW+0u2SQ2xER20ux/oMgVVjK+qVjwAp bxx++cmv7ptGFw5UXjPZKQyR0vp7hgxXDIHYuULD07/dzy7X3N0nweWkDnz8VqoFB1SgUCdeu5 erY= X-IronPort-AV: E=McAfee;i="6000,8403,9897"; a="60142" X-IronPort-AV: E=Sophos;i="5.81,184,1610377200"; d="scan'208";a="60142" Received: from unknown (HELO yto-r1.gw.nic.fujitsu.com) ([218.44.52.217]) by esa12.hc1455-7.c3s2.iphmx.com with ESMTP; 17 Feb 2021 10:21:28 +0900 Received: from yto-m2.gw.nic.fujitsu.com (yto-nat-yto-m2.gw.nic.fujitsu.com [192.168.83.65]) by yto-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id E9FB3EC7AA for ; Wed, 17 Feb 2021 10:21:27 +0900 (JST) Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by yto-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 42E599BAE9 for ; Wed, 17 Feb 2021 10:21:27 +0900 (JST) Received: from bionic.lxd (unknown [10.126.53.116]) by m3051.s.css.fujitsu.com (Postfix) with ESMTP id 3657822E; Wed, 17 Feb 2021 10:21:27 +0900 (JST) From: Naohiro Tamura To: libc-alpha@sourceware.org Subject: [PATCH v2 2/3] Replaced obsolete AC_TRY_LINK to AC_LINK_IFELSE Date: Wed, 17 Feb 2021 01:20:17 +0000 Message-Id: <20210217012017.215961-1-naohirot@fujitsu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210216120021.213600-1-naohirot@fujitsu.com> References: <20210216120021.213600-1-naohirot@fujitsu.com> X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This patch replaced obsolete AC_TRY_LINK to AC_LINK_IFELSE. It has been confirmed that GNU 'autoconf' 2.69 doesn't change the 'configure' file and suppressed obsolete warning. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d8ccb6c119..14e85a221f 100644 --- a/configure.ac +++ b/configure.ac @@ -1579,7 +1579,8 @@ if test "$with_gd" != "no"; then LDFLAGS="$LDFLAGS $libgd_ldflags" old_LIBS="$LIBS" LIBS="$LIBS -lgd -lpng -lz -lm" - AC_TRY_LINK([#include ], [gdImagePng (0, 0)], LIBGD=yes, LIBGD=no) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[gdImagePng (0, 0)]])], + [LIBGD=yes],[LIBGD=no]) CFLAGS="$old_CFLAGS" LDFLAGS="$old_LDFLAGS" LIBS="$old_LIBS"