summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-28 02:56:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-28 02:56:59 +0000
commitffdaca1d748804f2b5ca2de612f17cf6c78d351b (patch)
tree048649e28ea613e633e6be261755a11d72ff6718 /configure.in
parente9ef9bd0dbf1807ad82dc7227abbedff9d806a09 (diff)
merge revision(s) 34840:
* configure.in (debugflags): check if -ggdb is accepted. [ruby-core:42875][Bug #6080] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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