[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 <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
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
output.
This fix has been done with the help of Mohammad Akhlaghi, and it fixes the
bug #62590 (https://savannah.gnu.org/bugs/index.php?62590).
---
configure.ac | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/configure.ac b/configure.ac
index a4740213..d944ded4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -491,6 +491,20 @@ AC_DEFINE_UNQUOTED([GAL_CONFIG_HAVE_LIBGIT2],
[$has_libgit2],
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"],
- [gnuastro-commits] master updated (3edaaeec -> 220386cf), Mohammad Akhlaghi, 2022/06/13
- [gnuastro-commits] master 19a69ef4 1/6: psf-stamp: assuming a centered position by default, Mohammad Akhlaghi, 2022/06/13
- [gnuastro-commits] master d69373b9 2/6: psf-stamp: keeping meta-data into the output image header, Mohammad Akhlaghi, 2022/06/13
- [gnuastro-commits] master 220386cf 6/6: PSF scripts: homogenizing the way errors and warnings are printed, Mohammad Akhlaghi, 2022/06/13
- [gnuastro-commits] master cac338b0 3/6: psf-stamp: same output stamp size than the input image by default, Mohammad Akhlaghi, 2022/06/13
- [gnuastro-commits] master 7279c9c0 5/6: PSF scripts: removing the --corewidth option to simplify the scripts, Mohammad Akhlaghi, 2022/06/13
- [gnuastro-commits] master b54d9711 4/6: Configuration: checking if static libraries can be built,
Mohammad Akhlaghi <=