diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 61 |
1 files changed, 57 insertions, 4 deletions
@@ -406,8 +406,52 @@ ln -s $(pwd)/reproduce/config/gnuastro .gnuastro -# Build basic dependencies -# ------------------------ +# See if the C compiler can build static libraries +# ------------------------------------------------ +oprog=$ddir/static-test +cprog=$ddir/static-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 -static -ljunk &> /dev/null; then + export static_build="yes" +else + export static_build="no" +fi +rm -f $oprog $cprog +if [ $static_build = "no" ]; then + cat <<EOF +_________________________________________________________________________ +!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!! + +Your system's C compiler ('$CC') doesn't support building static +libraries. Therefore the dependencies will be built dynamically. This means +that they will depend more strongly on changes/updates in the host +system. For high-level applications (like most research projects in natural +sciences), this shouldn't be a significant problem. + +But generally, for reproducibility, its better to build static libraries +and programs. For more on their difference (and generally an introduction +on linking), please see the link below: + +https://www.gnu.org/software/gnuastro/manual/html_node/Linking.html + +If you have other compilers on your system, you can select a different +compiler by setting the 'CC' environment variable before running +'./configure'. + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +EOF + sleep 5 +fi + + + + + +# Inform the user that the build process is starting +# ------------------------------------------------- tsec=10 cat <<EOF @@ -425,7 +469,15 @@ pipeline. They will be installed in: EOF sleep $tsec -make -f reproduce/src/make/dependencies-basic.mk #-j2 + + + + + +# Build Basic dependencies +# ------------------------ +make -f reproduce/src/make/dependencies-basic.mk \ + static_build=$static_build #-j2 @@ -438,7 +490,8 @@ make -f reproduce/src/make/dependencies-basic.mk #-j2 # Makefile. To make the job easier, we'll do it in a Makefile, not a # script. Bash and Make were the tools we need to run Makefiles, so we had # to build them in this script. But after this, we can rely on Makefiles. -.local/bin/make -f reproduce/src/make/dependencies.mk #-j8 +./.local/bin/make -f reproduce/src/make/dependencies.mk \ + static_build=$static_build #-j8 |