Skip to content
Browse files

make use of configuration options if not used already, update #1418

  • Loading branch information...
1 parent a77e2f6 commit 002f57c1cf2df759634dcd12fe2cfec393c02ede @mpapis mpapis committed
Showing with 17 additions and 2 deletions.
  1. +17 −2 scripts/functions/build
View
19 scripts/functions/build
@@ -115,7 +115,6 @@ __rvm_update_configure_env()
__rvm_update_configure_opt_dir()
{
- #TODO add support for --with-opt-dir=...:... for > ruby-1.9.3-p286
case "$1" in
(ruby-head*|ruby-2*)
__rvm_update_configure_opt_dir_option "$2"
@@ -127,11 +126,14 @@ __rvm_update_configure_opt_dir()
(( __patchlevel < 297 ))
then
rvm_patch_names+=( cflags )
- __rvm_update_configure_opt_dir_flags "$2"
+ __rvm_update_configure_opt_dir_option_or_flags "$2"
else
__rvm_update_configure_opt_dir_option "$2"
fi
;;
+ (ruby-1.9*)
+ __rvm_update_configure_opt_dir_option_or_flags "$2"
+ ;;
(*)
__rvm_update_configure_opt_dir_flags "$2"
;;
@@ -144,6 +146,19 @@ __rvm_update_configure_opt_dir_option()
__rvm_array_add_or_update rvm_configure_flags --with-opt-dir= : "$1"
}
+__rvm_update_configure_opt_dir_option_or_flags()
+{
+ # Use option if first time - use flags if option available already
+ case " ${rvm_configure_flags[*]} " in
+ (*[[:space:]]--with-opt-dir=*)
+ ;;
+ __rvm_update_configure_opt_dir_flags "$@"
+ (*)
+ __rvm_update_configure_opt_dir_option "$@"
+ ;;
+ esac
+}
+
__rvm_update_configure_opt_dir_flags()
{
typeset __enable_rpath __lib_path

0 comments on commit 002f57c

Please sign in to comment.
Something went wrong with that request. Please try again.