diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-11-17 01:05:54 +0100 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2022-07-24 19:35:11 +0200 |
commit | a405fc138596f552581d2011fd6de02d5c8186c4 (patch) | |
tree | 4c084700b5cb5e9fcedf982a2d921bbc41d9935a /gl/m4/multiarch.m4 | |
parent | 9f2a9ca3d72023ff9b5707d1872c54d65edc9017 (diff) | |
download | monitoring-plugins-a405fc1.tar.gz |
Sync with the latest Gnulib code (1a268176f)
Diffstat (limited to 'gl/m4/multiarch.m4')
-rw-r--r-- | gl/m4/multiarch.m4 | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 index 552ec7e7..f1678d9f 100644 --- a/gl/m4/multiarch.m4 +++ b/gl/m4/multiarch.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # multiarch.m4 serial 7 | 1 | # multiarch.m4 serial 9 |
2 | dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -21,37 +21,40 @@ dnl with or without modifications, as long as this notice is preserved. | |||
21 | AC_DEFUN_ONCE([gl_MULTIARCH], | 21 | AC_DEFUN_ONCE([gl_MULTIARCH], |
22 | [ | 22 | [ |
23 | dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. | 23 | dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. |
24 | gl_cv_c_multiarch=no | 24 | AC_CACHE_CHECK([whether the compiler produces multi-arch binaries], |
25 | AC_COMPILE_IFELSE( | 25 | [gl_cv_c_multiarch], |
26 | [AC_LANG_SOURCE( | 26 | [gl_cv_c_multiarch=no |
27 | [[#ifndef __APPLE_CC__ | 27 | AC_COMPILE_IFELSE( |
28 | not a universal capable compiler | 28 | [AC_LANG_SOURCE( |
29 | #endif | 29 | [[#ifndef __APPLE_CC__ |
30 | typedef int dummy; | 30 | not a universal capable compiler |
31 | ]])], | 31 | #endif |
32 | [ | 32 | typedef int dummy; |
33 | dnl Check for potential -arch flags. It is not universal unless | 33 | ]])], |
34 | dnl there are at least two -arch flags with different values. | 34 | [ |
35 | arch= | 35 | dnl Check for potential -arch flags. It is not universal unless |
36 | prev= | 36 | dnl there are at least two -arch flags with different values. |
37 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | 37 | arch= |
38 | if test -n "$prev"; then | 38 | prev= |
39 | case $word in | 39 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do |
40 | i?86 | x86_64 | ppc | ppc64) | 40 | if test -n "$prev"; then |
41 | if test -z "$arch" || test "$arch" = "$word"; then | 41 | case $word in |
42 | arch="$word" | 42 | i?86 | x86_64 | ppc | ppc64 | arm | arm64) |
43 | else | 43 | if test -z "$arch" || test "$arch" = "$word"; then |
44 | gl_cv_c_multiarch=yes | 44 | arch="$word" |
45 | fi | 45 | else |
46 | ;; | 46 | gl_cv_c_multiarch=yes |
47 | esac | 47 | fi |
48 | prev= | 48 | ;; |
49 | else | 49 | esac |
50 | if test "x$word" = "x-arch"; then | 50 | prev= |
51 | prev=arch | 51 | else |
52 | fi | 52 | if test "x$word" = "x-arch"; then |
53 | fi | 53 | prev=arch |
54 | done | 54 | fi |
55 | fi | ||
56 | done | ||
57 | ]) | ||
55 | ]) | 58 | ]) |
56 | if test $gl_cv_c_multiarch = yes; then | 59 | if test $gl_cv_c_multiarch = yes; then |
57 | APPLE_UNIVERSAL_BUILD=1 | 60 | APPLE_UNIVERSAL_BUILD=1 |