[vlc-devel] [PATCH] Fix boostrap for OpenSolaris automake packages
Francois Cartegnie
fcvlcdev at free.fr
Tue Jun 23 21:14:03 CEST 2009
---
bootstrap | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/bootstrap b/bootstrap
index c32c183..45c195d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -30,6 +30,49 @@ cd "$(dirname "$0")"
ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
+
+## checks if $FOO or sets $FOO to /[s]bin/foo[.*]
+var_check()
+{
+for varname in $@; do
+ envvarname=`echo ${varname}|tr [a-z] [A-Z]`
+ targetvalue=`eval echo \\\$\${envvarname}`
+
+ if test -z ${targetvalue}; then
+ GUESS="`which ${varname} 2>/dev/null`"
+ if test -z $GUESS; then
+ for i in "`find /usr/bin/ /bin/ | grep '/'${varname}'.*$' | head -n 1`"; do
+ if test -n $i -a -x $i; then
+ GUESS=$i
+ break
+ fi
+ done
+ if test -n $GUESS; then
+ echo "set ${envvarname} to: ${GUESS}"
+ eval ${envvarname}=$GUESS
+ export ${envvarname}
+ else
+ echo "Warning: ${varname} not found."
+ fi
+ fi
+ unset GUESS
+ else
+ echo "${envvarname} is ${targetvalue}"
+ fi
+ unset envvarname
+ unset targetvalue
+done
+}
+
+## Need some gnu-automake 1.10 checks
+## and try to fix paths for the user (OpenSolaris)
+if test ".`uname -s`" = ".SunOS"; then
+ set +e ; set +x
+ var_check aclocal automake;
+ set -e ; set -x
+fi
+
+
# Check for contrib directory
if test -d extras/contrib/bin; then
PATH="`pwd`/extras/contrib/bin:$PATH"
--
1.6.2.4
More information about the vlc-devel
mailing list