summaryrefslogtreecommitdiffstats
path: root/gl/m4/multiarch.m4
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-02-19 13:39:08 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-02-19 13:39:08 (GMT)
commit74b6984047d330a3cc7cb7f63645849fe7676c63 (patch)
tree65a26800103d8d66f7e6cb4acfbfc9f315ec750b /gl/m4/multiarch.m4
parent423284edfa980fc3fdb51ab20af96685a988ba97 (diff)
parentc07206f2ccc2356aa74bc6813a94c2190017d44e (diff)
downloadmonitoring-plugins-74b6984047d330a3cc7cb7f63645849fe7676c63.tar.gz
Merge branch 'master' into check_icmp_cleanuprefs/pull/1807/head
Diffstat (limited to 'gl/m4/multiarch.m4')
-rw-r--r--gl/m4/multiarch.m469
1 files changed, 36 insertions, 33 deletions
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 552ec7e..3ba5b0f 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
2dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl 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.
21AC_DEFUN_ONCE([gl_MULTIARCH], 21AC_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