blob: c7a6e51e760790a33c9b30124ca17360a69364b0 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001Upstream: not yet
2
3Fix configure to accept "--prefix=" (a blank prefix).
4
5--- libvpx-0.9.1/build/make/configure.sh.orig 2010-06-17 09:08:56.000000000 -0400
6+++ libvpx-0.9.1/build/make/configure.sh 2010-09-23 14:27:48.000000000 -0400
7@@ -444,6 +444,8 @@
8 ;;
9 --prefix=*)
10 prefix="${optval}"
11+ # Distinguish between "prefix not set" and "prefix set to ''"
12+ prefixset=1
13 ;;
14 --libdir=*)
15 libdir="${optval}"
16@@ -587,13 +587,23 @@ process_cmdline() {
17 }
18
19 post_process_common_cmdline() {
20- prefix="${prefix:-/usr/local}"
21+ if [ "$prefixset" != "1" ]
22+ then
23+ prefix=/usr/local
24+ fi
25+
26+ # Strip trailing slash
27 prefix="${prefix%/}"
28+
29 libdir="${libdir:-${prefix}/lib}"
30 libdir="${libdir%/}"
31- if [ "${libdir#${prefix}}" = "${libdir}" ]; then
32- die "Libdir ${libdir} must be a subdirectory of ${prefix}"
33- fi
34+
35+ case "$libdir" in
36+ "${prefix}/"*) ;;
37+ *)
38+ die "Libdir ${libdir} must be a subdirectory of ${prefix}"
39+ ;;
40+ esac
41 }
42
43 post_process_cmdline() {