summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 8f8261aac4..8678413821 100644
--- a/configure.in
+++ b/configure.in
@@ -288,12 +288,10 @@ AC_SUBST(GCC)
if test "$GCC" = yes; then
linker_flag=-Wl,
: ${optflags=-O3}
- AS_CASE(["$target_os"], [linux*|darwin*], [: ${debugflags=-ggdb}])
RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
else
linker_flag=
fi
-test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
RUBY_PROG_GNU_LD
RUBY_CPPOUTFILE
@@ -487,6 +485,12 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
rb_cv_warnflags="$warnflags"
warnflags=
fi
+if test "$GCC" = yes; then
+ test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])}
+ test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
+fi
+test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
+
if test "$GCC" = ""; then
AS_CASE(["$target_os"],[aix*],[warnflags="-qinfo=por"])
fi