changeset 2515:7bf8a0179e32

Ensure we use the user's LDFLAGS if specified
author Chris Cannam
date Fri, 24 Apr 2020 10:53:04 +0100 (2020-04-24)
parents 7bd874f87f0e
children 7ed859eb8a7e
files configure configure.ac
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Apr 22 17:18:49 2020 +0100
+++ b/configure	Fri Apr 24 10:53:04 2020 +0100
@@ -4508,7 +4508,10 @@
 fi
 
 CXXFLAGS="$CXXFLAGS_BUILD $SV_DEFINES_BUILD"
-LDFLAGS="$LDFLAGS_BUILD"
+
+if test x"LDFLAGS" = x; then
+   LDFLAGS="$LDFLAGS_BUILD"
+fi
 
 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
--- a/configure.ac	Wed Apr 22 17:18:49 2020 +0100
+++ b/configure.ac	Fri Apr 24 10:53:04 2020 +0100
@@ -87,7 +87,11 @@
 fi
 
 CXXFLAGS="$CXXFLAGS_BUILD $SV_DEFINES_BUILD"
-LDFLAGS="$LDFLAGS_BUILD"
+
+# Set our own LDFLAGS only if the user didn't request any
+if test x"LDFLAGS" = x; then
+   LDFLAGS="$LDFLAGS_BUILD"
+fi
 
 SV_MODULE_REQUIRED([bz2],[],[bzlib.h],[bz2],[BZ2_bzReadOpen])
 SV_MODULE_REQUIRED([fftw3],[fftw3 >= 3.0.0],[fftw3.h],[fftw3],[fftw_execute])