mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-13 10:20:28 +00:00
autogen.sh: Check for autoconf/automake wrapper scripts
For example OpenBSD uses a "autoconf" and "automake" wrapper script which tells the user to set AUTOCONF_VERSION and AUTOMAKE_VERSION environment variables. This patch enhances autogen.sh to not detect these wrapper scripts as regular autoconf/automake commands but to set the required environment variables after detecting the real "command-X.Y" commands. Tested on OpenBSD 5.1.
This commit is contained in:
parent
419ff38a07
commit
c891b5f250
19
autogen.sh
19
autogen.sh
@ -73,8 +73,12 @@ Search()
|
|||||||
for name in $searchlist; do
|
for name in $searchlist; do
|
||||||
$EXIST "${name}" >/dev/null 2>&1
|
$EXIST "${name}" >/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "${name}"
|
"${name}" --version 2>&1 \
|
||||||
return 0
|
| grep -v "environment variable" >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "${name}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -144,6 +148,15 @@ echo "Searching for required tools ..."
|
|||||||
[ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
|
[ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
|
||||||
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
|
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
|
||||||
|
|
||||||
|
AUTOCONF_VERSION=`echo $AUTOCONF | cut -d'-' -f2-`
|
||||||
|
[ -n "$AUTOCONF_VERSION" -a "$AUTOCONF_VERSION" != "autoconf" ] \
|
||||||
|
&& export AUTOCONF_VERSION || unset AUTOCONF_VERSION
|
||||||
|
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION"
|
||||||
|
AUTOMAKE_VERSION=`echo $AUTOMAKE | cut -d'-' -f2-`
|
||||||
|
[ -n "$AUTOMAKE_VERSION" -a "$AUTOMAKE_VERSION" != "automake" ] \
|
||||||
|
&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
|
||||||
|
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
|
||||||
|
|
||||||
[ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
|
[ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
|
||||||
[ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
|
[ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
|
||||||
|
|
||||||
@ -195,7 +208,7 @@ done
|
|||||||
export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
|
export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
|
||||||
|
|
||||||
# Generate files
|
# Generate files
|
||||||
echo "Generating files using GNU $AUTOCONF and $AUTOMAKE ..."
|
echo "Generating files using \"$AUTOCONF\" and \"$AUTOMAKE\" ..."
|
||||||
Run $ACLOCAL && \
|
Run $ACLOCAL && \
|
||||||
Run $AUTOCONF && \
|
Run $AUTOCONF && \
|
||||||
Run $AUTOHEADER && \
|
Run $AUTOHEADER && \
|
||||||
|
Loading…
Reference in New Issue
Block a user