diff options
author | John Koleszar <jkoleszar@google.com> | 2010-05-26 15:57:42 -0400 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2010-05-27 12:58:54 -0400 |
commit | 670af3aa595245b2cb7bbf911a49bfc4af2aa6ac (patch) | |
tree | 17bfaf4dc3feb1b543a8d828c9c02f3eb4556a0b /build/make/configure.sh | |
parent | c3c870ed740427859d25e5991fdadcfeed99fb5f (diff) | |
download | libvpx-670af3aa595245b2cb7bbf911a49bfc4af2aa6ac.tar libvpx-670af3aa595245b2cb7bbf911a49bfc4af2aa6ac.tar.gz libvpx-670af3aa595245b2cb7bbf911a49bfc4af2aa6ac.tar.bz2 libvpx-670af3aa595245b2cb7bbf911a49bfc4af2aa6ac.zip |
configure: support --prefix, --libdir
Support --prefix, --libdir as a conventional way of specifying the default
installation directories. libdir is required to be a subdirectory of prefix
at this time.
Change-Id: If45d9e3129efcde83c05b7766accc9017988e715
Diffstat (limited to 'build/make/configure.sh')
-rwxr-xr-x | build/make/configure.sh | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh index 62d8b6497..26c6af073 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -442,7 +442,13 @@ process_common_cmdline() { disable builtin_libc alt_libc="${optval}" ;; - --libc) + --prefix=*) + prefix="${optval}" + ;; + --libdir=*) + libdir="${optval}" + ;; + --libc|--prefix|--libdir) die "Option ${opt} requires argument" ;; --help|-h) show_help @@ -463,6 +469,18 @@ process_cmdline() { done } + +post_process_common_cmdline() { + prefix="${prefix:-/usr/local}" + prefix="${prefix%/}" + libdir="${libdir:-${prefix}/lib}" + libdir="${libdir%/}" + if [ "${libdir#${prefix}}" == "${libdir}" ]; then + die "Libdir ${libdir} must be a subdirectory of ${prefix}" + fi +} + + post_process_cmdline() { true; } @@ -880,8 +898,8 @@ process_toolchain() { } print_config_mk() { - prefix=$1 - makefile=$2 + local prefix=$1 + local makefile=$2 shift 2 for cfg; do upname="`toupper $cfg`" @@ -892,8 +910,8 @@ print_config_mk() { } print_config_h() { - prefix=$1 - header=$2 + local prefix=$1 + local header=$2 shift 2 for cfg; do upname="`toupper $cfg`" @@ -924,6 +942,7 @@ process() { else echo "# ${self} $@" > ${logfile} fi + post_process_common_cmdline post_process_cmdline process_toolchain process_detect |