diff options
author | Bruno Haible <bruno@clisp.org> | 2020-07-26 01:45:32 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-07-26 01:49:25 +0200 |
commit | 6f8fd6411e022200c743d8e500fcc0bae91f1d76 (patch) | |
tree | 7afbf1128133b4d3425640c9b6db3062e9df374d /m4/multiarch.m4 | |
parent | e6c7f8be2fe11e72c3fff2503be9ab3f798b787a (diff) | |
download | gnulib-6f8fd6411e022200c743d8e500fcc0bae91f1d76.tar.gz |
Small autoconf macro improvements.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Make it possible for the user to
override the value of gl_cv_func_working_mktime.
* m4/multiarch.m4 (gl_MULTIARCH): Show a line "checking whether the
compiler produces multi-arch binaries..." in the configure output.
* m4/size_max.m4 (gl_SIZE_MAX): When not found, say "no".
* m4/parse-datetime.m4 (gl_C_COMPOUND_LITERALS): Improve indentation.
Diffstat (limited to 'm4/multiarch.m4')
-rw-r--r-- | m4/multiarch.m4 | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4 index 3c2034c5e0..69b43df3aa 100644 --- a/m4/multiarch.m4 +++ b/m4/multiarch.m4 @@ -1,4 +1,4 @@ -# multiarch.m4 serial 7 +# multiarch.m4 serial 8 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,37 +21,40 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. - gl_cv_c_multiarch=no - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - ]])], - [ - dnl Check for potential -arch flags. It is not universal unless - dnl there are at least two -arch flags with different values. - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done + AC_CACHE_CHECK([whether the compiler produces multi-arch binaries], + [gl_cv_c_multiarch], + [gl_cv_c_multiarch=no + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + ]])], + [ + dnl Check for potential -arch flags. It is not universal unless + dnl there are at least two -arch flags with different values. + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + ]) ]) if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 |