* configure.in (RUBY_PROG_GNU_LD): add $CFLAGS, $CPPFLAGS, $LDFLAGS
to the option of $CC. * configure.in: set LIBRUBYARG to '-l$(RUBY_SO_NAME)' if the target os is cygwin and --disable-shared option is supplied. * lib/mkmf.rb (init_mkmf): expand config["LIBRUBY"] and config["LIBRUBY_A"]. don't link $LIBRUBYARG_STATIC if --disable-shared option is supplied. * configure.in (RUBY_CPPOUTFILE): should be a better message. * ext/Win32API/extconf.rb: join with a space. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f744cfd8d7
commit
b60172917f
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
|||||||
|
Thu Dec 12 18:19:14 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in (RUBY_PROG_GNU_LD): add $CFLAGS, $CPPFLAGS, $LDFLAGS
|
||||||
|
to the option of $CC.
|
||||||
|
|
||||||
|
* configure.in: set LIBRUBYARG to '-l$(RUBY_SO_NAME)' if the
|
||||||
|
target os is cygwin and --disable-shared option is supplied.
|
||||||
|
|
||||||
|
* lib/mkmf.rb (init_mkmf): expand config["LIBRUBY"] and
|
||||||
|
config["LIBRUBY_A"]. don't link $LIBRUBYARG_STATIC if
|
||||||
|
--disable-shared option is supplied.
|
||||||
|
|
||||||
|
* configure.in (RUBY_CPPOUTFILE): should be a better message.
|
||||||
|
|
||||||
|
* ext/Win32API/extconf.rb: join with a space.
|
||||||
|
|
||||||
Thu Dec 12 17:27:19 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Dec 12 17:27:19 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* re.c (rb_reg_hash): define Regexp#hash to make regexps to be
|
* re.c (rb_reg_hash): define Regexp#hash to make regexps to be
|
||||||
|
21
configure.in
21
configure.in
@ -18,18 +18,24 @@ test "$rb_cv_mingw32" = yes && target_os="mingw32"
|
|||||||
esac])
|
esac])
|
||||||
|
|
||||||
AC_DEFUN(RUBY_CPPOUTFILE,
|
AC_DEFUN(RUBY_CPPOUTFILE,
|
||||||
|
[AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile,
|
||||||
[cppflags=$CPPFLAGS
|
[cppflags=$CPPFLAGS
|
||||||
AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile,
|
CPPFLAGS='-o conftest.i'
|
||||||
[CPPFLAGS='-o conftest.i'
|
AC_TRY_CPP([], rb_cv_cppoutfile=yes, rb_cv_cppoutfile=no)
|
||||||
AC_TRY_CPP([], rb_cv_cppoutfile="$CPPFLAGS", rb_cv_cppoutfile=' >conftest.i')
|
CPPFLAGS=$cppflags
|
||||||
rm -f conftest*])
|
rm -f conftest*])
|
||||||
CPPOUTFILE="$rb_cv_cppoutfile"
|
if test "$rb_cv_cppoutfile" = yes; then
|
||||||
AC_SUBST(CPPOUTFILE)
|
CPPOUTFILE='-o conftest.i'
|
||||||
CPPFLAGS=$cppflags])
|
elif test "$rb_cv_cppoutfile" = no; then
|
||||||
|
CPPOUTFILE='> conftest.i'
|
||||||
|
elif test -n "$rb_cv_cppoutfile"; then
|
||||||
|
CPPOUTFILE="$rb_cv_cppoutfile"
|
||||||
|
fi
|
||||||
|
AC_SUBST(CPPOUTFILE)])
|
||||||
|
|
||||||
AC_DEFUN(RUBY_PROG_GNU_LD,
|
AC_DEFUN(RUBY_PROG_GNU_LD,
|
||||||
[AC_CACHE_CHECK(whether the linker is GNU ld, rb_cv_prog_gnu_ld,
|
[AC_CACHE_CHECK(whether the linker is GNU ld, rb_cv_prog_gnu_ld,
|
||||||
[if `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null; then
|
[if `$CC $CFLAGS $CPPFLAGS $LDFLAGS --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null; then
|
||||||
rb_cv_prog_gnu_ld=yes
|
rb_cv_prog_gnu_ld=yes
|
||||||
else
|
else
|
||||||
rb_cv_prog_gnu_ld=no
|
rb_cv_prog_gnu_ld=no
|
||||||
@ -1161,6 +1167,7 @@ case "$target_os" in
|
|||||||
LIBRUBY_SO=dummy
|
LIBRUBY_SO=dummy
|
||||||
LIBRUBY_DLDFLAGS=''
|
LIBRUBY_DLDFLAGS=''
|
||||||
LIBRUBY='lib$(RUBY_SO_NAME).a'
|
LIBRUBY='lib$(RUBY_SO_NAME).a'
|
||||||
|
LIBRUBYARG='-l$(RUBY_SO_NAME)'
|
||||||
fi
|
fi
|
||||||
LIBRUBY_ALIASES=''
|
LIBRUBY_ALIASES=''
|
||||||
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
|
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
|
||||||
|
@ -2,7 +2,7 @@ require 'mkmf'
|
|||||||
|
|
||||||
if have_header("windows.h") and have_library("kernel32")
|
if have_header("windows.h") and have_library("kernel32")
|
||||||
if Config::CONFIG["CC"] =~ /gcc/
|
if Config::CONFIG["CC"] =~ /gcc/
|
||||||
$CFLAGS += "-fno-defer-pop -fno-omit-frame-pointer"
|
$CFLAGS += " -fno-defer-pop -fno-omit-frame-pointer"
|
||||||
end
|
end
|
||||||
create_makefile("Win32API")
|
create_makefile("Win32API")
|
||||||
end
|
end
|
||||||
|
@ -767,6 +767,7 @@ all: $(DLLIB)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def init_mkmf(config = CONFIG)
|
def init_mkmf(config = CONFIG)
|
||||||
|
$enable_shared = config['ENABLE_SHARED'] == 'yes'
|
||||||
$defs = []
|
$defs = []
|
||||||
$CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
|
$CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
|
||||||
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
||||||
@ -776,16 +777,17 @@ def init_mkmf(config = CONFIG)
|
|||||||
$LIBEXT = config['LIBEXT'].dup
|
$LIBEXT = config['LIBEXT'].dup
|
||||||
$OBJEXT = config["OBJEXT"].dup
|
$OBJEXT = config["OBJEXT"].dup
|
||||||
$LIBS = "#{config['LIBS']} #{config['DLDLIBS']}"
|
$LIBS = "#{config['LIBS']} #{config['DLDLIBS']}"
|
||||||
$LIBRUBYARG = config['LIBRUBYARG']
|
$LIBRUBYARG = ""
|
||||||
$LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
|
$LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
|
||||||
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
|
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
|
||||||
$LIBPATH = []
|
$LIBPATH = []
|
||||||
|
|
||||||
$objs = nil
|
$objs = nil
|
||||||
$libs = ""
|
$libs = ""
|
||||||
if config['ENABLE_SHARED'] == 'yes' or config["LIBRUBY"] != config["LIBRUBY_A"]
|
if $enable_shared or Config.expand(config["LIBRUBY"].dup) != Config.expand(config["LIBRUBY_A"].dup)
|
||||||
$LIBPATH = ["$(topdir)"]
|
$LIBPATH = ["$(topdir)"]
|
||||||
$LIBPATH.unshift("$(libdir)") unless $extmk or defined? CROSS_COMPILING
|
$LIBPATH.unshift("$(libdir)") unless $extmk or defined? CROSS_COMPILING
|
||||||
|
$LIBRUBYARG = config['LIBRUBYARG']
|
||||||
end
|
end
|
||||||
$LIBPATH << "$(archdir)"
|
$LIBPATH << "$(archdir)"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user