]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also encode the library path through -rpath when linking with static libs, since...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 19 Jan 2010 16:53:12 +0000 (16:53 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 19 Jan 2010 16:53:12 +0000 (16:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@20388 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/configure
deal.II/configure.in

index a8570ce13aac630ff8cff179036ff65fc5f384bd..a491665ea9963168a5afd7fe36e1c3fee069eed8 100755 (executable)
@@ -12785,10 +12785,11 @@ _ACEOF
           ;;
   esac
 
-     OLD_LDFLAGS="$LDFLAGS"
-  LDFLAGS="-Wl,-rpath,$DEAL_II_PATH/lib $LDFLAGS"
-  { $as_echo "$as_me:$LINENO: checking whether compiler understands option -Wl,-rpath" >&5
-$as_echo_n "checking whether compiler understands option -Wl,-rpath... " >&6; }
+
+    OLD_LDFLAGS="$LDFLAGS"
+  LDFLAGS="-Wl,-soname,libbase.so.6.2.1 $LDFLAGS $LDFLAGSPIC $SHLIBFLAGS"
+  { $as_echo "$as_me:$LINENO: checking whether compiler understands option -Wl,-soname" >&5
+$as_echo_n "checking whether compiler understands option -Wl,-soname... " >&6; }
   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
 _ACEOF
@@ -12825,29 +12826,33 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-      { $as_echo "$as_me:$LINENO: result: yes" >&5
+
+     { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-     LD_PATH_OPTION="-Wl,-rpath "
+     DEAL_II_LD_UNDERSTANDS_SONAME="yes"
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-        { $as_echo "$as_me:$LINENO: result: no" >&5
+
+     { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-     LDFLAGS="$OLD_LDFLAGS"
-     LD_PATH_OPTION="no"
+     DEAL_II_LD_UNDERSTANDS_SONAME="no"
+
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-
+  LDFLAGS="$OLD_LDFLAGS"
 
 
     OLD_LDFLAGS="$LDFLAGS"
-  LDFLAGS="-Wl,-soname,libbase.so.6.2.1 $LDFLAGS $LDFLAGSPIC $SHLIBFLAGS"
-  { $as_echo "$as_me:$LINENO: checking whether compiler understands option -Wl,-soname" >&5
-$as_echo_n "checking whether compiler understands option -Wl,-soname... " >&6; }
+  LDFLAGS="-Wl,-dynamic,-install_name -Wl,libbase.so.6.2.1 $LDFLAGS -shared"
+  { $as_echo "$as_me:$LINENO: checking whether compiler understands option -Wl,-dynamic,-install_name" >&5
+$as_echo_n "checking whether compiler understands option -Wl,-dynamic,-install_name... " >&6; }
   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
 _ACEOF
@@ -12887,7 +12892,7 @@ $as_echo "$ac_try_echo") >&5
 
      { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-     DEAL_II_LD_UNDERSTANDS_SONAME="yes"
+     DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME="yes"
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -12896,7 +12901,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
      { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-     DEAL_II_LD_UNDERSTANDS_SONAME="no"
+     DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME="no"
 
 
 fi
@@ -12907,10 +12912,12 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   LDFLAGS="$OLD_LDFLAGS"
 
 
-    OLD_LDFLAGS="$LDFLAGS"
-  LDFLAGS="-Wl,-dynamic,-install_name -Wl,libbase.so.6.2.1 $LDFLAGS -shared"
-  { $as_echo "$as_me:$LINENO: checking whether compiler understands option -Wl,-dynamic,-install_name" >&5
-$as_echo_n "checking whether compiler understands option -Wl,-dynamic,-install_name... " >&6; }
+fi
+
+ OLD_LDFLAGS="$LDFLAGS"
+  LDFLAGS="-Wl,-rpath,$DEAL_II_PATH/lib $LDFLAGS"
+  { $as_echo "$as_me:$LINENO: checking whether compiler understands option -Wl,-rpath" >&5
+$as_echo_n "checking whether compiler understands option -Wl,-rpath... " >&6; }
   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
 _ACEOF
@@ -12947,30 +12954,24 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-
-     { $as_echo "$as_me:$LINENO: result: yes" >&5
+      { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-     DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME="yes"
-
+     LD_PATH_OPTION="-Wl,-rpath "
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-     { $as_echo "$as_me:$LINENO: result: no" >&5
+        { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-     DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME="no"
-
-
+     LDFLAGS="$OLD_LDFLAGS"
+     LD_PATH_OPTION="no"
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS="$OLD_LDFLAGS"
 
 
-fi
 
 
 
index 909d12222ee6a3355c272c7eee9f61d0d353d946..1f1dece019703534075aca6f6449446f9026d26c 100644 (file)
@@ -317,13 +317,16 @@ if test "x$enableshared" = "xyes" ; then
           ;;
   esac
 
-  dnl Check if the linker supports -rpath
-  DEAL_II_CHECK_RPATH
-
   dnl See if we can use -Wl,-soname,... for linking
   DEAL_II_CHECK_LINK_SONAME
 fi
 
+dnl Check if the linker supports -rpath. Do so independently whether we
+dnl actually build deal.II as shared libs since, for example, the TBB
+dnl library is always shared
+DEAL_II_CHECK_RPATH
+
+
 AC_SUBST(enableshared)
 AC_SUBST(static_lib_suffix)
 AC_SUBST(shared_lib_suffix)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.