]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check whether we can link with -rdynamic.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 7 Jul 2005 18:16:53 +0000 (18:16 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 7 Jul 2005 18:16:53 +0000 (18:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@11099 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4

index 972d6dd30e15fc3d87272f165b2df96cf2cc956e..daea90143948aff1666278ce22eb2c710786088a 100644 (file)
@@ -4002,7 +4002,10 @@ void f (const std::ostream &out);
 
 dnl -------------------------------------------------------------
 dnl Check whether glibc-like stacktrace information is available
-dnl for the Exception class
+dnl for the Exception class. If it is, then try to also determine
+dnl whether the compiler accepts the -rdynamic flag, since that is
+dnl recommended for linking if one wants to have meaningful
+dnl backtraces.
 dnl
 dnl Usage: DEAL_II_HAVE_GLIBC_STACKTRACE
 dnl
@@ -4028,6 +4031,20 @@ AC_DEFUN(DEAL_II_HAVE_GLIBC_STACKTRACE, dnl
                 [Define if deal.II is linked against the GNU C library,
                  which provides stacktrace debug information that can be
                  printed out in the exception class])
+
+      AC_MSG_CHECKING(whether compiler accepts -rdynamic)
+
+      CXXFLAGS="$CXXFLAGSG -rdynamic"
+      AC_TRY_LINK(
+        [],
+        [;],
+        [
+          AC_MSG_RESULT(yes)
+          LDFLAGS="$LDFLAGS -rdynamic"
+        ],
+        [
+          AC_MSG_RESULT(no)
+        ])
     ],
     [
       AC_MSG_RESULT(no)

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.