[Git][ghc/ghc][wip/T23674] configure: Ensure that otool and install-name-tool exist

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Nov 21 21:58:21 UTC 2023



Ben Gamari pushed to branch wip/T23674 at Glasgow Haskell Compiler / GHC


Commits:
816c2860 by Ben Gamari at 2023-11-21T16:58:11-05:00
configure: Ensure that otool and install-name-tool exist

Otherwise set them to "false" to unambiguously indicate that
they are unavailable.

- - - - -


3 changed files:

- configure.ac
- distrib/configure.ac.in
- m4/prep_target_file.m4


Changes:

=====================================
configure.ac
=====================================
@@ -489,13 +489,13 @@ AC_SUBST([StripCmd])
 
 dnl ** Which otool to use on macOS
 dnl --------------------------------------------------------------
-AC_CHECK_TARGET_TOOL([OTOOL], [otool])
+AC_CHECK_TARGET_TOOL([OTOOL], [otool], [false])
 OtoolCmd="$OTOOL"
 AC_SUBST(OtoolCmd)
 
 dnl ** Which install_name_tool to use on macOS
 dnl --------------------------------------------------------------
-AC_CHECK_TARGET_TOOL([INSTALL_NAME_TOOL], [install_name_tool])
+AC_CHECK_TARGET_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [false])
 InstallNameToolCmd="$INSTALL_NAME_TOOL"
 AC_SUBST(InstallNameToolCmd)
 


=====================================
distrib/configure.ac.in
=====================================
@@ -208,13 +208,13 @@ AC_CONFIG_FILES([mk/system-cxx-std-lib-1.0.conf])
 
 dnl ** Which otool to use on macOS
 dnl --------------------------------------------------------------
-AC_CHECK_TARGET_TOOL([OTOOL], [otool])
+AC_CHECK_TARGET_TOOL([OTOOL], [otool], [false])
 OtoolCmd="$OTOOL"
 AC_SUBST(OtoolCmd)
 
 dnl ** Which install_name_tool to use on macOS
 dnl --------------------------------------------------------------
-AC_CHECK_TARGET_TOOL([INSTALL_NAME_TOOL], [install_name_tool])
+AC_CHECK_TARGET_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [false])
 InstallNameToolCmd="$INSTALL_NAME_TOOL"
 AC_SUBST(InstallNameToolCmd)
 


=====================================
m4/prep_target_file.m4
=====================================
@@ -161,14 +161,14 @@ AC_DEFUN([PREP_TARGET_FILE],[
     PREP_LIST([CONF_CXX_OPTS_STAGE0])
     PREP_LIST([CONF_GCC_LINKER_OPTS_STAGE0])
 
-    if test -z "$OtoolCmd"; then
+    if test "$OtoolCmd" = "false"; then
       OtoolCmdMaybe=Nothing
     else
       OtoolCmdMaybe="Just (Otool {otoolProgram = Program{prgPath = \"$OtoolCmd\", prgFlags = @<:@@:>@)"
     fi
     AC_SUBST([OtoolCmdMaybe])
 
-    if test -z "$InstallNameToolCmd"; then
+    if test "$InstallNameToolCmd" = "false"; then
       InstallNameToolCmdMaybe=Nothing
     else
       InstallNameToolCmdMaybe="Just (InstallNameTool {installNameToolProgram = Program{prgPath = \"$InstallNameToolCmd\", prgFlags = @<:@@:>@)"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/816c28605e3690681e952b3e7505659f9faa20ff

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/816c28605e3690681e952b3e7505659f9faa20ff
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231121/0b9d1069/attachment-0001.html>


More information about the ghc-commits mailing list