mirror of
git://git.musl-libc.org/musl
synced 2025-01-18 12:50:58 +00:00
fix "configure --prefix=" and improve path/arg handling in configure
previously, empty string was treated as "use default". this is apparently not compatible with standard configure semantics where an empty prefix puts everything under /. the new logic should be a lot cleaner and not suffer from such issues.
This commit is contained in:
parent
efd4d87aa4
commit
3d9e3a309f
28
configure
vendored
28
configure
vendored
@ -50,9 +50,8 @@ fnmatch () { eval "case \"\$2\" in $1) return 0 ;; *) return 1 ;; esac" ; }
|
|||||||
cmdexists () { type "$1" >/dev/null 2>&1 ; }
|
cmdexists () { type "$1" >/dev/null 2>&1 ; }
|
||||||
trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
|
trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
|
||||||
|
|
||||||
setdir () {
|
stripdir () {
|
||||||
if eval "test -z \"\${$1}\"" ; then eval "$1=\$2"
|
while eval "fnmatch '*/' \"\${$1}\"" ; do eval "$1=\${$1%/}" ; done
|
||||||
else eval "fnmatch '*/' \"\${$1}\"" && eval "$1=\${$1%/}" ; fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tryflag () {
|
tryflag () {
|
||||||
@ -90,15 +89,15 @@ fi
|
|||||||
CFLAGS_C99FSE=
|
CFLAGS_C99FSE=
|
||||||
CFLAGS_AUTO=
|
CFLAGS_AUTO=
|
||||||
LDFLAGS_AUTO=
|
LDFLAGS_AUTO=
|
||||||
prefix=
|
prefix=/usr/local/musl
|
||||||
exec_prefix=
|
exec_prefix='$(prefix)'
|
||||||
bindir=
|
bindir='$(exec_prefix)/bin'
|
||||||
libdir=
|
libdir='$(prefix)/lib'
|
||||||
includedir=
|
includedir='$(prefix)/include'
|
||||||
syslibdir=
|
syslibdir='/lib'
|
||||||
target=
|
target=
|
||||||
debug=no
|
debug=no
|
||||||
warnings=
|
warnings=no
|
||||||
shared=yes
|
shared=yes
|
||||||
static=yes
|
static=yes
|
||||||
|
|
||||||
@ -135,12 +134,9 @@ LIBCC=*) LIBCC=${arg#*=} ;;
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
setdir prefix /usr/local/musl
|
for i in prefix exec_prefix bindir libdir includedir syslibdir ; do
|
||||||
setdir exec_prefix '$(prefix)'
|
stripdir $i
|
||||||
setdir bindir '$(exec_prefix)/bin'
|
done
|
||||||
setdir libdir '$(prefix)/lib'
|
|
||||||
setdir includedir '$(prefix)/include'
|
|
||||||
setdir syslibdir '/lib'
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get a temp filename we can use
|
# Get a temp filename we can use
|
||||||
|
Loading…
Reference in New Issue
Block a user