aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-29 19:12:35 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-11-29 19:12:35 +0000
commit68325e63c51e3d5e569b2a14c90582f7b075dc23 (patch)
tree9e7775d775bae3072c0e7bbc707ee7d5cf4846cb /configure
parent5844981147a4af48fc3ffb8d2794487f0236b335 (diff)
Optional rpath link option, CMake search path set, static WCSLIB
Thanks to a test build on Raul Infante Sainz's Mac OS computer, we were able to address some issues and will be trying them after this commit: a) The LLVM linker on that computer didn't recognize `-rpath-link'! So at configure time we now check for it and only include it when the linker recognizes it. b) CMake corrections: 1) `CMAKE_LIBRARY_PATH' is now defined so CMake can look in our custom directory to find the necessary libraries. 2) To build and install the CMake built programs, we now simply use `make' and `make install'. c) To avoid particular linking problems with WCSLIB (which has special problems compared to other libraries), we are now deleting the shared library version (both on GNU and Mac systems).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 25 insertions, 1 deletions
diff --git a/configure b/configure
index f1e820a..b10f536 100755
--- a/configure
+++ b/configure
@@ -535,6 +535,28 @@ fi
+# See if the linker accepts -Wl,-rpath-link
+# -----------------------------------------
+#
+# `-rpath-link' is used to write the information of the linked shared
+# library into the shared object (library or program). But some versions of
+# LLVM's linker don't accept it an can cause problems.
+oprog=$depdir/rpath-test
+cprog=$depdir/rpath-test.c
+echo "#include <stdio.h>" > $cprog
+echo "int main(void) {return 0;}" >> $cprog
+if [ x$CC = x ]; then CC=gcc; fi;
+if $CC $cprog -o$oprog -Wl,-rpath-link &> /dev/null; then
+ export rpath_command="-Wl,-rpath-link=$instdir/lib"
+else
+ export rpath_command=""
+fi
+rm -f $oprog $cprog
+
+
+
+
+
# Inform the user that the build process is starting
# -------------------------------------------------
if [ $printnotice = yes ]; then
@@ -588,7 +610,9 @@ make -f reproduce/src/make/dependencies-basic.mk \
# to build them in this script. But after this, we can rely on Makefiles.
numthreads=$($instdir/bin/nproc)
./.local/bin/make -f reproduce/src/make/dependencies.mk \
- static_build=$static_build -j$numthreads
+ static_build=$static_build \
+ rpath_command=$rpath_command \
+ -j$numthreads