ruby-changes:47947
From: nobu <ko1@a...>
Date: Fri, 29 Sep 2017 22:21:22 +0900 (JST)
Subject: [ruby-changes:47947] nobu:r60062 (trunk): configure.ac
nobu 2017-09-29 22:21:17 +0900 (Fri, 29 Sep 2017) New Revision: 60062 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60062 Log: configure.ac * configure.ac: renamed configure.in. [Feature #13946] * Makefile.in, common.mk, ext/rbconfig/sizeof/depend: use configure.ac. * README.ja.md, README.md: update document for configure.ac. Added files: trunk/configure.ac Removed files: trunk/configure.in Modified files: trunk/Makefile.in trunk/README.ja.md trunk/README.md trunk/aclocal.m4 trunk/common.mk trunk/ext/rbconfig/sizeof/depend trunk/sparc.c trunk/tool/install-sh Index: configure.in =================================================================== --- configure.in (revision 60061) +++ configure.in (nonexistent) @@ -1,4725 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/configure.in#L0 -dnl Process this file with autoconf to produce a configure script. -AC_INIT() -{ -AC_CONFIG_AUX_DIR(tool) - -AC_PREREQ(2.67) - -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_DISABLE_OPTION_CHECKING - -AC_ARG_VAR([cflags], [additional CFLAGS]) -AC_ARG_VAR([cppflags], [additional CPPFLAGS]) -AC_ARG_VAR([cxxflags], [additional CXXFLAGS]) - -AC_DEFUN([RUBY_RM_RECURSIVE], [ -m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [2.70]), [-1], [ -# suppress error messages, rm: cannot remove 'conftest.dSYM', from -# AC_EGREP_CPP with CFLAGS=-g on Darwin. -# -# TODO: remove this hack when AC_PREREQ() becomes 2.70 or later. -AS_CASE([$build_os], [darwin*], [ -rm() { - rm_recursive='' - for arg do - AS_CASE("$arg", - [--*], [], - [-*r*], [break], - [conftest.*], [AS_IF([test -d "$arg"], [rm_recursive=-r; break])], - []) - done - command rm $rm_recursive "[$]@" -} -])])]) - -{ # environment section - -HAVE_BASERUBY=yes -AC_ARG_WITH(baseruby, - AS_HELP_STRING([--with-baseruby=RUBY], [use RUBY as baseruby; RUBY is the pathname of ruby]), - [AS_CASE(["$withval"], - [*ruby*],[BASERUBY=$withval], - [no],[HAVE_BASERUBY=no], - [AC_MSG_ERROR(need ruby)]) - ], - [ - AC_PATH_PROG([BASERUBY], [ruby], [false]) - ]) -AS_IF([test "$HAVE_BASERUBY" = yes -a "`RUBYOPT=- $BASERUBY -e 'print 42' 2>/dev/null`" = 42], [ - AS_IF([test "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42' 2>/dev/null`" = 42], [ - BASERUBY="$BASERUBY --disable=gems" - ]) - $BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub -], [ - BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false" - HAVE_BASERUBY=no -]) -AC_SUBST(BASERUBY) -AC_SUBST(HAVE_BASERUBY) - -: ${GIT=git} -HAVE_GIT=yes -AC_ARG_WITH(git, - AS_HELP_STRING([--without-git], [never use git]), - [AS_CASE([$withval], - [no], [GIT=never-use HAVE_GIT=no], - [yes], [], - [GIT=$withval])]) -AS_IF([test x"$HAVE_GIT" = xyes], [command -v "$GIT" > /dev/null || HAVE_GIT=no]) -AC_SUBST(GIT) -AC_SUBST(HAVE_GIT) - -AC_DEFUN([RUBY_MINGW32], -[AS_CASE(["$host_os"], -[cygwin*], [ -AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32, -[AC_TRY_CPP([ -#ifndef __MINGW32__ -# error -#endif -], rb_cv_mingw32=yes,rb_cv_mingw32=no) -rm -f conftest*]) -AS_IF([test "$rb_cv_mingw32" = yes], [ - target_os="mingw32" - : ${ac_tool_prefix:="`expr "$CC" : ['\(.*-\)g\?cc[^/]*$']`"} -]) -]) -AS_CASE(["$target_os"], [mingw*msvc], [ -target_os="`echo ${target_os} | sed 's/msvc$//'`" -]) -AS_CASE(["$target_cpu-$target_os"], [x86_64-mingw*], [ -target_cpu=x64 -]) -]) - -AC_DEFUN([RUBY_NACL], -[ - AS_CASE(["${host_os}"], -[nacl], [ - ac_cv_exeext=.nexe - host_vendor=chromium - ac_cv_host=chromium - AC_MSG_CHECKING([wheather \$NACL_SDK_ROOT is set]) - AS_IF([test x"${NACL_SDK_ROOT}" = x], [ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([You need to set \$NACL_SDK_ROOT environment variable to build for NativeClient]) - ]) - AC_MSG_RESULT([yes]) - - nacl_cv_build_variant=glibc - AC_ARG_WITH(newlib, - AS_HELP_STRING([--with-newlib], [uses newlib version of NativeClient SDK]), - [AS_CASE([$withval], - [no], [nacl_cv_build_variant=glibc], - [yes], [nacl_cv_build_variant=newlib])]) - - AS_CASE(["$target_cpu"], - [x86_64], [nacl_cv_cpu_nick=x86 - nacl_cv_cpu_nick2=x86_64], - [i?86], [nacl_cv_cpu_nick=x86 - nacl_cv_cpu_nick2=x86_32], - [le32], [nacl_cv_cpu_nick=pnacl - nacl_cv_cpu_nick2=pnacl - ac_cv_exeext=.pexe], - [nacl_cv_cpu_nick=$target_cpu]) - AS_CASE(["$build_os"], - [linux*], [nacl_cv_os_nick=linux], - [darwin*], [nacl_cv_os_nick=mac], - [cygwin*|mingw*], [nacl_cv_os_nick=win], - [nacl_cv_os_nick=$build_os]) - - host="$host_cpu-chromium-$host_os-" - ac_tool_prefix="$host_cpu-nacl-" - - AC_MSG_CHECKING([NativeClient toolchain]) - AS_IF([test x"$nacl_cv_cpu_nick" = xpnacl], [ - NACL_TOOLCHAIN="${nacl_cv_os_nick}_pnacl" - ac_tool_prefix=pnacl- - ], [test -d \ - "${NACL_SDK_ROOT}/toolchain/${nacl_cv_os_nick}_${nacl_cv_cpu_nick}_${nacl_cv_build_variant}"], [ - NACL_TOOLCHAIN="${nacl_cv_os_nick}_${nacl_cv_cpu_nick}_${nacl_cv_build_variant}" - ], [test -d \ - "${NACL_SDK_ROOT}/toolchain/${nacl_cv_os_nick}_x86_${nacl_cv_cpu_nick}/${nacl_cv_build_variant}"], [ - NACL_TOOLCHAIN="${nacl_cv_os_nick}_x86_${nacl_cv_cpu_nick}/${nacl_cv_build_variant}" - ], [ - AS_CASE( - ["${nacl_cv_build_variant}"], - [glibc], [AS_IF([test \ - -d "${NACL_SDK_ROOT}/toolchain/${nacl_cv_os_nick}_${nacl_cv_cpu_nick}_newlib" \ - -a -d "${NACL_SDK_ROOT}/toolchain/${nacl_cv_os_nick}_${nacl_cv_cpu_nick}"], [ - NACL_TOOLCHAIN="${nacl_cv_os_nick}_${nacl_cv_cpu_nick}" - ])], - [newlib], [ NACL_TOOLCHAIN="${nacl_cv_os_nick}_${nacl_cv_cpu_nick}" ]) - ]) - AS_IF([test ! -e "${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/${ac_tool_prefix}gcc"], [ - AS_IF([test "${build_cpu}" = i686 -a -e "${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/nacl-gcc"], [ - ac_tool_prefix=nacl- - ]) - AS_IF([test "${build_cpu}" = x86_64 -a -e "${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/nacl-gcc"], [ - ac_tool_prefix=nacl64- - ]) - ]) - AS_IF([test -z "${NACL_TOOLCHAIN}"], [ - AC_MSG_ERROR([Unrecognized --host and --build combination or NaCl SDK is not installed]) - ]) - AC_MSG_RESULT(${NACL_TOOLCHAIN}) - - AC_MSG_CHECKING([path to SDK]) - AS_IF([! echo -- "${PATH}" | grep -F "${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin" > /dev/null], [ - PATH="${PATH}:${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin" - ]) - AC_MSG_RESULT(${NACL_SDK_ROOT}/toolchain/${NACL_TOOLCHAIN}/bin) - - RUBY_APPEND_OPTIONS(XCFLAGS, '-I$(NACL_SDK_ROOT)/include') - AS_IF([test x"${nacl_cv_cpu_nick}" = xpnacl], [ - RUBY_APPEND_OPTIONS(XCFLAGS, '-isystem $(NACL_SDK_ROOT)/include/pnacl') - ], [test x"${nacl_cv_build_variant}" = xnewlib], [ - RUBY_APPEND_OPTIONS(XCFLAGS, '-isystem $(NACL_SDK_ROOT)/include/newlib') - ]) - - AC_MSG_CHECKING([nacl library path]) - AS_IF([test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}/Release"], [ - nacl_cv_libpath="${nacl_cv_build_variant}_${nacl_cv_cpu_nick2}" - ], [test -d "${NACL_SDK_ROOT}/lib/${nacl_cv_cpu_nick2}/Release"], [ - nacl_cv_libpath="${nacl_cv_cpu_nick2}" - ], [ - AC_MSG_ERROR([not found]) - ]) - AC_MSG_RESULT([${nacl_cv_libpath}]) - RUBY_APPEND_OPTIONS(XLDFLAGS, '-L$(NACL_SDK_ROOT)/'"lib/${nacl_cv_libpath}/Release") - - AC_SUBST(NACL_TOOLCHAIN) - AC_SUBST(NACL_SDK_ROOT) - AC_SUBST(NACL_SDK_VARIANT, "${nacl_cv_build_variant}") - AC_SUBST(NACL_LIB_PATH, "${nacl_cv_libpath}") - AC_CHECK_TOOLS(CC, [clang gcc]) - AC_CHECK_TOOLS(CXX, [clang++ g++]) -])]) - -AC_DEFUN([RUBY_NACL_CHECK_PEPPER_TYPES], -[AS_CASE(["${host_os}"], -[nacl], [ - AC_CHECK_TYPES([struct PPB_Core, struct PPB_Messaging, struct PPB_Var, - struct PPB_URLLoader, struct PPB_URLRequestInfo, - struct PPB_URLResponseInfo, struct PPB_FileRef, - struct PPP_Instance]) -]) -]) - -AC_DEFUN([RUBY_CPPOUTFILE], -[AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile, -[save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS='-o conftest-1.i' -rb_cv_cppoutfile=no -AC_TRY_CPP([test-for-cppout], - [grep test-for-cppout conftest-1.i > /dev/null && rb_cv_cppoutfile=yes]) -CPPFLAGS="$save_CPPFLAGS" -rm -f conftest*]) -AS_IF([test "$rb_cv_cppoutfile" = yes], [ - CPPOUTFILE='-o conftest.i' -], [test "$rb_cv_cppoutfile" = no], [ - CPPOUTFILE='> conftest.i' -], [test -n "$rb_cv_cppoutfile"], [ - CPPOUTFILE="$rb_cv_cppoutfile" -]) -AC_SUBST(CPPOUTFILE)]) - -AC_DEFUN([RUBY_PROG_GNU_LD], -[AC_CACHE_CHECK(whether the linker is GNU ld, rb_cv_prog_gnu_ld, -[AS_IF([`$CC $CFLAGS $CPPFLAGS $LDFLAGS --print-prog-name=ld 2>&1` -v 2>&1 | grep "GNU ld" > /dev/null], [ - rb_cv_prog_gnu_ld=yes -], [ - rb_cv_prog_gnu_ld=no -])]) -GNU_LD=$rb_cv_prog_gnu_ld -AC_SUBST(GNU_LD)]) - -eval `sed -n ['s/^@%:@define RUBY_API_VERSION_\([A-Z][A-Z_0-9]*\) \([0-9][0-9]*\)/API_\1=\2/p'] $srcdir/include/ruby/version.h` -RUBY_PROGRAM_VERSION=`sed -n 's/^@%:@define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/version.h` -MAJOR=`echo $RUBY_PROGRAM_VERSION | cut -d. -f1` -MINOR=`echo $RUBY_PROGRAM_VERSION | cut -d. -f2` -TEENY=`echo $RUBY_PROGRAM_VERSION | cut -d. -f3` -for v in MAJOR MINOR TEENY; do - AS_IF([eval "test \"\$$v\" = ''"], [ - AC_MSG_ERROR(could not determine $v number from version.h) - ]) -done -AS_IF([test "$MAJOR.$MINOR" != "$API_MAJOR.$API_MINOR"], [ - AC_MSG_ERROR([API version $API_MAJOR.$API_MINOR differs from program version $MAJOR.$MINOR]) -]) -AC_SUBST(MAJOR) -AC_SUBST(MINOR) -AC_SUBST(TEENY) -AC_SUBST(RUBY_PROGRAM_VERSION) -AC_SUBST(RUBY_API_VERSION, '$(MAJOR).$(MINOR)') -RUBY_PATCHLEVEL=`sed -n 's/^#define RUBY_PATCHLEVEL //p' $srcdir/version.h` -AC_DEFINE(CANONICALIZATION_FOR_MATHN) -dnl checks for alternative programs -AC_CANONICAL_BUILD -RUBY_RM_RECURSIVE -AC_ARG_WITH(gcc, - AS_HELP_STRING([--without-gcc], [never use gcc]), - [ - AS_CASE([$withval], - [no], [: ${CC=cc}], - [yes], [: ${CC=gcc}], - [CC=$withval])]) -dnl If the user switches compilers, we can't believe the cache -AS_IF([test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"], [ - AC_MSG_ERROR(cached CC is different -- throw away $cache_file -(it is also a good idea to do 'make clean' before compiling)) -]) -test -z "$CC" || ac_cv_prog_CC="$CC" - -AS_IF([test "$program_prefix" = NONE], [ - program_prefix= -]) -AS_IF([test "$prefix" -ef .], [ - AC_MSG_ERROR(--prefix cannot be the current working directory.) -]) -RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` -RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` -AC_SUBST(RUBY_BASE_NAME) -AC_SUBST(RUBYW_BASE_NAME) -AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}') - -AC_CANONICAL_TARGET -test x"$target_alias" = x && -target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` -ac_install_sh='' # unusable for extension libraries. - -AC_ARG_WITH(os-version-style, - AS_HELP_STRING([--with-os-version-style=TYPE], - [OS version number for target and target_os [[full]]] - [(full|teeny|minor+0|minor|major+0|major|none)]), - [os_version_style=$withval], - [os_version_style=full - AS_CASE($target_os, [[*[0-9].*]], - [AS_CASE([`/usr/bin/ruby -e 'puts RUBY_PLATFORM' 2>/dev/null`], - [[*-*[0-9].*.0]], [os_version_style=minor+0], - [[*-*[0-9].*.*]], [os_version_style=full], - [[*-*[0-9].0] ], [os_version_style=major+0], - [[*-*[0-9].*] ], [os_version_style=minor], - [[*-*[0-9]] ], [os_version_style=major], - )]) - ]) -os_version_style_transform= -AS_CASE("${os_version_style}", - [full|teeny], [], - [minor+0], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1.0/']], - [minor], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1/']], - [major+0], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1.0/']], - [major], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1/']], - [none], [os_version_style_transform=['s/[0-9]\.[0-9][.0-9]*$//']], - [AC_MSG_ERROR(unknown --with-os-version-style: $withval)]) -AS_IF([test -z "$target_alias" -a -n "$os_version_style_transform"], - [ - target=`echo ${target} | sed "$os_version_style_transform"` - target_os=`echo ${target_os} | sed "$os_version_style_transform"` - ]) - -AC_DEFUN([RUBY_APPEND_OPTION], - [# RUBY_APPEND_OPTION($1) - AS_CASE([" [$]{$1-} "], - [*" $2 "*], [], [' '], [ $1="$2"], [ $1="[$]$1 $2"])]) -AC_DEFUN([RUBY_APPEND_OPTIONS], - [# RUBY_APPEND_OPTIONS($1) - for rb_opt in $2; do - AS_CASE([" [$]{$1-} "], - [*" [$]{rb_opt} "*], [], [' '], [ $1="[$]{rb_opt}"], [ $1="[$]$1 [$]{rb_opt}"]) - done]) -AC_DEFUN([RUBY_PREPEND_OPTION], - [# RUBY_PREPEND_OPTION($1) - AS_CASE([" [$]{$1-} "], - [*" $2 "*], [], [' '], [ $1="$2"], [ $1="$2 [$]$1"])]) -AC_DEFUN([RUBY_PREPEND_OPTIONS], - [# RUBY_PREPEND_OPTIONS($1) - unset rb_opts; for rb_opt in $2; do - AS_CASE([" [$]{rb_opts} [$]{$1-} "], - [*" [$]{rb_opt} "*], [], [' '], [ $1="[$]{rb_opt}"], [ rb_opts="[$]{rb_opts}[$]{rb_opt} "]) - done - $1="[$]{rb_opts}[$]$1"]) - -AC_ARG_WITH(arch, - AS_HELP_STRING([--with-arch=ARCHS], - [build an Apple/NeXT Multi Architecture Binary (MAB); - ARCHS is a comma-delimited list of architectures for - which to build; if this option is disabled or omitted - entirely, then the package will be built only for the - target platform]), - [target_archs="$withval"], [unset target_archs]) - -AC_DEFUN([RUBY_DEFAULT_ARCH], [ -AC_MSG_CHECKING([arch option]) -AS_CASE([$1], - [*64], [ARCH_FLAG=-m64], - [[i[3-6]86]], [ARCH_FLAG=-m32], - [AC_MSG_ERROR(unknown target architecture: $target_archs)] - ) -AC_MSG_RESULT([$ARCH_FLAG]) -]) - -AC_DEFUN([RUBY_UNIVERSAL_ARCH], [ -# RUBY_UNIVERSAL_ARCH begin -ARCH_FLAG=`expr " $CXXFLAGS " : ['.* \(-m[0-9][0-9]*\) ']` -test ${CXXFLAGS+set} && CXXFLAGS=`echo "$CXXFLAGS" | sed [-e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g']` -ARCH_FLAG=`expr " $CFLAGS " : ['.* \(-m[0-9][0-9]*\) ']` -test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed [-e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g']` -test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed [-e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g']` -unset universal_binary universal_archnames -AS_IF([test ${target_archs+set}], [ - AC_MSG_CHECKING([target architectures]) - target_archs=`echo $target_archs | tr , ' '` - # /usr/lib/arch_tool -archify_list $TARGET_ARCHS - for archs in $target_archs - do - AS_CASE([",$universal_binary,"],[*",$archs,"*], [],[ - cpu=`$SHELL "$ac_aux_dir/config.sub" "${archs}-${target_os}" 2>&1` || { - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([$cpu]) - } - cpu=`echo $cpu | sed 's/-.*-.*//'` - universal_binary="${universal_binary+$universal_binary,}$cpu" - universal_archnames="${universal_archnames} ${archs}=${cpu}" - ARCH_FLAG="${ARCH_FLAG+$ARCH_FLAG }-arch $archs" - ]) - done - target_archs="$universal_binary" - unset universal_binary - AS_CASE(["$target_archs"], - [*,*], [universal_binary=yes], - [unset universal_archnames]) - AC_MSG_RESULT([$target_archs]) - - target=`echo $target | sed "s/^$target_cpu-/-/"` - target_alias=`echo $target_alias | sed "s/^$target_cpu-/-/"` - AS_IF([test "${universal_binary-no}" = yes], [ - AC_SUBST(try_header,try_compile) - target_cpu=universal - real_cross_compiling=$cross_compiling - ], [ - AS_IF([test x"$target_cpu" != x"${target_archs}"], [ - echo 'int main(){return 0;}' > conftest.c - AS_IF([$CC $CFLAGS $ARCH_FLAG -o conftest conftest.c > /dev/null 2>&1], [ - rm -fr conftest.* - ], [ - RUBY_DEFAULT_ARCH("$target_archs") - ]) - ]) - target_cpu=${target_archs} - ]) - AS_CASE(["$target"], [-*], [ target="$target_cpu${target}"]) - AS_CASE(["$target_alias"], [-*], [ target_alias="$target_cpu${target_alias}"]) -], [ - AS_IF([test x"$target_alias" = x], [ - AS_CASE(["$target_os"], - [darwin*], [ - AC_MSG_CHECKING([for real target cpu]) - target=`echo $target | sed "s/^$target_cpu-/-/"` - target_cpu=`$CC -E - 2>/dev/null <<EOF | -#ifdef __x86_64__ -"processor-name=x86_64" -#endif -#ifdef __i386__ -"processor-name=i386" -#endif -#ifdef __ppc__ -"processor-name=powerpc" -#endif -#ifdef __ppc64__ -"processor-name=powerpc64" -#endif -EOF - sed -n 's/^"processor-name=\(.*\)"/\1/p'` - target="$target_cpu${target}" - AC_MSG_RESULT([$target_cpu]) - ]) - ]) - target_archs="$target_cpu" -]) -AS_IF([test "${target_archs}" != "${rb_cv_target_archs-${target_archs}}"], [ - AC_MSG_ERROR([target arch(s) has changed from ${rb_cv_target_archs-nothing} to ${target_archs}]) -], [ - rb_cv_target_archs=${target_archs} -]) -AS_IF([test "x${ARCH_FLAG}" != x], [ - CFLAGS="${CFLAGS:+$CFLAGS }${ARCH_FLAG}" - LDFLAGS="${LDFLAGS:+$LDFLAGS }${ARCH_FLAG}" -]) -# RUBY_UNIVERSAL_ARCH end -]) - -AC_ARG_ENABLE(load-relative, - AS_HELP_STRING([--enable-load-relative], [resolve load paths at run time]), - [load_relative=$enableval]) - -AC_ARG_PROGRAM - -dnl Checks for programs. - -cflagspat= -test -z "$optflags" || - cflagspat="$cflagspat;s|"`eval echo '"'"${optflags}"'"' | sed 's/[[][|.*]]/\\&/g;s/^ */ /;s/ *$/ /'`'| |g' -test -z "$debugflags" || - cflagspat="$cflagspat;s|"`eval echo '"'"${debugflags}"'"' | sed 's/[[][|.*]]/\\&/g;s/^ */ /;s/ *$/ /'`'| |g' -test -z "warnflags" || - cflagspat="$cflagspat;s|"`eval echo '"'"${warnflags}"'"' | sed 's/[[][|.*]]/\\&/g;s/^ */ /;s/ *$/ /'`'| |g' -AS_IF([test -z "${CFLAGS+set}"], [ - cflags=`echo " $cflags " | sed "$cflagspat;s/^ *//;s/ *$//"` - orig_cflags="$cflags" - cflags="$cflags "'${optflags} ${debugflags} ${warnflags}' -]) -AS_IF([test -z "${CXXFLAGS+set}"], [ - cxxflags=`echo " $cxxflags " | sed "$cflagspat;s/^ *//;s/ *$//"` - orig_cxxflags="$cxxflags" - cxxflags="$cxxflags "'${optflags} ${debugflags} ${warnflags}' -]) - -RUBY_NACL -AS_CASE(["$host_os:$build_os"], -[darwin*:darwin*], [ - AC_CHECK_TOOLS(CC, [clang gcc cc]) - # Following Apple deployed clang are broken - # clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported) - # Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn) - # Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn) - AS_IF([! $CC -E -xc - <<SRC >/dev/null], [ - @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3 - @%:@error premature clang - @%:@endif -SRC - AC_MSG_ERROR([clang version 3.0 or later is required]) - ]) -]) -AS_IF([test x"${build}" != x"${host}"], [ - AC_CHECK_TOOL(CC, gcc) -]) - -AC_PROG_CC - -dnl Select the appropriate C++ compiler in OS X -AS_CASE(["$build_os"], - [darwin1*.*], [ - AS_CASE(["x$CC"], - [xgcc-4.2|x/usr/bin/gcc-4.2], [: ${CXX=g++-4.2}], - [xgcc|x/usr/bin/gcc], [: ${CXX=g++}], - [xcc|x/usr/bin/cc], [: ${CXX=c++}], - [xicc], [: ${CXX=icpc}], - [xclang|x/usr/bin/clang], [: ${CXX=clang++}]) - ]) -test -z "$CXX" || ac_cv_prog_CXX="$CXX" - -AC_PROG_CXX -RUBY_MINGW32 -AC_PROG_GCC_TRADITIONAL -AC_SUBST(GCC) -AS_CASE(["$target_os"], -[solaris*], [AC_PATH_TOOL([LD], [ld], [/usr/ccs/bin/ld], [/usr/ccs/bin:$PATH])], -[AC_CHECK_TOOL([LD], [ld], [ld])]) -AC_SUBST(LD) -AS_IF([test "$GCC" = yes], [ - linker_flag=-Wl, - : ${optflags=-O3} - gcc_major=`echo =__GNUC__ | $CC -E -xc - | sed '/^=/!d;s///'` - gcc_minor=`echo =__GNUC_MINOR__ | $CC -E -xc - | sed '/^=/!d;s///'` - test -n "$gcc_major" || gcc_major=0 - test -n "$gcc_minor" || gcc_minor=0 - # RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"]) -], [ - linker_flag= -]) - -RUBY_PROG_GNU_LD -RUBY_CPPOUTFILE - -: ${OUTFLAG='-o '} -: ${COUTFLAG=${OUTFLAG}} -: ${CSRCFLAG=''} -AC_SUBST(OUTFLAG) -AC_SUBST(COUTFLAG) -AC_SUBST(CSRCFLAG) - -cc_version= -for option in --version -v -V -qversion; do - cc_version_message=`$CC $option 2>&1` - cc_version_status=$? - AS_CASE($cc_version_status, [0], [:], [continue]) - AS_CASE($cc_version_message, [*Warning*], [continue]) - cc_version='$(CC) '$option - break -done -AC_SUBST(CC_VERSION, $cc_version) -AC_SUBST(CC_VERSION_MESSAGE, $cc_v (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/