summaryrefslogtreecommitdiff
path: root/lib/make/configure
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2008-02-13 06:55:20 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2008-02-13 06:55:20 +0000
commit34f6de8501982350718b97475f0b55bf4d9742c7 (patch)
treeb3a707e23dd6b8d234b8db16eb48946b1f9ce0f9 /lib/make/configure
parentcd1920beb16a036ba4fc689b7aa8d6b516d3aa00 (diff)
Extended behaviour of LIBS and LIBDIRS: add -l and -L prefix only to
library and directory names, respectively, but leave options alone. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4461 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/configure')
-rwxr-xr-xlib/make/configure20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/make/configure b/lib/make/configure
index 6abdd25c..3a82ca74 100755
--- a/lib/make/configure
+++ b/lib/make/configure
@@ -5230,10 +5230,10 @@ cat > conftest.$ac_ext <<EOF
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char 22PTfC;
+char fCPk6D;
int main() {
-BMrowz
+ckuAT3
; return 0; }
EOF
if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
@@ -5810,9 +5810,11 @@ LDFLAGS="$LDFLAGS $KNOWN_LDFLAGS"
: ${SYS_INC_DIRS=' '}
-# How to link in the non-Cactus libraries
+# How to link in the non-Cactus libraries:
+# Add -L and -l prefixes, but only for file names;
+# allow arbitrary options in between
-: ${GENERAL_LIBRARIES='$(LIBDIRS:%=-L%) $(LIBS:%=-l%)'}
+: ${GENERAL_LIBRARIES='$(patsubst -L-%,-%,$(LIBDIRS:%=-L%)) $(patsubst -l-%,-%,$(LIBS:%=-l%))'}
# Do we need to make sure Perl makes a backup when editting in place ?
@@ -5866,7 +5868,7 @@ if test "x$CCTK_NEED_X" = 'xyes' ; then
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5870: checking for X" >&5
+echo "configure:5872: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -5928,12 +5930,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 5932 "configure"
+#line 5934 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6002,14 +6004,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6006 "configure"
+#line 6008 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.