From 5919370363cd39a04bb3e848b1e15f9c2f1b3ce3 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 25 Feb 2013 04:12:45 +0000 Subject: configure.in: find Setup file automatically * configure.in (setup): find Setup file from target_os 1. by suffix (e.g. Setup.nacl, Setup.atheos), 2. by "platform" option (e.g. Setup.nt, Setup.emx), and 3. default Setup. And Setup.dj had been removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ configure.in | 31 ++++++++++++++++--------------- ext/Setup.emx | 2 ++ ext/Setup.nt | 1 + 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5d6bdbf9c..799a3ff543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Feb 25 13:12:39 2013 Nobuyoshi Nakada + + * configure.in (setup): find Setup file from target_os 1. by + suffix (e.g. Setup.nacl, Setup.atheos), 2. by "platform" + option (e.g. Setup.nt, Setup.emx), and 3. default Setup. And + Setup.dj had been removed. + Mon Feb 25 12:48:00 2013 Zachary Scott * thread.c: Document Thread::new, clean up ::fork and mention calling diff --git a/configure.in b/configure.in index 5fdac50fdc..c3477a3108 100644 --- a/configure.in +++ b/configure.in @@ -2580,21 +2580,22 @@ fi AC_SUBST(ENCOBJS) AC_SUBST(EXTOBJS) -AS_CASE(["$target_os"], - dnl OS/2 environment w/ Autoconf 2.1x for EMX - [os2-emx], [ - setup=Setup.emx - ], - [*djgpp*], [ - setup=Setup.dj - ], - [nacl], [ - setup=Setup.nacl - ], - [ - setup=Setup - ]) - +if test -f "$srcdir/ext/Setup.$target_os"; then + setup="Setup.$target_os" +else + setup= + for file in "$srcdir"/ext/Setup.*; do + AS_CASE(["$file"], [*~|*.bak|*.orig|*.rej|*.tmp], [continue]) + setup=`basename "$file"` + AS_CASE(["$target_os"], [`expr "$setup" : 'Setup.\(.*\)'`*], [break]) + platform=`sed '/^option *platform */!d;s///;s/|/*|/g;q' "$file"` + if test "x$platform" != x; then + eval "AS_CASE([\"\$target_os\"], [$platform*], [break])" + fi + setup= + done + : ${setup:=Setup} +fi AC_SUBST(setup) test x"$prefix" = xNONE && prefix=$ac_default_prefix diff --git a/ext/Setup.emx b/ext/Setup.emx index bf9e2e32f9..bd46a55ecb 100644 --- a/ext/Setup.emx +++ b/ext/Setup.emx @@ -1,3 +1,5 @@ +# OS/2 environment w/ Autoconf 2.1x for EMX +option platform os2-emx option nodynamic #Win32API diff --git a/ext/Setup.nt b/ext/Setup.nt index 8aec238152..7c778f88fb 100644 --- a/ext/Setup.nt +++ b/ext/Setup.nt @@ -1,3 +1,4 @@ +option platform cygwin|mingw|mswin #option nodynamic Win32API -- cgit v1.2.3