[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1131434 - /subversion/trunk/configure.ac

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Sat, 4 Jun 2011 14:44:23 -0500

On Sat, Jun 4, 2011 at 2:40 PM, Arfrever Frehtes Taifersar Arahesis
<Arfrever.FTA_at_gmail.com> wrote:
> 2011-06-04 18:50:09 stsp_at_apache.org napisał(a):
>> Author: stsp
>> Date: Sat Jun  4 16:50:08 2011
>> New Revision: 1131434
>>
>> URL: http://svn.apache.org/viewvc?rev=1131434&view=rev
>> Log:
>> * configure.ac: Look for ruby1.8 and ruby18 before looking for ruby.
>>    Do the same for rdoc. This order makes things easier for downstream
>>    packagers since on some systems (e.g. OpenBSD) ruby binaries with
>>    numbers must be preferred during package builds (so users are free
>>    to point the default 'ruby' name at something else without affecting
>>    package compilation).
>>
>> Modified:
>>     subversion/trunk/configure.ac
>>
>> Modified: subversion/trunk/configure.ac
>> URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1131434&r1=1131433&r2=1131434&view=diff
>> ==============================================================================
>> --- subversion/trunk/configure.ac (original)
>> +++ subversion/trunk/configure.ac Sat Jun  4 16:50:08 2011
>> @@ -1084,12 +1084,12 @@ SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
>>
>>  AC_PATH_PROG(PERL, perl, none)
>>
>> -AC_PATH_PROGS(RUBY, ruby ruby1.8, none)
>> +AC_PATH_PROGS(RUBY, ruby1.8 ruby18 ruby, none)
>>  if test "$RUBY" != "none"; then
>>    AC_MSG_CHECKING([rb_hash_foreach])
>>    if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' >/dev/null; then
>>      AC_MSG_RESULT([yes])
>> -    AC_PATH_PROG(RDOC, rdoc, none)
>> +    AC_PATH_PROGS(RDOC, rdoc1.8 rdoc18 rdoc, none)
>>      AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
>>      svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MAJOR))'`"
>>      ])
>
> Some users might have multiple Ruby interpreters available (e.g. /usr/bin/ruby18 and /usr/bin/ruby19)
> and /usr/bin/ruby symlink pointing to e.g. ruby19. This revision breaks detection of requested Ruby
> interpreter in such situations.

I thought the same thing. As users typically call 'ruby' to run the
interpreter, we should prefer that over another potential name.

>
> I suggest to use:
> AC_PATH_PROGS(RUBY, $RUBY ruby, none)
> AC_PATH_PROG(RDOC, $RDOC rdoc, none)
>
> OpenBSD packagers will have to set RUBY and RDOC variables when calling `./configure`.
>
> If versioned executables are still needed in the list, then following could be used:
> AC_PATH_PROGS(RUBY, $RUBY ruby ruby1.9 ruby19 ruby1.8 ruby18, none)
> AC_PATH_PROG(RDOC, $RDOC rdoc rdoc1.9 rdoc19 rdoc1.8 rdoc18, none)
>
> (Personally I prefer the variant without versioned executables.)
>
> --
> Arfrever Frehtes Taifersar Arahesis
>
Received on 2011-06-04 21:44:57 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.