summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in55
1 files changed, 41 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index 0477ade03e..8b9708becb 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ruby.h)
+MAJOR=1
+MINOR=3
+TEENY=1
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(TEENY)
dnl checks for alternative programs
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
case $withval in
@@ -85,6 +91,7 @@ AC_PROG_RANLIB
AC_SUBST(AR)
AC_CHECK_PROGS(AR, ar aal, ar)
AC_PROG_INSTALL
+AC_PROG_LN_S
AC_PROG_MAKE_SET
# checks for UNIX variants that set C preprocessor variables
@@ -93,6 +100,8 @@ AC_MINIX
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(void*)
+AC_CHECK_SIZEOF(float)
+AC_CHECK_SIZEOF(double)
AC_MSG_CHECKING(for prototypes)
AC_CACHE_VAL(rb_cv_have_prototypes,
@@ -297,7 +306,7 @@ AC_ARG_WITH(dln-a-out, [--with-dln-a-out use dln_a_out if possible], [
case "$host_os" in
linux*)
AC_MSG_CHECKING(whether ELF binaries are produced)
- AC_CACHE_VAL(rb_cv_linux_elf,
+ AC_CACHE_VAL(rb_cv_binary_elf,
[AC_TRY_RUN([
/* Test for whether ELF binaries are produced */
#include <fcntl.h>
@@ -315,13 +324,13 @@ main() {
exit(0); /* succeed (yes, it's ELF) */
}
],
- rb_cv_linux_elf=yes,
- rb_cv_linux_elf=no,
+ rb_cv_binary_elf=yes,
+ rb_cv_binary_elf=no,
[:])])
- AC_MSG_RESULT($rb_cv_linux_elf)
- if test "$rb_cv_linux_elf" = no; then
+ AC_MSG_RESULT($rb_cv_binary_elf)
+ if test "$rb_cv_binary_elf" = no; then
with_dln_a_out=yes
- host_os=linux-a.out
+ host_os=${host_os}-a_out
else
LDFLAGS="-rdynamic"
fi;;
@@ -375,10 +384,8 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes ;;
linux*) LDSHARED="gcc -shared"
rb_cv_dlopen=yes ;;
- freebsd3*) LDSHARED="ld -Bshareable"
- LDFLAGS="-rdynamic"
- rb_cv_dlopen=yes ;;
- freebsd*) LDSHARED="ld -Bshareable"
+ freebsd*) LDSHARED="gcc -shared"
+ test -x /usr/bin/objformat && LDFLAGS="-rdynamic"
rb_cv_dlopen=yes ;;
netbsd*) LDSHARED="ld -Bshareable"
rb_cv_dlopen=yes ;;
@@ -565,12 +572,13 @@ if test "$fat_binary" = yes ; then
CFLAGS="$CFLAGS $ARCH_FLAG"
fi
-LIBRUBY='libruby.a'
-LIBRUBYARG='libruby.a'
+LIBRUBY_A='libruby.a'
+LIBRUBY='$(LIBRUBY_A)'
+LIBRUBYARG='$(LIBRUBY_A)'
SOLIBS=
if test "$host_os" = "beos"; then
CFLAGS="$CFLAGS -relax_pointers"
- LIBRUBY='libruby.so'
+ LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-lruby'
SOLIBS='-lnet'
echo creating ruby.def
@@ -585,9 +593,25 @@ if test "$host_os" = "beos"; then
esac
fi
+AC_SUBST(LIBSUFFIX)
+
+LIBRUBY_SO='libruby.so.$(MAJOR).$(MINOR).$(TEENY)'
+LIBRUBY_ALIASES='libruby.so'
if test "$enable_shared" = 'yes'; then
- LIBRUBY='libruby.so'
+ LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-L./ -lruby'
+ CFLAGS="$CFLAGS $CCDLFLAGS"
+ case "$host_os" in
+ freebsd2*|sunos4*)
+ LIBRUBY_ALIASES='libruby.so.$(MAJOR).$(MINOR) libruby.so'
+ ;;
+ hpux*)
+ LIBRUBY_SO='libruby.sl.$(MAJOR).$(MINOR).$(TEENY)'
+ LIBRUBY_ALIASES='libruby.sl.$(MAJOR).$(MINOR) libruby.sl'
+ ;;
+ *)
+ ;;
+ esac
fi
case "$host_os" in
@@ -605,6 +629,9 @@ case "$host_os" in
esac
+AC_SUBST(LIBRUBY_A)
+AC_SUBST(LIBRUBY_SO)
+AC_SUBST(LIBRUBY_ALIASES)
AC_SUBST(LIBRUBY)
AC_SUBST(LIBRUBYARG)
AC_SUBST(SOLIBS)