Skip to content

Commit

Permalink
make use of configuration options if not used already, update #1418
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Jan 7, 2013
1 parent a77e2f6 commit 002f57c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions scripts/functions/build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
;;
Expand All @@ -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
Expand Down

0 comments on commit 002f57c

Please sign in to comment.