* configure.in (--with-arch): added new option to support
universal binary. replaced --enable-fat-binary option which didn't work actually. * configure.in (RUBY_FUNC_ATTRIBUTE): added conditional test. * configure.in (ac_cv_type_getgroups): decalared because getgroups() fills rest of the buffer with garbages on Rosetta. * configure.in (alloca): defines only for powerpc, but always create empty object to suppress ld warning. * configure.in (LIBRUBY_DLDFLAGS): set compatibility version with TEENY. * configure.in (CFLAGS, LDFLAGS): separates ARCH_FLAG. * configure.in (arch): renamed to "universal" from "fat". * Makefile.in (ARCH_FLAG): added. * include/ruby/defines.h (WORDS_BIGENDIAN): uses AC_APPLE_UNIVERSAL_BUILD. * missing/alloca.c (alloca): defines only if C_ALLOCA is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3c164fd92e
commit
5610e5dc70
28
ChangeLog
28
ChangeLog
@ -1,3 +1,31 @@
|
|||||||
|
Sat Feb 7 18:02:48 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in (--with-arch): added new option to suppor
|
||||||
|
universal binary. replaced --enable-fat-binary option which
|
||||||
|
didn't work actually.
|
||||||
|
|
||||||
|
* configure.in (RUBY_FUNC_ATTRIBUTE): added conditional test.
|
||||||
|
|
||||||
|
* configure.in (ac_cv_type_getgroups): decalared because getgroups()
|
||||||
|
fills rest of the buffer with garbages on Rosetta.
|
||||||
|
|
||||||
|
* configure.in (alloca): defines only for powerpc, but always
|
||||||
|
create empty object to suppress ld warning.
|
||||||
|
|
||||||
|
* configure.in (LIBRUBY_DLDFLAGS): set compatibility version with
|
||||||
|
TEENY.
|
||||||
|
|
||||||
|
* configure.in (CFLAGS, LDFLAGS): separates ARCH_FLAG.
|
||||||
|
|
||||||
|
* configure.in (arch): renamed to "universal" from "fat".
|
||||||
|
|
||||||
|
* Makefile.in (ARCH_FLAG): added.
|
||||||
|
|
||||||
|
* include/ruby/defines.h (WORDS_BIGENDIAN): uses
|
||||||
|
AC_APPLE_UNIVERSAL_BUILD.
|
||||||
|
|
||||||
|
* missing/alloca.c (alloca): defines only if C_ALLOCA is defined.
|
||||||
|
|
||||||
Sat Feb 7 12:31:03 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Feb 7 12:31:03 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* runruby.rb: added --precommand and --show options.
|
* runruby.rb: added --precommand and --show options.
|
||||||
|
@ -39,7 +39,8 @@ VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/mis
|
|||||||
empty =
|
empty =
|
||||||
OUTFLAG = @OUTFLAG@$(empty)
|
OUTFLAG = @OUTFLAG@$(empty)
|
||||||
COUTFLAG = @COUTFLAG@$(empty)
|
COUTFLAG = @COUTFLAG@$(empty)
|
||||||
CFLAGS = @CFLAGS@ @ARCH_FLAG@
|
ARCH_FLAG = @ARCH_FLAG@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
cflags = @cflags@
|
cflags = @cflags@
|
||||||
optflags = @optflags@
|
optflags = @optflags@
|
||||||
debugflags = @debugflags@
|
debugflags = @debugflags@
|
||||||
@ -53,7 +54,7 @@ EXTLIBS =
|
|||||||
LIBS = @LIBS@ $(EXTLIBS)
|
LIBS = @LIBS@ $(EXTLIBS)
|
||||||
MISSING = @LIBOBJS@ @ALLOCA@
|
MISSING = @LIBOBJS@ @ALLOCA@
|
||||||
LDSHARED = @LIBRUBY_LDSHARED@
|
LDSHARED = @LIBRUBY_LDSHARED@
|
||||||
DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@
|
DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(EXTLDFLAGS) $(ARCH_FLAG)
|
||||||
SOLIBS = @SOLIBS@
|
SOLIBS = @SOLIBS@
|
||||||
MAINLIBS = @MAINLIBS@
|
MAINLIBS = @MAINLIBS@
|
||||||
ARCHMINIOBJS = @MINIOBJS@
|
ARCHMINIOBJS = @MINIOBJS@
|
||||||
|
189
configure.in
189
configure.in
@ -3,6 +3,10 @@ AC_INIT()
|
|||||||
|
|
||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.60)
|
||||||
|
|
||||||
|
AC_DEFUN([RUBY_PREREQ_AC],
|
||||||
|
[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), [-1],
|
||||||
|
AC_MSG_ERROR([Autoconf version ]$1[ or higher is required]$2))])
|
||||||
|
|
||||||
AC_ARG_WITH(baseruby,
|
AC_ARG_WITH(baseruby,
|
||||||
[ --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby],
|
[ --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby],
|
||||||
[
|
[
|
||||||
@ -24,6 +28,7 @@ AC_SUBST(BASERUBY)
|
|||||||
|
|
||||||
AC_DEFUN([RUBY_MINGW32],
|
AC_DEFUN([RUBY_MINGW32],
|
||||||
[case "$host_os" in
|
[case "$host_os" in
|
||||||
|
dnl (
|
||||||
cygwin*)
|
cygwin*)
|
||||||
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
|
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
|
||||||
[AC_TRY_CPP([
|
[AC_TRY_CPP([
|
||||||
@ -100,61 +105,51 @@ AC_CANONICAL_TARGET
|
|||||||
target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
|
target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
|
||||||
ac_install_sh='' # unusable for extension libraries.
|
ac_install_sh='' # unusable for extension libraries.
|
||||||
|
|
||||||
ifelse(currently,disabled, [
|
AC_ARG_WITH(arch, [dnl
|
||||||
dnl checks for fat-binary
|
--with-arch=ARCHS build an Apple/NeXT Multi Architecture Binary (MAB);
|
||||||
AC_ARG_ENABLE(fat-binary,
|
|
||||||
[ --enable-fat-binary=ARCHS
|
|
||||||
build an Apple/NeXT Multi Architecture Binary (MAB);
|
|
||||||
ARCHS is a comma-delimited list of architectures for
|
ARCHS is a comma-delimited list of architectures for
|
||||||
which to build; if ARCHS is omitted, then the package
|
which to build; if this option is disabled or omitted
|
||||||
will be built for all architectures supported by the
|
entirely, then the package will be built only for the
|
||||||
platform ("ppc" for MacOS/X and Darwin; "ppc,i386"
|
target platform],
|
||||||
for Rhapsody; "m68k,i386,sparc" for OpenStep;
|
[target_archs="$withval"], [unset target_archs])
|
||||||
"m68k,i386,sparc,hppa" for NextStep); if this option
|
test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed 's/ *-arch *[^ ]*//g'`
|
||||||
is disabled or omitted entirely, then the package
|
test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed 's/ *-arch *[^ ]*//g'`
|
||||||
will be built only for the target platform],
|
unset ARCH_FLAG universal_binary
|
||||||
[fat_binary=$enableval], [fat_binary=no])
|
if test ${target_archs+set}; then
|
||||||
if test "$fat_binary" != no; then
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([target architectures])
|
AC_MSG_CHECKING([target architectures])
|
||||||
|
target_archs=`echo $target_archs | tr , ' '`
|
||||||
# Respect TARGET_ARCHS setting from environment if available.
|
|
||||||
if test -z "$TARGET_ARCHS"; then
|
|
||||||
# Respect ARCH given to --enable-fat-binary if present.
|
|
||||||
if test "$fat_binary" != yes; then
|
|
||||||
TARGET_ARCHS=`echo "$fat_binary" | tr ',' ' '`
|
|
||||||
else
|
|
||||||
# Choose a default set of architectures based upon platform.
|
|
||||||
case "$target_os" in
|
|
||||||
darwin*)
|
|
||||||
TARGET_ARCHS="ppc"
|
|
||||||
;;
|
|
||||||
rhapsody*)
|
|
||||||
TARGET_ARCHS="ppc i386"
|
|
||||||
;;
|
|
||||||
openstep*)
|
|
||||||
TARGET_ARCHS="m68k i386 sparc"
|
|
||||||
;;
|
|
||||||
nextstep*)
|
|
||||||
TARGET_ARCHS="m68k i386 sparc hppa"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
TARGET_ARCHS=`arch`
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$TARGET_ARCHS])
|
|
||||||
|
|
||||||
# /usr/lib/arch_tool -archify_list $TARGET_ARCHS
|
# /usr/lib/arch_tool -archify_list $TARGET_ARCHS
|
||||||
ARCH_FLAG=
|
for archs in $target_archs
|
||||||
for archs in $TARGET_ARCHS
|
|
||||||
do
|
do
|
||||||
ARCH_FLAG="$ARCH_FLAG -arch $archs"
|
case ",$universal_binary," in
|
||||||
|
dnl (
|
||||||
|
*,$archs,*)
|
||||||
|
;;
|
||||||
|
dnl (
|
||||||
|
*)
|
||||||
|
universal_binary="${universal_binary+$universal_binary,}$archs"
|
||||||
|
ARCH_FLAG="${ARCH_FLAG+$ARCH_FLAG }-arch $archs"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
AC_DEFINE(NEXT_FAT_BINARY)
|
target_archs="$universal_binary"
|
||||||
|
unset universal_binary
|
||||||
|
case "$target_archs" in dnl (
|
||||||
|
*,*) universal_binary=yes;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$target_archs])
|
||||||
|
|
||||||
|
if test "${universal_binary-no}" = yes; then
|
||||||
|
RUBY_PREREQ_AC(2.63, [ to compile universal binary])
|
||||||
|
AC_SUBST(try_header,try_compile)
|
||||||
|
target=`echo $target | sed "s/^$target_cpu-/universal-/"`
|
||||||
|
target_cpu=universal
|
||||||
|
fi
|
||||||
|
CFLAGS="$CFLAGS ${ARCH_FLAG}"
|
||||||
|
LDFLAGS="${LDFLAGS+$LDFLAGS } ${ARCH_FLAG}"
|
||||||
|
else
|
||||||
|
target_archs="$target_cpu"
|
||||||
fi
|
fi
|
||||||
], [fat_binary=no])
|
|
||||||
|
|
||||||
case $target_cpu in
|
case $target_cpu in
|
||||||
i?86) frame_address=yes;;
|
i?86) frame_address=yes;;
|
||||||
@ -422,6 +417,18 @@ if test "$rb_cv_va_args_macro" = yes; then
|
|||||||
AC_DEFINE(HAVE_VA_ARGS_MACRO)
|
AC_DEFINE(HAVE_VA_ARGS_MACRO)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_DEFUN([RUBY_DEFINE_IF], [dnl
|
||||||
|
m4_ifval([$3],[test "$3" && cat <<EOH >> confdefs.h
|
||||||
|
@%:@if $3
|
||||||
|
EOH
|
||||||
|
])dnl
|
||||||
|
AC_DEFINE_UNQUOTED($1, $2)
|
||||||
|
m4_ifval([$3],[test "$3" && cat <<EOH >> confdefs.h
|
||||||
|
@%:@endif /* $3 */
|
||||||
|
EOH
|
||||||
|
])dnl
|
||||||
|
])dnl
|
||||||
|
|
||||||
AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
|
AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
|
||||||
m4_ifval([$2], dnl
|
m4_ifval([$2], dnl
|
||||||
[AS_VAR_PUSHDEF([attrib],[$2])], dnl
|
[AS_VAR_PUSHDEF([attrib],[$2])], dnl
|
||||||
@ -431,6 +438,7 @@ m4_ifval([$3], dnl
|
|||||||
[AS_VAR_PUSHDEF([rbcv],[$3])], dnl
|
[AS_VAR_PUSHDEF([rbcv],[$3])], dnl
|
||||||
[AS_VAR_PUSHDEF([rbcv],[rb_cv_func_][$1])]dnl
|
[AS_VAR_PUSHDEF([rbcv],[rb_cv_func_][$1])]dnl
|
||||||
)dnl
|
)dnl
|
||||||
|
m4_ifval([$4], [rbcv_cond=[$4]; test "$rbcv_cond" || unset rbcv_cond])
|
||||||
AC_CACHE_CHECK(for [$1] function attribute, rbcv,
|
AC_CACHE_CHECK(for [$1] function attribute, rbcv,
|
||||||
[rbcv=x
|
[rbcv=x
|
||||||
if test "${ac_c_werror_flag+set}"; then
|
if test "${ac_c_werror_flag+set}"; then
|
||||||
@ -440,9 +448,14 @@ else
|
|||||||
fi
|
fi
|
||||||
ac_c_werror_flag=yes
|
ac_c_werror_flag=yes
|
||||||
for mac in "__attribute__ (($1)) x" "x __attribute__ (($1))" "__declspec($1) x" x; do
|
for mac in "__attribute__ (($1)) x" "x __attribute__ (($1))" "__declspec($1) x" x; do
|
||||||
|
m4_ifval([$4],mac="$mac"${rbcv_cond+" /* only if $rbcv_cond */"})
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
[#define ]attrib[(x) $mac
|
m4_ifval([$4],${rbcv_cond+[@%:@if ]$rbcv_cond})
|
||||||
]attrib[(void conftest_attribute_check(void));], [],
|
[@%:@define ]attrib[(x) $mac]
|
||||||
|
m4_ifval([$4],${rbcv_cond+[@%:@else]}
|
||||||
|
${rbcv_cond+[@%:@define ]attrib[(x) x]}
|
||||||
|
${rbcv_cond+[@%:@endif]})
|
||||||
|
attrib[(void conftest_attribute_check(void));], [],
|
||||||
[rbcv="$mac"; break])
|
[rbcv="$mac"; break])
|
||||||
done
|
done
|
||||||
if test "${rb_c_werror_flag+set}"; then
|
if test "${rb_c_werror_flag+set}"; then
|
||||||
@ -451,7 +464,9 @@ else
|
|||||||
unset ac_c_werror_flag
|
unset ac_c_werror_flag
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
AC_DEFINE_UNQUOTED(attrib[(x)], $rbcv)
|
if test "$rbcv" != x; then
|
||||||
|
RUBY_DEFINE_IF(attrib[(x)], $rbcv, [${rbcv_cond}])
|
||||||
|
fi
|
||||||
AS_VAR_POPDEF([attrib])
|
AS_VAR_POPDEF([attrib])
|
||||||
AS_VAR_POPDEF([rbcv])
|
AS_VAR_POPDEF([rbcv])
|
||||||
])
|
])
|
||||||
@ -459,9 +474,11 @@ AS_VAR_POPDEF([rbcv])
|
|||||||
RUBY_FUNC_ATTRIBUTE(noreturn, NORETURN)
|
RUBY_FUNC_ATTRIBUTE(noreturn, NORETURN)
|
||||||
RUBY_FUNC_ATTRIBUTE(deprecated, DEPRECATED)
|
RUBY_FUNC_ATTRIBUTE(deprecated, DEPRECATED)
|
||||||
RUBY_FUNC_ATTRIBUTE(noinline, NOINLINE)
|
RUBY_FUNC_ATTRIBUTE(noinline, NOINLINE)
|
||||||
RUBY_FUNC_ATTRIBUTE(stdcall)
|
|
||||||
RUBY_FUNC_ATTRIBUTE(cdecl)
|
if_i386=${universal_binary+[defined __i386__]}
|
||||||
RUBY_FUNC_ATTRIBUTE(fastcall)
|
RUBY_FUNC_ATTRIBUTE(stdcall, [], [], ${if_i386})
|
||||||
|
RUBY_FUNC_ATTRIBUTE(cdecl, [], [], ${if_i386})
|
||||||
|
RUBY_FUNC_ATTRIBUTE(fastcall, [], [], ${if_i386})
|
||||||
|
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],
|
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],
|
||||||
@ -527,20 +544,23 @@ openstep*) ;;
|
|||||||
rhapsody*) ;;
|
rhapsody*) ;;
|
||||||
darwin*) LIBS="-lobjc $LIBS"
|
darwin*) LIBS="-lobjc $LIBS"
|
||||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE"
|
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE"
|
||||||
|
AC_MSG_CHECKING(whether Mac OS X 10.5 or later)
|
||||||
AC_TRY_CPP([#include <AvailabilityMacros.h>
|
AC_TRY_CPP([#include <AvailabilityMacros.h>
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
|
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
|
||||||
#error pre OS X 10.4
|
#error pre OS X 10.4
|
||||||
[!<===== pre OS X 10.4 =====>]
|
[!<===== pre OS X 10.4 =====>]
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[
|
[macosx_10_5=yes], [macosx_10_5=no])
|
||||||
|
AC_MSG_RESULT($macosx_10_5)
|
||||||
|
if test $macosx_10_5 = yes; then
|
||||||
ac_cv_header_ucontext_h=no
|
ac_cv_header_ucontext_h=no
|
||||||
ac_cv_func_daemon=no
|
ac_cv_func_daemon=no
|
||||||
],
|
else
|
||||||
[
|
|
||||||
AC_DEFINE(BROKEN_SETREUID, 1)
|
AC_DEFINE(BROKEN_SETREUID, 1)
|
||||||
AC_DEFINE(BROKEN_SETREGID, 1)
|
AC_DEFINE(BROKEN_SETREGID, 1)
|
||||||
])
|
fi
|
||||||
|
ac_cv_type_getgroups=gid_t # getgroups() on Rosetta fills garbage
|
||||||
ac_cv_lib_crypt_crypt=no
|
ac_cv_lib_crypt_crypt=no
|
||||||
AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
|
AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
@ -762,13 +782,21 @@ fi
|
|||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_TYPE_GETGROUPS
|
AC_TYPE_GETGROUPS
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
case "${target_cpu}-${target_os}" in
|
case "${target_cpu}-${target_os}:${target_archs}" in
|
||||||
|
dnl (
|
||||||
powerpc-darwin*)
|
powerpc-darwin*)
|
||||||
AC_LIBSOURCES(alloca.c)
|
AC_LIBSOURCES(alloca.c)
|
||||||
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
|
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
|
||||||
AC_DEFINE(C_ALLOCA)
|
AC_DEFINE(C_ALLOCA)
|
||||||
AC_DEFINE_UNQUOTED(alloca, alloca)
|
AC_DEFINE_UNQUOTED(alloca, alloca)
|
||||||
;;
|
;;
|
||||||
|
dnl (
|
||||||
|
universal-darwin*:*ppc*)
|
||||||
|
AC_LIBSOURCES(alloca.c)
|
||||||
|
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
|
||||||
|
RUBY_DEFINE_IF(C_ALLOCA, 1, [defined __powerpc__])
|
||||||
|
RUBY_DEFINE_IF(alloca, alloca)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
;;
|
;;
|
||||||
@ -1572,15 +1600,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "$target_os" in
|
case "$target_os" in
|
||||||
|
dnl (
|
||||||
linux* | gnu* | k*bsd*-gnu)
|
linux* | gnu* | k*bsd*-gnu)
|
||||||
STRIP='strip -S -x';;
|
STRIP='strip -S -x';;
|
||||||
nextstep*)
|
dnl (
|
||||||
STRIP='strip -A -n';;
|
nextstep* | openstep* | rhapsody* | darwin*)
|
||||||
openstep*)
|
|
||||||
STRIP='strip -A -n';;
|
|
||||||
rhapsody*)
|
|
||||||
STRIP='strip -A -n';;
|
|
||||||
darwin*)
|
|
||||||
STRIP='strip -A -n';;
|
STRIP='strip -A -n';;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -1664,10 +1688,6 @@ if test "$prefix" = NONE; then
|
|||||||
prefix=$ac_default_prefix
|
prefix=$ac_default_prefix
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if test "$fat_binary" != no ; then
|
|
||||||
# CFLAGS="$CFLAGS $ARCH_FLAG"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
if test x"$cross_compiling" = xyes; then
|
if test x"$cross_compiling" = xyes; then
|
||||||
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
|
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
|
||||||
PREP=fake.rb
|
PREP=fake.rb
|
||||||
@ -1775,10 +1795,10 @@ if test "$enable_shared" = 'yes'; then
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib'
|
RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)'
|
||||||
LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace'
|
LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace'
|
||||||
LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
|
LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR).$(TEENY)'
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib'
|
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).dylib lib$(RUBY_INSTALL_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_INSTALL_NAME).dylib'
|
||||||
;;
|
;;
|
||||||
interix*)
|
interix*)
|
||||||
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
|
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
|
||||||
@ -1944,9 +1964,14 @@ esac
|
|||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS "'$(DEFS)'
|
CPPFLAGS="$CPPFLAGS "'$(DEFS)'
|
||||||
test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}'
|
test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}'
|
||||||
cflagspat=`eval echo '"'"${cflags}"'"' | sed 's/[][|.*]/\\&/g'`
|
cflagspat=`eval echo '"'"${cflags}"'"' | sed 's/[[][|.*]]/\\&/g'`
|
||||||
CFLAGS=`echo "$CFLAGS" | sed "s|$cflagspat"'|${cflags}|'`
|
CFLAGS=`echo "$CFLAGS" | sed "s|$cflagspat"'|${cflags}|'`
|
||||||
cxxflagspat=`eval echo '"'"${cxxflags}"'"' | sed 's/[][|.*]/\\&/g'`
|
if test "${ARCH_FLAG}"; then
|
||||||
|
archflagpat=`eval echo '"'"${ARCH_FLAG}"'"' | sed 's/[[][|.*]]/\\&/g'`
|
||||||
|
CFLAGS=`echo "$CFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
|
||||||
|
LDFLAGS=`echo "$LDFLAGS" | sed "s|$archflagpat"'|$(ARCH_FLAG)|'`
|
||||||
|
fi
|
||||||
|
cxxflagspat=`eval echo '"'"${cxxflags}"'"' | sed 's/[[][|.*]]/\\&/g'`
|
||||||
CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$cxxflagspat"'|${cxxflags}|'`
|
CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$cxxflagspat"'|${cxxflags}|'`
|
||||||
AC_SUBST(cppflags, [])dnl
|
AC_SUBST(cppflags, [])dnl
|
||||||
AC_SUBST(cflags, ['${optflags} ${debugflags} ${warnflags}'])dnl
|
AC_SUBST(cflags, ['${optflags} ${debugflags} ${warnflags}'])dnl
|
||||||
@ -2091,14 +2116,20 @@ AC_SUBST(vendordir)dnl
|
|||||||
configure_args=$ac_configure_args
|
configure_args=$ac_configure_args
|
||||||
AC_SUBST(configure_args)dnl
|
AC_SUBST(configure_args)dnl
|
||||||
|
|
||||||
if test "$fat_binary" != no ; then
|
if test "${universal_binary-no}" = yes ; then
|
||||||
arch="fat-${target_os}"
|
arch="universal-${target_os}"
|
||||||
|
AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
|
||||||
|
AC_TRY_COMPILE([const char arch[] = __ARCHITECTURE__;], [puts(arch);],
|
||||||
|
[rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
|
||||||
|
else
|
||||||
|
arch="${target_cpu}-${target_os}"
|
||||||
|
fi
|
||||||
|
if test "${rb_cv_architecture_available}" = yes; then
|
||||||
AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, RUBY_LIB"/"RUBY_PLATFORM)
|
AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, RUBY_LIB"/"RUBY_PLATFORM)
|
||||||
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, RUBY_SITE_LIB"/"RUBY_PLATFORM)
|
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, RUBY_SITE_LIB"/"RUBY_PLATFORM)
|
||||||
AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB, RUBY_VENDOR_LIB"/"RUBY_PLATFORM)
|
AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB, RUBY_VENDOR_LIB"/"RUBY_PLATFORM)
|
||||||
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__"-${target_os}")
|
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__"-${target_os}")
|
||||||
else
|
else
|
||||||
arch="${target_cpu}-${target_os}"
|
|
||||||
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}")
|
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -108,10 +108,7 @@ void xfree(void*);
|
|||||||
# define DOSISH_DRIVE_LETTER
|
# define DOSISH_DRIVE_LETTER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__NeXT__) || defined(__APPLE__)
|
#ifdef AC_APPLE_UNIVERSAL_BUILD
|
||||||
/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
|
|
||||||
result in a different endian. Instead trust __BIG_ENDIAN__ and
|
|
||||||
__LITTLE_ENDIAN__ which are set correctly by -arch. */
|
|
||||||
#undef WORDS_BIGENDIAN
|
#undef WORDS_BIGENDIAN
|
||||||
#ifdef __BIG_ENDIAN__
|
#ifdef __BIG_ENDIAN__
|
||||||
#define WORDS_BIGENDIAN
|
#define WORDS_BIGENDIAN
|
||||||
|
@ -30,6 +30,8 @@ static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ruby/config.h"
|
#include "ruby/config.h"
|
||||||
|
#ifdef C_ALLOCA
|
||||||
|
|
||||||
#ifdef emacs
|
#ifdef emacs
|
||||||
#ifdef static
|
#ifdef static
|
||||||
/* actually, only want this if static is defined as ""
|
/* actually, only want this if static is defined as ""
|
||||||
@ -192,3 +194,4 @@ alloca (size) /* returns pointer to storage */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user