[libpng16] Rewrote autogen.sh to run autoreconf

instead of running tools one-by-one.
This commit is contained in:
John Bowler 2012-01-25 08:30:24 -06:00 committed by Glenn Randers-Pehrson
parent 1eb2c48458
commit da2194c0d5
3 changed files with 52 additions and 30 deletions

View File

@ -132,6 +132,7 @@ Version 1.6.0beta07 [January 25, 2012]
gcc configure option by allowing -Werror to be turned on safely; without gcc configure option by allowing -Werror to be turned on safely; without
the option the tests written in configure itself fail compilation because the option the tests written in configure itself fail compilation because
they cause compiler warnings. they cause compiler warnings.
Rewrote autogen.sh to run autoreconf instead of running tools one-by-one.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -3883,6 +3883,7 @@ Version 1.6.0beta07 [January 25, 2012]
gcc configure option by allowing -Werror to be turned on safely; without gcc configure option by allowing -Werror to be turned on safely; without
the option the tests written in configure itself fail compilation because the option the tests written in configure itself fail compilation because
they cause compiler warnings. they cause compiler warnings.
Rewrote autogen.sh to run autoreconf instead of running tools one-by-one.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -1,34 +1,54 @@
#! /bin/sh #! /bin/sh
# a quick hack script to generate necessary files from
# auto* tools.
# #
# WARNING: if you run this you will change the versions # Run 'autoreconf' to build 'configure', 'Makefile.in' and other configure
# of the tools which are used and, maybe, required! # control files.
args=
force=
init=
while test $# -gt 0
do
case "$1" in
-f|--force)
force=1
args="$args $1";;
# You can define your own replacements in your environment. -V|--version)
# $AUTOCONF, $AUTOMAKE, $AUTOHEADER, $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE sed -n -e \
'/PNG_HEADER_VERSION_STRING/,+1s/^[^"]*" \([^"]*\).."[^"]*$/\1/p' \
png.h
exit 0;;
touch Makefile.am configure.ac --init)
{ init=1;;
LT=${LIBTOOLIZE-libtoolize}
echo "running $LT" >&2 -h|--help)
$LT --force --copy --automake echo "$0: run autoreconf to update configure files" >&2
} && { echo " options:" >&2
AL=${ACLOCAL-aclocal} echo " --version: print the version of this libpng" >&2
echo "running $AL" >&2 echo " --force: ignore date stamps and make all files" >&2
$AL echo " --init: do a complete re-initialization" >&2
} && { echo " others: passed to autoreconf, use autoreconf --help" >&2
AH=${AUTOHEADER-autoheader} exit 1;;
echo "running $AH [ignore the warnings]" >&2
$AH *)
} && { args="$args $1";;
AM=${AUTOMAKE-automake} esac
echo "running $AM" >&2
$AM --force-missing --foreign -a -c shift
} && { done
AC=${AUTOCONF-autoconf}
echo "running $AC" >&2 if test -r configure -a -z "$init"
$AC then
} && # Configure exists, either an update or a tarball distribution
echo "autogen complete" >&2 || if test ! -d .git -a -z "$force"
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2 then
echo "autogen: running with --force to update a non-GIT distribution" >&2
args="--force $args"
fi
autoreconf --warnings=all $args
else
# No configure: assume this is a clean tree and everything needs to be
# generated
# autoupdate
autoreconf --warnings=all --force --install $args
fi