[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master eaf24d3: Absolute build and source directories
[gnuastro-commits] master eaf24d3: Absolute build and source directories for LDFLAGS and CPPFLAGS
Sun, 13 May 2018 22:21:16 -0400 (EDT)
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Absolute build and source directories for LDFLAGS and CPPFLAGS
It was a long time I hadn't ran `make distcheck'. But after doing so, I
noticed a libtool error, complaining about not finding the `./lib'
directory while it was building Gnulib (in `bootstrapped/lib'). After some
digging up in the code, I found the cause of the problem: at the start of
`configure.ac', we were adding `top_srcdir' and `top_builddir' (which are
relative paths) to `CPPFLAGS' and `LDFLAGS'. To fix the problem, we are now
using the absolute Autoconf paths: `abs_top_srcdir' and `abs_top_builddir'.
configure.ac | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7b589c2..b9045e7 100644
@@ -98,10 +98,17 @@ AC_SUBST(IN_CPPFLAGS, "$CPPFLAGS")
# Generic compiler flags for all sub-directories.
+# IMPORTANT note: we need to add the `./lib/' directory to `LDFLAGS' and
+# `CPPFLAGS', since all Gnuastro needs to use the library headers and link
+# with them. But we need to use the absolute address of `./lib/'. So we
+# need to use the Autoconf variables with an `abs_' prefix. Otherwise (if
+# we use `top_builddir' istead of `abs_top_builddir'), we are going to have
+# problems in special conditions (most specifically: in `make distcheck').
CFLAGS="-Wall -O3 $CFLAGS"
CXXFLAGS="-Wall -O3 $CXXFLAGS"
|[Prev in Thread]
||[Next in Thread]|
- [gnuastro-commits] master eaf24d3: Absolute build and source directories for LDFLAGS and CPPFLAGS,
Mohammad Akhlaghi <=