gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master bf34705: Configuration: math library now a dep


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master bf34705: Configuration: math library now a dependency of CFITSIO
Date: Sun, 14 Jul 2019 14:51:53 -0400 (EDT)

branch: master
commit bf34705e38e1d76e7189caf99998a990e20095e3
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Configuration: math library now a dependency of CFITSIO
    
    On a Fedora 28, we noticed that CFITSIO fails because of not finding basic
    math functions (even though `-lm' is in LDADD before CFITSIO). The solution
    was to manually add `m' as a dependency during configuration.
    
    Also, the most recent version of CFITSIO installs shared libraries by
    default, so there is no need for the `make shared' rule.
    
    The CFITSIO linking problem was found thanks to Hamed Altafi.
---
 configure.ac      | 7 ++++++-
 doc/gnuastro.texi | 1 -
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 65dff8f..27c4447 100644
--- a/configure.ac
+++ b/configure.ac
@@ -384,7 +384,12 @@ AS_IF([test "x$LIBCURL" = x], [],
       [LDADD="$LTLIBCURL $LDADD"])
 
 
-AC_LIB_HAVE_LINKFLAGS([cfitsio], [], [
+# Older versions of CFITSIO don't install a shared library, only a static
+# one. Eventhough we add `-lm' to LDADD, on some systems, it complains
+# about not finding basic math libraries. Therefore the configure script
+# can't find CFITSIO, eventhough it exists. The solution is to manually add
+# the math-library as a dependency of CFITSIO.
+AC_LIB_HAVE_LINKFLAGS([cfitsio], [m], [
 #include <fitsio.h>
 void junk(void) {
 int status;
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 2f3989f..8c9a414 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -5139,7 +5139,6 @@ $ ./testprog > testprog.lis
 $ diff testprog.lis testprog.out    # Should have no output
 $ cmp testprog.fit testprog.std     # Should have no output
 $ rm cookbook fitscopy imcopy smem speed testprog
-$ make shared
 $ sudo make install
 @end example
 



reply via email to

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