]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Disable -ggdb by using -g instead where necessary. This presently holds for Mac OS...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2002 14:35:31 +0000 (14:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2002 14:35:31 +0000 (14:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@6697 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 74d54230a73229e28e42294b32bf12e35323c284..36f991e14322edd5d83979d8db54a1f601bf201e 100644 (file)
@@ -462,13 +462,13 @@ dnl -------------------------------------------------------------
 AC_DEFUN(DEAL_II_SET_CXX_DEBUG_FLAG, dnl
 [
   if test "$GXX" = yes ; then
-    AC_MSG_CHECKING(whether -ggdb works for long symbols)
     case "$target" in
        dnl On Alpha, use the special treatment
        alpha*-osf*)
-            CXXFLAGS="-ggdb $CXXFLAGSG"
-            AC_TRY_COMPILE(
-              [
+           AC_MSG_CHECKING(whether -ggdb works for long symbols)
+           CXXFLAGS="-ggdb $CXXFLAGSG"
+           AC_TRY_COMPILE(
+             [
 #               include <string>
 #               include <map>
                 using namespace std;
@@ -483,27 +483,40 @@ AC_DEFUN(DEAL_II_SET_CXX_DEBUG_FLAG, dnl
                         ::const_iterator i1=t2->begin();
                   return (i1==i2);
                 }
-              ],
-            [
+             ],
+             [
                   ;
-            ],
-            [
-                CXXFLAGSG="-ggdb $CXXFLAGSG"
-              AC_MSG_RESULT(yes)
-            ],
-            [
-                CXXFLAGSG="-gstabs $CXXFLAGSG"
-              AC_MSG_RESULT(no -- using -gstabs)
-            ])
-          ;;
+             ],
+             [
+               CXXFLAGSG="-ggdb $CXXFLAGSG"
+               AC_MSG_RESULT(yes)
+             ],
+             [
+               CXXFLAGSG="-gstabs $CXXFLAGSG"
+               AC_MSG_RESULT(no -- using -gstabs instead)
+             ])
+           ;;
   
-       dnl For all other systems assume that -ggdb works (we can't make the
-       dnl test  above the default, as stabs are not the default debugging
-       dnl format on many systems, and we only want to use it where necessary
+       dnl For all other systems test whether -ggdb works at all, and if
+       dnl not fall back on -g instead. This test is mainly used to
+       dnl accomodate for a failure on Mac OS X, where -ggdb leads to
+       dnl information the assembler does not understand (see mailing
+       dnl list thread on this from mid-October 2002)
        *)
-          AC_MSG_RESULT(yes)
-            CXXFLAGSG="-ggdb $CXXFLAGSG"
-          ;;
+           AC_MSG_CHECKING(whether -ggdb works)
+           CXXFLAGS="-ggdb $CXXFLAGSG"
+          AC_TRY_COMPILE(
+             [],
+             [ ; ],
+             [
+               CXXFLAGSG="-ggdb $CXXFLAGSG"
+               AC_MSG_RESULT(yes)
+             ],
+             [
+               CXXFLAGSG="-g $CXXFLAGSG"
+               AC_MSG_RESULT(no -- using -g instead)
+             ])
+           ;;
     esac
   
   else
index 2060c3c8bcd2c59da656d4b7c0b8b9c8b50cad71..62ca5c03ed4d62f9d5c540cc5d2ea2ebe00591b0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.124 .
+# From configure.in Revision: 1.125 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53a.
 #
@@ -2943,12 +2943,12 @@ echo "$as_me: error: No compiler options for this C++ compiler
 
 
   if test "$GXX" = yes ; then
-    echo "$as_me:$LINENO: checking whether -ggdb works for long symbols" >&5
-echo $ECHO_N "checking whether -ggdb works for long symbols... $ECHO_C" >&6
     case "$target" in
               alpha*-osf*)
-            CXXFLAGS="-ggdb $CXXFLAGSG"
-            cat >conftest.$ac_ext <<_ACEOF
+           echo "$as_me:$LINENO: checking whether -ggdb works for long symbols" >&5
+echo $ECHO_N "checking whether -ggdb works for long symbols... $ECHO_C" >&6
+           CXXFLAGS="-ggdb $CXXFLAGSG"
+           cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
@@ -2996,27 +2996,72 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-                CXXFLAGSG="-ggdb $CXXFLAGSG"
-              echo "$as_me:$LINENO: result: yes" >&5
+               CXXFLAGSG="-ggdb $CXXFLAGSG"
+               echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-                CXXFLAGSG="-gstabs $CXXFLAGSG"
-              echo "$as_me:$LINENO: result: no -- using -gstabs" >&5
-echo "${ECHO_T}no -- using -gstabs" >&6
+               CXXFLAGSG="-gstabs $CXXFLAGSG"
+               echo "$as_me:$LINENO: result: no -- using -gstabs instead" >&5
+echo "${ECHO_T}no -- using -gstabs instead" >&6
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-          ;;
+           ;;
+
+                                          *)
+           echo "$as_me:$LINENO: checking whether -ggdb works" >&5
+echo $ECHO_N "checking whether -ggdb works... $ECHO_C" >&6
+           CXXFLAGS="-ggdb $CXXFLAGSG"
+          cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ ;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
-                            *)
-          echo "$as_me:$LINENO: result: yes" >&5
+               CXXFLAGSG="-ggdb $CXXFLAGSG"
+               echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-            CXXFLAGSG="-ggdb $CXXFLAGSG"
-          ;;
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+               CXXFLAGSG="-g $CXXFLAGSG"
+               echo "$as_me:$LINENO: result: no -- using -g instead" >&5
+echo "${ECHO_T}no -- using -g instead" >&6
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+           ;;
     esac
 
   else
@@ -6202,7 +6247,7 @@ else
 fi;
 
 case "$target" in
-   *-aix* | alpha*-linux* | alpha*-osf45* | *cygwin )
+   *-aix* | alpha*-linux* | alpha*-osf45* | *cygwin | powerpc-apple-darwin* )
           { echo "$as_me:$LINENO: WARNING: Shared libraries not supported on $target. Using static libs instead" >&5
 echo "$as_me: WARNING: Shared libraries not supported on $target. Using static libs instead" >&2;}
           enableshared=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.