Import updated script upstream

This commit is contained in:
Pierre Pronchery 2018-03-09 00:47:47 +01:00
parent c8e36e34a2
commit 72a0cd1fde

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
#$Id$ #$Id$
#Copyright (c) 2015-2017 Pierre Pronchery <khorben@defora.org> #Copyright (c) 2015-2018 Pierre Pronchery <khorben@defora.org>
# #
#Redistribution and use in source and binary forms, with or without #Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met: #modification, are permitted provided that the following conditions are met:
@ -26,6 +26,7 @@
#variables #variables
CONFIGSH="${0%/platform.sh}/config.sh" CONFIGSH="${0%/platform.sh}/config.sh"
DESTDIR=
PREFIX="/usr/local" PREFIX="/usr/local"
PROGNAME="platform.sh" PROGNAME="platform.sh"
SOEXT=".so" SOEXT=".so"
@ -39,9 +40,9 @@ _platform_library()
library="$1" library="$1"
libdir=$(_platform_variable "LIBDIR") libdir=$(_platform_variable "LIBDIR")
if [ -f "/lib/lib$library$SOEXT" \ if [ -f "$DESTDIR/lib/lib$library$SOEXT" \
-o -f "/usr/lib/lib$library$SOEXT" \ -o -f "$DESTDIR/usr/lib/lib$library$SOEXT" \
-o -f "$libdir/lib$library$SOEXT" ]; then -o -f "$DESTDIR$libdir/lib$library$SOEXT" ]; then
echo "-l$library" echo "-l$library"
fi fi
} }