Skip to content
Snippets Groups Projects
Commit 6358b24f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

allow more evironment variables to control what tools to check for and use

parent b5863431
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ findtool(){ ...@@ -13,6 +13,7 @@ findtool(){
IFS=":" IFS=":"
for path in $PATH for path in $PATH
do do
# echo "checks for $file in $path" >&2
if test -f "$path/$file"; then if test -f "$path/$file"; then
echo "$path/$file" echo "$path/$file"
return return
...@@ -106,11 +107,16 @@ LIBTOOL_WANTED_VERSION=1.4.2 ...@@ -106,11 +107,16 @@ LIBTOOL_WANTED_VERSION=1.4.2
# glibtool, with 'libtool' being something completely different. # glibtool, with 'libtool' being something completely different.
libtool=`findtool glibtool 2>/dev/null` libtool=`findtool glibtool 2>/dev/null`
if test ! -x "$libtool"; then if test ! -x "$libtool"; then
libtool=`findtool libtool` libtool=`findtool ${LIBTOOL:-libtool}`
fi fi
# set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found if test -z "$LIBTOOLIZE"; then
LIBTOOLIZE="${libtool}ize" # set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found
# $libtool is already the full path
libtoolize="${libtool}ize"
else
libtoolize=`findtool $LIBTOOLIZE`
fi
lt_pversion=`$libtool --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'` lt_pversion=`$libtool --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
if test -z "$lt_pversion"; then if test -z "$lt_pversion"; then
...@@ -149,7 +155,7 @@ fi ...@@ -149,7 +155,7 @@ fi
echo "buildconf: libtool version $lt_version (ok)" echo "buildconf: libtool version $lt_version (ok)"
if test -f "$LIBTOOLIZE"; then if test -f "$libtoolize"; then
echo "buildconf: libtoolize found" echo "buildconf: libtoolize found"
else else
echo "buildconf: libtoolize not found. Weird libtool installation!" echo "buildconf: libtoolize not found. Weird libtool installation!"
...@@ -172,14 +178,14 @@ fi ...@@ -172,14 +178,14 @@ fi
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# perl check # perl check
# #
PERL=`findtool perl` PERL=`findtool ${PERL:-perl}`
# ------------------------------------------------------------ # ------------------------------------------------------------
# run the correct scripts now # run the correct scripts now
echo "buildconf: running libtoolize" echo "buildconf: running libtoolize"
${LIBTOOLIZE:-libtoolize} --copy --automake --force || die "The libtool command failed" $libtoolize --copy --automake --force || die "The libtoolize command failed"
echo "buildconf: running aclocal" echo "buildconf: running aclocal"
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed" ${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed"
if test -n "$PERL"; then if test -n "$PERL"; then
...@@ -199,7 +205,7 @@ ${AUTOCONF:-autoconf} || die "The autoconf command failed" ...@@ -199,7 +205,7 @@ ${AUTOCONF:-autoconf} || die "The autoconf command failed"
if test -d ares; then if test -d ares; then
cd ares cd ares
echo "buildconf: running ares/libtoolize" echo "buildconf: running ares/libtoolize"
${LIBTOOLIZE:-libtoolize} --copy --automake --force || die "The libtool command failed" $libtoolize --copy --automake --force || die "The libtoolize command failed"
echo "buildconf: running ares/aclocal" echo "buildconf: running ares/aclocal"
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The ares aclocal command failed" ${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The ares aclocal command failed"
echo "buildconf: running ares/autoconf" echo "buildconf: running ares/autoconf"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment