From 967e92af874b33b739c349633f091033645f831e Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 5 Nov 2010 22:33:18 +0000 Subject: [PATCH] * configure.in (rb_cv_export_prefix): check for prefixed underscore of exported symbols git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- configure.in | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cae5031c52..a7550481e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Sat Nov 6 07:30:07 2010 Nobuyoshi Nakada +Sat Nov 6 07:33:08 2010 Nobuyoshi Nakada + + * configure.in (rb_cv_export_prefix): check for prefixed + underscore of exported symbols * tool/rbinstall.rb (bin-comm): prepend prolog shell script if necessary. diff --git a/configure.in b/configure.in index e0f8f6444f..43962e026c 100644 --- a/configure.in +++ b/configure.in @@ -2344,6 +2344,13 @@ AC_SUBST(INSTALLDOC) if test "$rb_with_pthread" = "yes"; then THREAD_MODEL=pthread fi +AC_CACHE_CHECK([for prefixed underscore of exported symbols], rb_cv_export_prefix, [ + AC_TRY_COMPILE([extern void conftest_exported(void) {}], [], [ + rb_cv_export_prefix=`$NM conftest.$ac_objext | + sed -n ['s/.*\(_\)conftest_exported.*/\1/p']` + ], + [rb_cv_export_prefix='']) +]) MINIDLNOBJ=dmydln.o AS_CASE(["$target_os"], [linux*], [ @@ -2409,7 +2416,8 @@ AS_CASE(["$target_os"], LIBRUBY_SO='$(RUBY_SO_NAME)'.dll LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)' fi - EXPORT_PREFIX=' ' + test -z "$rb_cv_export_prefix" && rb_cv_export_prefix=' ' + EXPORT_PREFIX="$rb_cv_export_prefix" DLDFLAGS="${DLDFLAGS}"' $(DEFFILE)' AC_LIBOBJ([win32]) COMMON_LIBS=m