diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-05-21 17:03:34 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-05-21 17:03:34 +0900 |
commit | 8277cf0799145bed0c813bfcc187739f77b3102d (patch) | |
tree | 80d3f625badf4cae75834c90ef6872351b6a88e2 | |
parent | c773453c77c44f79d49d0ba48557a26950b3a4b9 (diff) |
[Bug #20499] Use consistent version tools with CC
As Apple Xcode is relocatable and selectable with `xcode-select`, use
consistent versions of commands in the same location.
-rw-r--r-- | configure.ac | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index d787bc3502..169662ca93 100644 --- a/configure.ac +++ b/configure.ac @@ -248,10 +248,16 @@ AS_CASE(["${build_os}"], AC_PATH_TOOL([NM], [nm], [/usr/ccs/bin/nm], [/usr/ccs/bin:$PATH]) ], [darwin*], [ - # For Apple clang version 14.0.3 (clang-1403.0.22.14.1) - ac_cv_prog_ac_ct_AR=`$CC -print-prog-name=ar` - ac_cv_prog_ac_ct_LD=`$CC -print-prog-name=ld` - ac_cv_prog_ac_ct_NM=`$CC -print-prog-name=nm` + # As Apple Xcode is relocatable and selectable with `xcode-select`, + # use consistent versions of commands in the same location. + AC_MSG_CHECKING([Xcode tools]) + AS_CASE([$ac_cv_prog_ac_ct_CC], + [/*], [], + [ac_cv_prog_ac_ct_CC=`command -v $ac_cv_prog_ac_ct_CC`]) + AC_MSG_RESULT(CC=$ac_cv_prog_ac_ct_CC) + ac_cv_prog_ac_ct_AR=${ac_cv_prog_ac_ct_CC%/*}/ar + ac_cv_prog_ac_ct_LD=${ac_cv_prog_ac_ct_CC%/*}/ld + ac_cv_prog_ac_ct_NM=${ac_cv_prog_ac_ct_CC%/*}/nm ]) AS_CASE(["${target_os}"], [cygwin*|msys*|mingw*|darwin*], [ |