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;
::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
#! /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.
#
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"
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
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