diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-25 17:00:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-25 17:00:03 +0000 |
commit | af832540ef02189b758e0a5c09a3718fd766a7e7 (patch) | |
tree | 0fa6a08034aff4516c5bd192cd8c0d1ec064d986 /configure.in | |
parent | 8acd2da4b144a51ba694d11b5507504b367474b9 (diff) | |
download | ruby-af832540ef02189b758e0a5c09a3718fd766a7e7.tar.gz ruby-af832540ef02189b758e0a5c09a3718fd766a7e7.tar.xz ruby-af832540ef02189b758e0a5c09a3718fd766a7e7.zip |
* configure.in (RUBY_EXTERN): macro to export symbols in shared
library. [ruby-core:05528]
* defines.h, {bcc32,win32,wince}/Makefile.sub (RUBY_EXTERN): moved to
configuration pass.
* ext/extmk.rb (extmake): RUBY_EXTERN for static linked extensions.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.in b/configure.in index c13d7ed2f..2ab91c2e5 100644 --- a/configure.in +++ b/configure.in @@ -283,6 +283,17 @@ NORETURN(void exit(int x));], done]) AC_DEFINE_UNQUOTED([NORETURN(x)], $rb_cv_noreturn) +AC_CACHE_CHECK([for RUBY_EXTERN], rb_cv_ruby_extern, +[rb_cv_ruby_extern=no +for mac in "__attribute__((dllimport))" "__declspec(dllimport)"; do + AC_TRY_COMPILE( + [extern $mac void conftest(void);], + [rb_cv_ruby_extern="extern $mac"; break]) +done]) +test "x$rb_cv_ruby_extern" = xno || AC_DEFINE_UNQUOTED(RUBY_EXTERN, $rb_cv_ruby_extern) + +XCFLAGS="$XCFLAGS -DRUBY_EXPORT" + dnl Check whether we need to define sys_nerr locally AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default #include <errno.h>]) @@ -1346,7 +1357,6 @@ case "$target_os" in COMMON_HEADERS="windows.h winsock.h" ;; esac - XCFLAGS="$XCFLAGS" LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)' LIBRUBY_ALIASES='' FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in |