[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master b54d9711 4/6: Configuration: checking if stati

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master b54d9711 4/6: Configuration: checking if static libraries can be built
Date: Mon, 13 Jun 2022 11:18:56 -0400 (EDT)

branch: master
commit b54d9711f53daf5fd80d42ec9d2802dac0856c3e
Author: Raul Infante-Sainz <>
Commit: Mohammad Akhlaghi <>

    Configuration: checking if static libraries can be built
    Until this commit, Gnuastro didn't check if the static libraries could be
    built. However, it may happen that in some systems it is not possible and
    then a crash occurs. This is actually what happens in macOS.
    With this commit, this problem has been fixed by checking if the compiler
    is able to build the static libraries. Now it checks if static libraries
    can be built. If it is possible, then it will do it. If it is not possible,
    then no static libraries will be created and a warning is printed as an
    This fix has been done with the help of Mohammad Akhlaghi, and it fixes the
    bug #62590 (
--- | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/ b/
index a4740213..d944ded4 100644
--- a/
+++ b/
 AS_IF([test "x$has_libgit2" = "x1"], [], [anywarnings=yes])
+# Check if the compiler works with static linking
+AS_IF([test "$lt_cv_prog_compiler_static_works" = no ],
+      [ AS_IF([test "$enable_shared" = no ],
+              [ anywarnings=yes;
+                enable_shared_disabled=yes ])
+        enable_shared=yes ])
 # End of library linking list
 # ---------------------------
@@ -1289,6 +1303,13 @@ AS_IF([test x$enable_guide_message = xyes],
                AS_ECHO(["    you can safely install it later (after building 
and installing Gnuasro)."])
                AS_ECHO([]) ])
+        AS_IF([test "x$enable_shared_disabled" = "xyes"],
+              [dependency_notice=yes
+               AS_ECHO(["  - Eventhough you have asked to enable the shared 
libraries, maybe using"])
+               AS_ECHO(["    the '--enable-debug' option, the compiler does 
not support it. So, we"])
+               AS_ECHO(["    are intentionally disabling this option."])
+               AS_ECHO([]) ])
         # Notice for obtaining the optional dependencies using a package
         # manager.
         AS_IF([test "x$dependency_notice" = "xyes"],

reply via email to

[Prev in Thread] Current Thread [Next in Thread]