summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-20 10:19:13 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-21 11:04:54 +0900
commit7341b1a53d868c3250b4c4699619ac369cd5d9ee (patch)
tree6deec6e648bbf1c5b98e07c02f83919bf7739152
parent2c96e04868477eaa1420945d57bf5b3adb521e84 (diff)
configure.ac: move program_transform_name
Historically `$program_transform_name` has been put in front of `AC_CANONICAL_TARGET`. Previous commit changes it, which affects the name of generated ruby binary when cross-compiling. I _guess_ the historical behaviour is a bug (name of ruby binary shall honour --target configure option I think), but anyways here I preserve that questionable way.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3433
-rw-r--r--configure.ac27
1 files changed, 13 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index b46d73f9286..7a56514ec7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,10 +71,23 @@ AC_SUBST(TEENY)
AC_SUBST(RUBY_API_VERSION, '$(MAJOR).$(MINOR)')
AC_SUBST(RUBY_PROGRAM_VERSION, '$(MAJOR).$(MINOR).$(TEENY)')
+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}')
+
dnl checks for alternative programs
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
+AC_ARG_PROGRAM
RUBY_RM_RECURSIVE
AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc], [never use gcc]),
@@ -177,18 +190,6 @@ AC_CHECK_TOOLS([OBJCOPY], [gobjcopy objcopy])
AC_CHECK_TOOLS([OBJDUMP], [gobjdump objdump])
AC_CHECK_TOOLS([STRIP], [gstrip strip], [:])
-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}')
-
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.
@@ -236,8 +237,6 @@ 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=