summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in30
1 files changed, 27 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index cedfe67..5ed741b 100644
--- a/configure.in
+++ b/configure.in
@@ -192,6 +192,15 @@ AC_PROG_MAKE_SET
AC_AIX
AC_MINIX
+AC_SUBST(RM, ['rm -f'])
+AC_SUBST(CP, ['cp -v'])
+AC_SUBST(INSTALL, ['install -vp'])
+if $as_mkdir_p; then
+ AC_SUBST(MAKEDIRS, ['mkdir -p'])
+else
+ AC_SUBST(MAKEDIRS, ['install -d'])
+fi
+
dnl check for large file stuff
AC_SYS_LARGEFILE
@@ -246,7 +255,7 @@ if test "$rb_cv_stdarg" = yes; then
fi
AC_CACHE_CHECK([for noreturn], rb_cv_noreturn,
-[rb_cv_noreturn=no
+[rb_cv_noreturn=x
for mac in "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do
AC_TRY_COMPILE(
[#define NORETURN(x) $mac
@@ -830,6 +839,7 @@ if test "$with_dln_a_out" != yes; then
hpux*) DLDFLAGS="$DLDFLAGS -E"
: ${LDSHARED='ld -b'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
+ : ${LIBPATHENV=SHLIB_PATH}
rb_cv_dlopen=yes;;
solaris*) if test "$GCC" = yes; then
: ${LDSHARED='$(CC) -Wl,-G'}
@@ -891,6 +901,7 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes ;;
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
: ${LDFLAGS=""}
+ : ${LIBPATHENV=DYLD_LIBRARY_PATH}
rb_cv_dlopen=yes ;;
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
@@ -899,6 +910,7 @@ if test "$with_dln_a_out" != yes; then
: ${ARCHFILE="ruby.imp"}
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) $(CFLAGS)'
TRY_LINK="$TRY_LINK"' $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
+ : ${LIBPATHENV=SHLIB_PATH}
rb_cv_dlopen=yes ;;
human*) : ${DLDFLAGS=''}
@@ -916,6 +928,7 @@ if test "$with_dln_a_out" != yes; then
DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
;;
esac
+ : ${LIBPATHENV=LIBRARY_PATH}
rb_cv_dlopen=yes ;;
nto-qnx*) DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
: ${LDSHARED='ld -Bshareable -x'}
@@ -924,6 +937,7 @@ if test "$with_dln_a_out" != yes; then
cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"}
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000"
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all"
+ : ${LIBPATHENV=""}
rb_cv_dlopen=yes ;;
hiuxmpp) : ${LDSHARED='ld -r'} ;;
atheos*) : ${LDSHARED="$CC -shared"}
@@ -945,6 +959,7 @@ fi
AC_SUBST(LINK_SO)
AC_SUBST(LIBPATHFLAG)
AC_SUBST(RPATHFLAG)
+AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
AC_SUBST(TRY_LINK)
dln_a_out_works=no
@@ -1103,12 +1118,16 @@ fi
if test x"$cross_compiling" = xyes; then
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
PREP=fake.rb
+ RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
else
MINIRUBY='./miniruby$(EXEEXT)'
- PREP=''
+ PREP='miniruby$(EXEEXT)'
+ RUNRUBY='$(MINIRUBY) $(srcdir)/runruby.rb --extout=$(EXTOUT) --'
fi
AC_SUBST(MINIRUBY)
AC_SUBST(PREP)
+AC_SUBST(RUNRUBY)
+AC_SUBST(EXTOUT, [${EXTOUT-.ext}])
FIRSTMAKEFILE=""
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
@@ -1474,5 +1493,10 @@ else
fi
: > confdefs.h
-AC_CONFIG_FILES([$FIRSTMAKEFILE Makefile])
+AC_CONFIG_FILES($FIRSTMAKEFILE)
+AC_CONFIG_FILES(Makefile, [{
+ echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)'
+ test "$RUBY_INSTALL_NAME$EXEEXT" = ruby || echo 'ruby: $(PROGRAM);'
+ sed ['s/{\$([^(){}]*)[^{}]*}//g'] ${srcdir}/common.mk
+} >> Makefile], [RUBY_INSTALL_NAME=$RUBY_INSTALL_NAME EXEEXT=$EXEEXT])
AC_OUTPUT