summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-12 10:21:41 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-12 10:21:41 +0000
commitb60172917f0403a4ac83d4862530509b3935ad7b (patch)
treeb4b0d72412389ed93418b3b2bb358b66f0f79fef /configure.in
parentf744cfd8d7cc51d90ae863589ded64c60030b220 (diff)
* 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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in21
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index df9a331e62..2765072790 100644
--- a/configure.in
+++ b/configure.in
@@ -18,18 +18,24 @@ test "$rb_cv_mingw32" = yes && target_os="mingw32"
esac])
AC_DEFUN(RUBY_CPPOUTFILE,
+[AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile,
[cppflags=$CPPFLAGS
-AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile,
-[CPPFLAGS='-o conftest.i'
-AC_TRY_CPP([], rb_cv_cppoutfile="$CPPFLAGS", rb_cv_cppoutfile=' >conftest.i')
+CPPFLAGS='-o conftest.i'
+AC_TRY_CPP([], rb_cv_cppoutfile=yes, rb_cv_cppoutfile=no)
+CPPFLAGS=$cppflags
rm -f conftest*])
-CPPOUTFILE="$rb_cv_cppoutfile"
-AC_SUBST(CPPOUTFILE)
-CPPFLAGS=$cppflags])
+if test "$rb_cv_cppoutfile" = yes; then
+ CPPOUTFILE='-o conftest.i'
+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_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
else
rb_cv_prog_gnu_ld=no
@@ -1161,6 +1167,7 @@ case "$target_os" in
LIBRUBY_SO=dummy
LIBRUBY_DLDFLAGS=''
LIBRUBY='lib$(RUBY_SO_NAME).a'
+ LIBRUBYARG='-l$(RUBY_SO_NAME)'
fi
LIBRUBY_ALIASES=''
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in