summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-22 03:11:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-22 03:11:20 +0000
commit3636f8c0f56ddf15e26e28e7a38e748588fad976 (patch)
tree95e69fd762babc1af8d79afe0830bc2fdc0f1f11
parent2addc8cd5c83f6013fe086a0bb29b1f8a462da5d (diff)
configure.in: check CFLAGS and LDFLAGS
* configure.in: check if the given CFLAGS and LDFLAGS are working, and bail out early if not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--configure.in19
2 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cf6f4761b7..d8f1982731 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 22 12:11:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: check if the given CFLAGS and LDFLAGS are working, and
+ bail out early if not.
+
Tue Oct 22 00:06:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_exists_p): warn deprecated name. [Bug #9041]
diff --git a/configure.in b/configure.in
index 5d51abb37c..875d95bf90 100644
--- a/configure.in
+++ b/configure.in
@@ -645,6 +645,25 @@ else
unset ac_c_werror_flag
fi])
+RUBY_WERROR_FLAG([
+ AC_MSG_CHECKING([whether CFLAGS is valid])
+ AC_TRY_COMPILE([], [],
+ [AC_MSG_RESULT(yes)],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([something wrong with CFLAGS="$CFLAGS"])
+ ]
+ )
+ AC_MSG_CHECKING([whether LDFLAGS is valid])
+ AC_TRY_LINK([], [],
+ [AC_MSG_RESULT(yes)],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([something wrong with LDFLAGS="$LDFLAGS"])
+ ]
+ )
+])
+
AC_DEFUN(RUBY_TRY_CFLAGS, [
AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
RUBY_WERROR_FLAG([