comparison src/auto/configure @ 3843:dd0f25ede9a8 v7.3.679

updated for version 7.3.679 Problem: Ruby detection uses Config, newer Ruby versions use RbConfig. Solution: Detect the need to use RbConfig. (Vit Ondruch)
author Bram Moolenaar <bram@vim.org>
date Wed, 03 Oct 2012 21:09:35 +0200
parents de253f606048
children 233666f85933
comparison
equal deleted inserted replaced
3842:ec35376769a7 3843:dd0f25ede9a8
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5 6330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
6331 $as_echo_n "checking Ruby version... " >&6; } 6331 $as_echo_n "checking Ruby version... " >&6; }
6332 if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then 6332 if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6334 $as_echo "OK" >&6; } 6334 $as_echo "OK" >&6; }
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
6336 $as_echo_n "checking Ruby rbconfig... " >&6; }
6337 ruby_rbconfig="RbConfig"
6338 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
6339 ruby_rbconfig="Config"
6340 fi
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
6342 $as_echo "$ruby_rbconfig" >&6; }
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5 6343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
6336 $as_echo_n "checking Ruby header files... " >&6; } 6344 $as_echo_n "checking Ruby header files... " >&6; }
6337 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` 6345 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
6338 if test "X$rubyhdrdir" != "X"; then 6346 if test "X$rubyhdrdir" != "X"; then
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5 6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
6340 $as_echo "$rubyhdrdir" >&6; } 6348 $as_echo "$rubyhdrdir" >&6; }
6341 RUBY_CFLAGS="-I$rubyhdrdir" 6349 RUBY_CFLAGS="-I$rubyhdrdir"
6342 rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'` 6350 rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"`
6343 if test -d "$rubyhdrdir/$rubyarch"; then 6351 if test -d "$rubyhdrdir/$rubyarch"; then
6344 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" 6352 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
6345 fi 6353 fi
6346 rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'` 6354 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
6347 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" 6355 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
6348 rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` 6356 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
6349 if test "X$rubylibs" != "X"; then 6357 if test "X$rubylibs" != "X"; then
6350 RUBY_LIBS="$rubylibs" 6358 RUBY_LIBS="$rubylibs"
6351 fi 6359 fi
6352 librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` 6360 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
6353 librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'` 6361 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
6354 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` 6362 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
6355 if test -f "$rubylibdir/$librubya"; then 6363 if test -f "$rubylibdir/$librubya"; then
6356 librubyarg="$librubyarg" 6364 librubyarg="$librubyarg"
6357 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" 6365 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
6358 elif test "$librubyarg" = "libruby.a"; then 6366 elif test "$librubyarg" = "libruby.a"; then
6359 librubyarg="-lruby" 6367 librubyarg="-lruby"
6361 fi 6369 fi
6362 6370
6363 if test "X$librubyarg" != "X"; then 6371 if test "X$librubyarg" != "X"; then
6364 RUBY_LIBS="$librubyarg $RUBY_LIBS" 6372 RUBY_LIBS="$librubyarg $RUBY_LIBS"
6365 fi 6373 fi
6366 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` 6374 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
6367 if test "X$rubyldflags" != "X"; then 6375 if test "X$rubyldflags" != "X"; then
6368 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` 6376 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6369 if test "X$rubyldflags" != "X"; then 6377 if test "X$rubyldflags" != "X"; then
6370 LDFLAGS="$rubyldflags $LDFLAGS" 6378 LDFLAGS="$rubyldflags $LDFLAGS"
6371 fi 6379 fi
6374 RUBY_OBJ="objects/if_ruby.o" 6382 RUBY_OBJ="objects/if_ruby.o"
6375 RUBY_PRO="if_ruby.pro" 6383 RUBY_PRO="if_ruby.pro"
6376 $as_echo "#define FEAT_RUBY 1" >>confdefs.h 6384 $as_echo "#define FEAT_RUBY 1" >>confdefs.h
6377 6385
6378 if test "$enable_rubyinterp" = "dynamic"; then 6386 if test "$enable_rubyinterp" = "dynamic"; then
6379 libruby=`$vi_cv_path_ruby -r rbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]'` 6387 libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
6380 $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h 6388 $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
6381 6389
6382 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS" 6390 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
6383 RUBY_LIBS= 6391 RUBY_LIBS=
6384 fi 6392 fi