Files
znc/autogen.sh
psychon fde73c60fa Remove all generated/copied scripts from SVN
This commits removes all files which are generated by aclocal or autoconf or
copied from automake (yes, autoconf requires config.{guess,sub}, yet they are
part of automake!).

Instead, we now have a shell script autogen.sh which calls all the needed parts
in the right order (aclocal ; autoheader ; autoconf ; automake).

Additionally, configure.in is renamed to configure.ac because that seems to be
the more proper name for it. Let's see if anyone notices me sneaking this in. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2252 726aef4b-f618-498e-8847-2d620e286838
2011-01-07 16:34:13 +00:00

52 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# This is based on various examples which can be found everywhere.
set -e
FLAGS=${FLAGS--Wall}
ACLOCAL=${ACLOCAL-aclocal}
AUTOHEADER=${AUTOHEADER-autoheader}
AUTOCONF=${AUTOCONF-autoconf}
AUTOMAKE=${AUTOMAKE-automake}
ACLOCAL_FLAGS="${ACLOCAL_FLAGS} ${FLAGS}"
AUTOHEADER_FLAGS="${AUTOHEADER_FLAGS} ${FLAGS}"
AUTOCONF_FLAGS="${AUTOCONF_FLAGS} ${FLAGS}"
AUTOMAKE_FLAGS="${AUTOMAKE_FLAGS---add-missing} ${FLAGS}"
# Allow invocation from a separate build directory
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd "$srcdir"
die() {
echo "$@"
exit 1
}
do_cmd() {
echo "Running '$@'"
$@
}
test -f configure.ac || die "No $srcdir/configure.ac found."
# Generate aclocal.m4 for use by autoconf
do_cmd $ACLOCAL $ACLOCAL_FLAGS
# Generate zncconfig.h.in for configure
do_cmd $AUTOHEADER $AUTOHEADER_FLAGS
# Generate configure
do_cmd $AUTOCONF $AUTOCONF_FLAGS
# Copy config.sub, config.guess, install.sh, ...
# This will complain that we don't use automake, let's just ignore that
do_cmd $AUTOMAKE $AUTOMAKE_FLAGS || true
test -f config.guess -a -f config.sub -a -f install-sh ||
die "Automake didn't install config.guess, config.sub and install-sh!"
cd "$ORIGDIR" || exit 1
if test -z "$NOCONFIGURE"
then
do_cmd "$srcdir/configure" --cache-file=config.cache ${1+"$@"} || exit 1
fi