mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in (RUBY_EXTERN): ignore invalid attribute.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc703f2d56
commit
d5a1efdc61
2 changed files with 22 additions and 13 deletions
|
@ -1,4 +1,6 @@
|
|||
Thu Jul 22 12:30:52 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Jul 22 12:58:12 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (RUBY_EXTERN): ignore invalid attribute.
|
||||
|
||||
* configure.in: fix for older autoconf.
|
||||
|
||||
|
|
31
configure.in
31
configure.in
|
@ -676,6 +676,21 @@ EOH
|
|||
])dnl
|
||||
])dnl
|
||||
|
||||
AC_DEFUN([RUBY_WERROR_FLAG], [dnl
|
||||
if test "${ac_c_werror_flag+set}"; then
|
||||
rb_c_werror_flag="$ac_c_werror_flag"
|
||||
else
|
||||
unset rb_c_werror_flag
|
||||
fi
|
||||
ac_c_werror_flag=yes
|
||||
$1
|
||||
if test "${rb_c_werror_flag+set}"; then
|
||||
ac_c_werror_flag="$rb_c_werror_flag"
|
||||
else
|
||||
unset ac_c_werror_flag
|
||||
fi])
|
||||
|
||||
dnl RUBY_FUNC_ATTRIBUTE(attrib, macroname, cachevar, condition)
|
||||
AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
|
||||
m4_ifval([$2], dnl
|
||||
[AS_VAR_PUSHDEF([attrib],[$2])], dnl
|
||||
|
@ -688,12 +703,7 @@ m4_ifval([$3], dnl
|
|||
m4_ifval([$4], [rbcv_cond=[$4]; test "$rbcv_cond" || unset rbcv_cond])
|
||||
AC_CACHE_CHECK(for [$1] function attribute, rbcv,
|
||||
[rbcv=x
|
||||
if test "${ac_c_werror_flag+set}"; then
|
||||
rb_c_werror_flag="$ac_c_werror_flag"
|
||||
else
|
||||
unset rb_c_werror_flag
|
||||
fi
|
||||
ac_c_werror_flag=yes
|
||||
RUBY_WERROR_FLAG([
|
||||
for mac in "__attribute__ (($1)) x" "x __attribute__ (($1))" "__declspec($1) x" x; do
|
||||
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
|
||||
AC_TRY_COMPILE(
|
||||
|
@ -705,12 +715,7 @@ ${rbcv_cond+[@%:@endif]})
|
|||
attrib[(void conftest_attribute_check(void));], [],
|
||||
[rbcv="$mac"; break])
|
||||
done
|
||||
if test "${rb_c_werror_flag+set}"; then
|
||||
ac_c_werror_flag="$rb_c_werror_flag"
|
||||
else
|
||||
unset ac_c_werror_flag
|
||||
fi
|
||||
])
|
||||
])])
|
||||
if test "$rbcv" != x; then
|
||||
RUBY_DEFINE_IF([${rbcv_cond}], attrib[(x)], $rbcv)
|
||||
fi
|
||||
|
@ -745,12 +750,14 @@ fi
|
|||
|
||||
AC_CACHE_CHECK([for RUBY_EXTERN], rb_cv_ruby_extern,
|
||||
[rb_cv_ruby_extern=no
|
||||
RUBY_WERROR_FLAG([
|
||||
for mac in "__attribute__((dllimport))" "__declspec(dllimport)"; do
|
||||
AC_TRY_COMPILE(
|
||||
[extern $mac void conftest(void);],
|
||||
[conftest();],
|
||||
[rb_cv_ruby_extern="extern $mac"; break])
|
||||
done])
|
||||
])
|
||||
test "x$rb_cv_ruby_extern" = xno || AC_DEFINE_UNQUOTED(RUBY_EXTERN, $rb_cv_ruby_extern)
|
||||
|
||||
RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_EXPORT)
|
||||
|
|
Loading…
Reference in a new issue