configure: Rename OSTYPE variable due to conflict with magic variable with same name on some shells/platforms

This commit is contained in:
Matthew Wild 2018-10-01 15:30:49 +01:00
parent 72c9822ae0
commit edba284071

17
configure vendored
View file

@ -150,9 +150,8 @@ do
;; ;;
--ostype) --ostype)
# TODO make this a switch? # TODO make this a switch?
OSTYPE="$value" OSPRESET="$value"
OSTYPE_SET=yes if [ "$OSPRESET" = "debian" ]; then
if [ "$OSTYPE" = "debian" ]; then
if [ "$LUA_SUFFIX_SET" != "yes" ]; then if [ "$LUA_SUFFIX_SET" != "yes" ]; then
LUA_SUFFIX="5.1"; LUA_SUFFIX="5.1";
LUA_SUFFIX_SET=yes LUA_SUFFIX_SET=yes
@ -165,7 +164,7 @@ do
LUA_INCDIR_SET=yes LUA_INCDIR_SET=yes
CFLAGS="$CFLAGS -ggdb" CFLAGS="$CFLAGS -ggdb"
fi fi
if [ "$OSTYPE" = "macosx" ]; then if [ "$OSPRESET" = "macosx" ]; then
LUA_INCDIR=/usr/local/include; LUA_INCDIR=/usr/local/include;
LUA_INCDIR_SET=yes LUA_INCDIR_SET=yes
LUA_LIBDIR=/usr/local/lib LUA_LIBDIR=/usr/local/lib
@ -173,14 +172,14 @@ do
CFLAGS="$CFLAGS -mmacosx-version-min=10.3" CFLAGS="$CFLAGS -mmacosx-version-min=10.3"
LDFLAGS="-bundle -undefined dynamic_lookup" LDFLAGS="-bundle -undefined dynamic_lookup"
fi fi
if [ "$OSTYPE" = "linux" ]; then if [ "$OSPRESET" = "linux" ]; then
LUA_INCDIR=/usr/local/include; LUA_INCDIR=/usr/local/include;
LUA_INCDIR_SET=yes LUA_INCDIR_SET=yes
LUA_LIBDIR=/usr/local/lib LUA_LIBDIR=/usr/local/lib
LUA_LIBDIR_SET=yes LUA_LIBDIR_SET=yes
CFLAGS="$CFLAGS -ggdb" CFLAGS="$CFLAGS -ggdb"
fi fi
if [ "$OSTYPE" = "freebsd" -o "$OSTYPE" = "openbsd" ]; then if [ "$OSPRESET" = "freebsd" -o "$OSPRESET" = "openbsd" ]; then
LUA_INCDIR="/usr/local/include/lua51" LUA_INCDIR="/usr/local/include/lua51"
LUA_INCDIR_SET=yes LUA_INCDIR_SET=yes
CFLAGS="-Wall -fPIC -I/usr/local/include" CFLAGS="-Wall -fPIC -I/usr/local/include"
@ -192,11 +191,11 @@ do
CC=cc CC=cc
LD=ld LD=ld
fi fi
if [ "$OSTYPE" = "openbsd" ]; then if [ "$OSPRESET" = "openbsd" ]; then
LUA_INCDIR="/usr/local/include"; LUA_INCDIR="/usr/local/include";
LUA_INCDIR_SET="yes" LUA_INCDIR_SET="yes"
fi fi
if [ "$OSTYPE" = "netbsd" ]; then if [ "$OSPRESET" = "netbsd" ]; then
LUA_INCDIR="/usr/pkg/include/lua-5.1" LUA_INCDIR="/usr/pkg/include/lua-5.1"
LUA_INCDIR_SET=yes LUA_INCDIR_SET=yes
LUA_LIBDIR="/usr/pkg/lib/lua/5.1" LUA_LIBDIR="/usr/pkg/lib/lua/5.1"
@ -204,7 +203,7 @@ do
CFLAGS="-Wall -fPIC -I/usr/pkg/include" CFLAGS="-Wall -fPIC -I/usr/pkg/include"
LDFLAGS="-L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -shared" LDFLAGS="-L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -shared"
fi fi
if [ "$OSTYPE" = "pkg-config" ]; then if [ "$OSPRESET" = "pkg-config" ]; then
if [ "$LUA_SUFFIX_SET" != "yes" ]; then if [ "$LUA_SUFFIX_SET" != "yes" ]; then
LUA_SUFFIX="5.1"; LUA_SUFFIX="5.1";
LUA_SUFFIX_SET=yes LUA_SUFFIX_SET=yes