summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-06-05 03:24:34 +0200
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-06-05 03:39:49 +0200
commitd7fa589d54a8eaa91d4fb1bd62d725130a83c70a (patch)
tree8dea14346cc3c259fc94f59d99ea48aff22241e3
parentb1b2b1e490248baca8172d787c78687c08360814 (diff)
downloadgnuastro-d7fa589d54a8.tar.gz
GSL's Steffen interpolation checked at configure time
After the 0.6 release, Alan Lefor and Takashi Ichikawa informed us that Gnuastro's build would fail on systems with an older GSL, because the compiler couldn't find `gsl_interp_steffen'. Therefore with this commit, a check has been added to the configure script. If this variable isn't present in GSL's `gsl/gsl_interp.h' header, then that type of interpolation will not be available and the program trying to use it will crash with a notice. Also, at the end of the `./configure' script, a warning will be printed, informing the user of this limited capability of Gnuastro due to the old GSL version. This fixes bug #54057.
-rw-r--r--NEWS17
-rw-r--r--configure.ac14
-rw-r--r--doc/announce-acknowledge.txt5
-rw-r--r--lib/interpolate.c7
4 files changed, 41 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index a1260a0..9905592 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,23 @@
GNU Astronomy Utilities NEWS -*- outline -*-
+* Noteworthy changes in release X.X (library 5.0.0) (YYYY-MM-DD) [alpha]
+
+** New features
+
+** Removed features
+
+** Changed features
+
+** Bug fixes
+
+ bug #54057: Building failure due to not finding gsl_interp_steffen.
+
+
+
+
+
+
* Noteworthy changes in release 0.6 (library 4.0.0) (2018-06-04) [stable]
** New features
diff --git a/configure.ac b/configure.ac
index f5949b1..dcb470f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,7 +192,7 @@ PATH=$(AS_ECHO([$PATH]) | $SED -e 's|'"$currpwd"'||g' \
-e 's|^:||' \
-e 's|:$||' )
AS_IF([test $oldPATH = $PATH],
- [ path_warning=no ],
+ [ path_warning=no ],
[ path_warning=yes; anywarnings=yes ])
AC_MSG_RESULT( $path_warning )
@@ -213,6 +213,10 @@ AC_SEARCH_LIBS([cblas_sdsdot], [gslcblas], [],
[AC_MSG_ERROR([GSL CBLAS not present, cannot continue.])])
AC_SEARCH_LIBS([gsl_integration_qng], [gsl], [],
[AC_MSG_ERROR([GSL not found, cannot continue.])])
+AC_CHECK_DECLS(gsl_interp_steffen,
+ [ gsl_version_old=no ],
+ [ gsl_version_old=yes; anywarnings=yes ],
+ [[#include <gsl/gsl_interp.h>]])
# Since version 0.42, if `libcurl' is installed, CFITSIO will link with it
# and thus it will be necessary to explicitly link with libcurl also. If it
@@ -657,6 +661,14 @@ AS_IF([test x$enable_guide_message = xyes],
AS_ECHO(["Configuration warning(s):"])
AS_ECHO([])
+ AS_IF([test "x$gsl_version_old" = "xyes"],
+ [AS_ECHO([" - The version of GNU Scientific Library (GSL) on this system doesn't"])
+ AS_ECHO([" have some features that can be useful in Gnuastro. This build"])
+ AS_ECHO([" won't crash, but Gnuastro will have less functionality afterwards."])
+ AS_ECHO([" We thus recommend building and installing a more recent version"])
+ AS_ECHO([" of GSL (version >= 2.0, released in October 2015)."])
+ AS_ECHO([]) ])
+
AS_IF([test "x$has_libjpeg" = "xno"],
[AS_ECHO([" - libjpeg, could not be linked with in your library search path."])
AS_ECHO([" If JPEG inputs/outputs are requested, the respective tool will"])
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 4aaeec8..2382d74 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -1 +1,4 @@
-People who's help must be acknowledged in the next release.
+Alphabetically ordered list to acknowledge in the next release.
+
+Takashi Ichikawa
+Alan Lefor
diff --git a/lib/interpolate.c b/lib/interpolate.c
index 51631e8..319fde9 100644
--- a/lib/interpolate.c
+++ b/lib/interpolate.c
@@ -512,7 +512,14 @@ gal_interpolate_1d_make_gsl_spline(gal_data_t *X, gal_data_t *Y, int type_1d)
case GAL_INTERPOLATE_1D_AKIMA_PERIODIC:
itype=gsl_interp_akima_periodic; break;
case GAL_INTERPOLATE_1D_STEFFEN:
+#if HAVE_DECL_GSL_INTERP_STEFFEN
itype=gsl_interp_steffen; break;
+#else
+ error(EXIT_FAILURE, 0, "%s: Steffen interpolation isn't available "
+ "in the system's GNU Scientific Library (GSL). Please install "
+ "a more recent GSL (version >= 2.0, released in October 2015) "
+ "and rebuild Gnuastro", __func__);
+#endif
default:
error(EXIT_FAILURE, 0, "%s: code %d not recognizable for the GSL "
"interpolation type", __func__, type_1d);