diff options
author | Kristian Schuster <116557017+KriSchu@users.noreply.github.com> | 2023-02-19 23:49:18 +0100 |
---|---|---|
committer | Kristian Schuster <116557017+KriSchu@users.noreply.github.com> | 2023-02-19 23:49:18 +0100 |
commit | a0d42777217296c0a7bdb1e1be8d8f6de1b24dd7 (patch) | |
tree | 8effe94c57b2f9796ba36090b07551baa8f1e1cb /gl/m4/multiarch.m4 | |
parent | ca3d59cd6918c9e2739e783b721d4c1122640fd3 (diff) | |
parent | c07206f2ccc2356aa74bc6813a94c2190017d44e (diff) | |
download | monitoring-plugins-a0d4277.tar.gz |
Merge remote-tracking branch 'origin/master' into feature_check_disk_add_ignore_missing_option
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..3ba5b0f7 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-2023 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 |