From 47db40849f589dd4ce3e008c2fd401eee711a3e4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 25 Oct 2018 08:33:59 -0700 Subject: [PATCH] =?utf8?q?havelib:=20fix=20nested=20=E2=80=98configure?= =?utf8?q?=E2=80=99=20chatter?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest AC_CACHE_CHECK calls, which resulted in confusing output like “checking for the common suffixes of directories in the library search path... checking for 64-bit host... no lib,lib”. --- ChangeLog | 6 ++++++ m4/lib-prefix.m4 | 31 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38c59c26a2..55493fde22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2018-10-25 Paul Eggert + havelib: fix nested ‘configure’ chatter + * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest + AC_CACHE_CHECK calls, which resulted in confusing output like + “checking for the common suffixes of directories in the library + search path... checking for 64-bit host... no lib,lib”. + backupfile: tweak for better code * lib/backupfile.c: Sort include directives, and remove unnecessary include. diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 5abf4e6990..5d68eb5ba7 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -1,4 +1,4 @@ -# lib-prefix.m4 serial 12 +# lib-prefix.m4 serial 13 dnl Copyright (C) 2001-2005, 2008-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -168,6 +168,23 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HOST_CPU_C_ABI]) + + case "$host_os" in + solaris*) + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _LP64 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_solaris_64bit=yes], + [gl_cv_solaris_64bit=no]) + ]);; + esac + dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], @@ -180,18 +197,6 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifdef _LP64 - int ok; - #else - error fail - #endif - ]])], - [gl_cv_solaris_64bit=yes], - [gl_cv_solaris_64bit=no]) - ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in -- 2.11.4.GIT