@@ -1489,7 +1489,7 @@ Optional Features:
14891489 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
14901490 --enable-tclinterp Include Tcl interpreter.
14911491 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
1492- --enable-ruby19interp=OPTS Include Ruby1.9 interpreter. default=no OPTS=no/dynamic
1492+ --enable-ruby19interp=OPTS Include Ruby interpreter. default=no OPTS=no/dynamic
14931493 --enable-cscope Include cscope interface.
14941494 --enable-workshop Include Sun Visual Workshop support.
14951495 --disable-netbeans Disable NetBeans integration support.
@@ -1538,7 +1538,7 @@ Optional Packages:
15381538 --with-python3-config-dir=PATH Python's config directory
15391539 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
15401540 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
1541- --with-ruby19-command=RUBY19 name of the Ruby command (default: ruby1.9 )
1541+ --with-ruby19-command=RUBY name of the Ruby command (default: ruby )
15421542 --with-x use the X Window System
15431543 --with-gnome-includes=DIR Specify location of GNOME headers
15441544 --with-gnome-libs=DIR Specify location of GNOME libs
@@ -7316,21 +7316,21 @@ fi
73167316$as_echo " $enable_ruby19interp " >&6 ; }
73177317if test " $enable_ruby19interp " = " dynamic" ; then
73187318 if test " $enable_rubyinterp " ! = " dynamic" ; then
7319- as_fn_error $? " --enable-ruby19interp=dynamic requires --enable-rubyinterp=dynamic" " $LINENO " 5
7319+ as_fn_error $? " --enable-ruby19interp=dynamic requires --enable-rubyinterp=dynamic" " $LINENO " 5
73207320 fi
73217321 { $as_echo " $as_me :${as_lineno-$LINENO } : checking --with-ruby19-command argument" >&5
73227322$as_echo_n " checking --with-ruby19-command argument... " >&6 ; }
73237323
7324+
73247325# Check whether --with-ruby19-command was given.
73257326if test " ${with_ruby19_command+set} " = set ; then :
7326- withval=$with_ruby19_command ; RUBY19_CMD=" $withval " ; { $as_echo " $as_me :${as_lineno-$LINENO } : result: $RUBY19_CMD " >&5
7327+ withval=$with_ruby19_command ; RUBY19_CMD=" $withval " ; vi_cv_path_ruby19= " $withval " ; { $as_echo " $as_me :${as_lineno-$LINENO } : result: $RUBY19_CMD " >&5
73277328$as_echo " $RUBY19_CMD " >&6 ; }
73287329else
7329- RUBY19_CMD=" ruby1.9 " ; { $as_echo " $as_me :${as_lineno-$LINENO } : result: defaulting to $RUBY19_CMD " >&5
7330+ RUBY19_CMD=" ruby " ; { $as_echo " $as_me :${as_lineno-$LINENO } : result: defaulting to $RUBY19_CMD " >&5
73307331$as_echo " defaulting to $RUBY19_CMD " >&6 ; }
73317332fi
73327333
7333-
73347334 # Extract the first word of "$RUBY19_CMD", so it can be a program name with args.
73357335set dummy $RUBY19_CMD ; ac_word=$2
73367336{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
@@ -7377,49 +7377,56 @@ $as_echo_n "checking Ruby19 version... " >&6; }
73777377 if $vi_cv_path_ruby19 -e ' (VERSION rescue RUBY_VERSION) >= "1.9.0" or exit 1' > /dev/null 2> /dev/null; then
73787378 { $as_echo " $as_me :${as_lineno-$LINENO } : result: OK" >&5
73797379$as_echo " OK" >&6 ; }
7380- { $as_echo " $as_me :${as_lineno-$LINENO } : checking Ruby19 header files" >&5
7381- $as_echo_n " checking Ruby19 header files... " >&6 ; }
7382- ruby19hdrdir=` $vi_cv_path_ruby19 -r mkmf -e ' print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2> /dev/null`
7380+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking Ruby rbconfig" >&5
7381+ $as_echo_n " checking Ruby rbconfig... " >&6 ; }
7382+ ruby19_rbconfig=" RbConfig"
7383+ if ! $vi_cv_path_ruby19 -r rbconfig -e ' RbConfig' > /dev/null 2> /dev/null; then
7384+ ruby19_rbconfig=" Config"
7385+ fi
7386+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ruby19_rbconfig " >&5
7387+ $as_echo " $ruby19_rbconfig " >&6 ; }
7388+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking Ruby header files" >&5
7389+ $as_echo_n " checking Ruby header files... " >&6 ; }
7390+ ruby19hdrdir=` $vi_cv_path_ruby19 -r mkmf -e " print $ruby19_rbconfig ::CONFIG['rubyhdrdir'] || $ruby19_rbconfig ::CONFIG['archdir'] || \\ $hdrdir " 2> /dev/null`
73837391 if test " X$ruby19hdrdir " ! = " X" ; then
73847392 { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ruby19hdrdir " >&5
73857393$as_echo " $ruby19hdrdir " >&6 ; }
73867394 RUBY19_CFLAGS=" -I$ruby19hdrdir "
7387- ruby19arch =` $vi_cv_path_ruby19 -r rbconfig -e ' print Config ::CONFIG["arch"] ' `
7388- if test -d " $ruby19hdrdir / $ruby19arch " ; then
7389- RUBY19_CFLAGS=" $RUBY19_CFLAGS -I$ruby19hdrdir / $ruby19arch "
7395+ ruby19archdir =` $vi_cv_path_ruby19 -r rbconfig -e " print ( $ruby19_rbconfig ::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby19_rbconfig ::CONFIG['rubyarchhdrdir'] : ' $ruby19hdrdir /'+ $ruby19_rbconfig ::CONFIG['arch'] " `
7396+ if test -d " $ruby19archdir " ; then
7397+ RUBY19_CFLAGS=" $RUBY19_CFLAGS -I$ruby19archdir "
73907398 fi
7391- ruby19version=` $vi_cv_path_ruby19 -r rbconfig -e ' print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]' `
7399+ ruby19version=` $vi_cv_path_ruby19 -r rbconfig -e " print $ruby19_rbconfig ::CONFIG['ruby19_version'].gsub(/\./, '')[0,2]" `
7400+ if test " X$ruby19version " = " X" ; then
7401+ ruby19version=` $vi_cv_path_ruby19 -e " print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]" `
7402+ fi
73927403 RUBY19_CFLAGS=" $RUBY19_CFLAGS -DRUBY19_VERSION=$ruby19version "
7393- ruby19libs=` $vi_cv_path_ruby19 -r rbconfig -e ' print Config ::CONFIG[" LIBS"] ' `
7404+ ruby19libs=` $vi_cv_path_ruby19 -r rbconfig -e " print $ruby19_rbconfig ::CONFIG[' LIBS'] " `
73947405 if test " X$ruby19libs " ! = " X" ; then
73957406 RUBY19_LIBS=" $ruby19libs "
73967407 fi
7397- libruby19arg=` $vi_cv_path_ruby19 -r rbconfig -e ' print Config.expand(Config::CONFIG["LIBRUBYARG"])' `
7398- if test -f " $ruby19hdrdir /$libruby19arg " ; then
7399- libruby19arg=" $ruby19hdrdir /$libruby19arg "
7400- else
7401- ruby19libdir=` $vi_cv_path_ruby19 -r rbconfig -e ' print Config.expand(Config::CONFIG["libdir"])' `
7402- if test -d " /System/Library/Frameworks/Ruby19.framework" ; then
7403- RUBY19_LIBS=" -framework Ruby19"
7404- RUBY19_CFLAGS=
7408+ libruby19arg=` $vi_cv_path_ruby19 -r rbconfig -e " print $ruby19_rbconfig .expand($ruby19_rbconfig ::CONFIG['LIBRUBYARG'])" `
7409+ libruby19a=` $vi_cv_path_ruby19 -r rbconfig -e " print $ruby19_rbconfig .expand($ruby19_rbconfig ::CONFIG['LIBRUBY_A'])" `
7410+ ruby19libdir=` $vi_cv_path_ruby19 -r rbconfig -e " print $ruby19_rbconfig .expand($ruby19_rbconfig ::CONFIG['libdir'])" `
7411+ if test -f " $ruby19libdir /$libruby19a " ; then
7412+ libruby19arg=" $libruby19arg "
7413+ RUBY19_LIBS=" $RUBY19_LIBS -L$ruby19libdir "
7414+ elif test -d " /System/Library/Frameworks/Ruby.framework" ; then
7415+ RUBY19_LIBS=" -framework Ruby"
7416+ RUBY19_CFLAGS=" -DRUBY19_VERSION=$ruby19version -DRUBY19_FRAMEWORK"
74057417 libruby19arg=
7406- elif test -f " $ruby19libdir /$libruby19arg " ; then
7407- libruby19arg=" $ruby19libdir /$libruby19arg "
7408- elif test " $libruby19arg " = " libruby1.9.a" ; then
7409- libruby19arg=" -lruby1.9"
7410- else
7411- libruby19arg=` $vi_cv_path_ruby19 -r rbconfig -e " print '$libruby19arg '.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\" libdir\" ])}')" `
7412- fi
74137418 fi
74147419
74157420 if test " X$libruby19arg " ! = " X" ; then
74167421 RUBY19_LIBS=" $libruby19arg $RUBY19_LIBS "
74177422 fi
7418- ruby19ldflags=` $vi_cv_path_ruby19 -r rbconfig -e ' print Config ::CONFIG[" LDFLAGS"] ' `
7423+ ruby19ldflags=` $vi_cv_path_ruby19 -r rbconfig -e " print $ruby19_rbconfig ::CONFIG[' LDFLAGS'] " `
74197424 if test " X$ruby19ldflags " ! = " X" ; then
74207425 ruby19ldflags=` echo " $ruby19ldflags " | sed -e ' s/-arch\ ppc//' -e ' s/-arch\ i386//' -e ' s/-arch\ x86_64//' `
74217426 if test " X$ruby19ldflags " ! = " X" ; then
7422- LDFLAGS=" $ruby19ldflags $LDFLAGS "
7427+ if test " X` echo \" $LDFLAGS \" | $FGREP -e \" $ruby19ldflags \" ` " = " X" ; then
7428+ LDFLAGS=" $ruby19ldflags $LDFLAGS "
7429+ fi
74237430 fi
74247431 fi
74257432 if test " X$ruby19ldflags " ! = " X" ; then
@@ -7431,20 +7438,26 @@ $as_echo "$ruby19hdrdir" >&6; }
74317438
74327439 $as_echo " #define FEAT_RUBY19 1" >> confdefs.h
74337440
7434- libruby19=` $vi_cv_path_ruby19 -r rbconfig -e ' puts Config::CONFIG["LIBRUBY_SO"]' `
7435- $as_echo " #define DYNAMIC_RUBY19 1" >> confdefs.h
7441+ if test " $enable_ruby19interp " = " dynamic" ; then
7442+ libruby19=` $vi_cv_path_ruby19 -r rbconfig -e " puts $ruby19_rbconfig ::CONFIG['LIBRUBY_SO']" `
7443+ $as_echo " #define DYNAMIC_RUBY19 1" >> confdefs.h
74367444
7437- RUBY19_CFLAGS=" -DDYNAMIC_RUBY19_DLL=\\\" $libruby19 \\\" -DDYNAMIC_RUBY19_VER=$ruby19version $RUBY19_CFLAGS "
7438- RUBY19_LIBS=
7445+ RUBY19_CFLAGS=" -DDYNAMIC_RUBY19_DLL=\\\" $libruby19 \\\" -DDYNAMIC_RUBY19_VER=$ruby19version $RUBY19_CFLAGS "
7446+ RUBY19_LIBS=
7447+ fi
74397448 else
7440- { $as_echo " $as_me :${as_lineno-$LINENO } : result: not found; disabling Ruby19 " >&5
7441- $as_echo " not found; disabling Ruby19 " >&6 ; }
7449+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: not found; disabling Ruby " >&5
7450+ $as_echo " not found; disabling Ruby " >&6 ; }
74427451 fi
74437452 else
7444- { $as_echo " $as_me :${as_lineno-$LINENO } : result: too old; need Ruby19 version 1.9.0 or later" >&5
7445- $as_echo " too old; need Ruby19 version 1.9.0 or later" >&6 ; }
7453+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: too old; need Ruby version 1.9.0 or later" >&5
7454+ $as_echo " too old; need Ruby version 1.9.0 or later" >&6 ; }
74467455 fi
74477456 fi
7457+
7458+ if test " $fail_if_missing " = " yes" -a -z " $RUBY19_OBJ " ; then
7459+ as_fn_error $? " could not configure Ruby" " $LINENO " 5
7460+ fi
74487461fi
74497462
74507463
0 commit comments