#! /bin/bash

if ! command -v otsb_cmd_configure > /dev/null; then

    otsb_cmd_configure () {

        declare -a opts
	if otsb_is_set default-config-opt
	then
            opts=( "${default_config_opt[@]}" )
	else
            opts=( "--prefix=$prefix" "--exec-prefix=$exec_prefix" )
	fi

        local -a cmd=( ./configure "${opts[@]}" "${config_opt[@]}" )
        _otsb_debug "running ${cmd[*]}"
        "${cmd[@]}"
    }

    _otsb_configure_options () {
	otsb_add_option array  config-opt 'extra options for configure; may be specified multiple times'
    }

    otsb_hook_push_fn_back options_before _otsb_configure_options

fi
