]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move RPATH check into the section for shared libs. Use -mmacos-version-min if necessary.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Dec 2009 15:19:37 +0000 (15:19 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Dec 2009 15:19:37 +0000 (15:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@20252 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure
deal.II/configure.in

index afa4c41c2d485f64f1d1f32f614def57b05051d5..ae1c1ef94000f0524cd4dde45435e4765ae05778 100644 (file)
@@ -2000,6 +2000,8 @@ AC_DEFUN(DEAL_II_CHECK_DYNAMIC_CAST_BUG,
     AC_DEFINE(DEAL_II_HAVE_DARWIN_DYNACAST_BUG, 1,
               [Defined if the compiler has a bug with dynamic casting
                and dynamic libraries])
+    CXXFLAGSG="$CXXFLAGSG -mmacosx-version-min=10.4"
+    CXXFLAGSO="$CXXFLAGSO -mmacosx-version-min=10.4"
   fi
   rm -f contrib/config/tests/darwin-dynamic-cast/libDynamicCastTestLib.dylib
   rm -f contrib/config/tests/darwin-dynamic-cast/main.o
index 17c947ea4d2cd460bf8b14b10f126d2d8721a6fe..da4db54789bfd98728b103eadf06058c29c5fb04 100755 (executable)
@@ -5747,64 +5747,6 @@ $as_echo "Unknown C compiler - using generic options" >&6; }
 
 
 
- 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
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-      { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-     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 "no" >&6; }
-     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
-
-
 
 
   # Check whether --enable-threads was given.
@@ -12826,6 +12768,8 @@ cat >>confdefs.h <<\_ACEOF
 #define DEAL_II_HAVE_DARWIN_DYNACAST_BUG 1
 _ACEOF
 
+    CXXFLAGSG="$CXXFLAGSG -mmacosx-version-min=10.4"
+    CXXFLAGSO="$CXXFLAGSO -mmacosx-version-min=10.4"
   fi
   rm -f contrib/config/tests/darwin-dynamic-cast/libDynamicCastTestLib.dylib
   rm -f contrib/config/tests/darwin-dynamic-cast/main.o
@@ -12840,6 +12784,64 @@ _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; }
+  cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+      { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+     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 "no" >&6; }
+     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
+
+
 
     OLD_LDFLAGS="$LDFLAGS"
   LDFLAGS="-Wl,-soname,libbase.so.6.2.1 $LDFLAGS $LDFLAGSPIC $SHLIBFLAGS"
index 49acc3f6573c11a60b738a502941687272bbe434..909d12222ee6a3355c272c7eee9f61d0d353d946 100644 (file)
@@ -134,9 +134,6 @@ AC_SUBST(CC_VERSION)
 AC_SUBST(CFLAGS)
 AC_SUBST(CFLAGSPIC)
 
-dnl Check if the linker supports -rpath
-DEAL_II_CHECK_RPATH
-
 dnl -------------------------------------------------------------
 dnl                          Multithreading
 dnl -------------------------------------------------------------
@@ -320,6 +317,9 @@ 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

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.