diff --git a/.gitignore b/.gitignore index e61d398..6620f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ stamp-h1 .deps .libs src/gtkballs +autoconf +autoconf-m4 diff --git a/Makefile.am b/Makefile.am index e3c4c7a..32e840b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,4 +16,4 @@ install-data-hook: if [ "${UID}" = 0 ]; then chgrp games $(DESTDIR)$(localstatedir)/gtkballs-scores; fi chmod 0664 $(DESTDIR)$(localstatedir)/gtkballs-scores -ACLOCAL_AMFLAGS = -I m4 +ACLOCAL_AMFLAGS = -I autoconf-m4 diff --git a/autogen.sh b/autogen.sh index dd1407f..09c84b5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -18,15 +18,26 @@ if test "$1" == "verbose" || test "$1" == "--verbose" ; then verbose2='--debug' fi +# pre-create some dirs / files +auxdir='.' +if grep -q "AC_CONFIG_AUX_DIR" configure.ac ; then + auxdir="$(grep AC_CONFIG_AUX_DIR configure.ac | cut -f 2 -d '[' | cut -f 1 -d ']')" +fi +mkdir -p ${auxdir} +touch ${auxdir}/config.rpath +m4dir="$(grep AC_CONFIG_MACRO_DIR configure.ac | cut -f 2 -d '[' | cut -f 1 -d ']')" +if test -n "$m4dir" ; then + mkdir -p ${m4dir} +fi + # Get all required m4 macros required for configure $LIBTOOLIZE ${verbose} --copy --force || exit 1 -$ACLOCAL ${verbose} -I m4 || exit 1 +$ACLOCAL ${verbose} || exit 1 # Generate config.h.in $AUTOHEADER ${verbose} --force || exit 1 # Generate Makefile.in's -touch config.rpath $AUTOMAKE ${verbose} --add-missing --copy --force || exit 1 if grep "IT_PROG_INTLTOOL" configure.ac >/dev/null ; then diff --git a/configure.ac b/configure.ac index 47670a1..92aad05 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,12 @@ # Process this file with autoconf to produce a configure script. AC_INIT([gtkballs],[3.1.5],[]) +AC_CONFIG_AUX_DIR([autoconf]) +AC_CONFIG_MACRO_DIR([autoconf-m4]) AM_INIT_AUTOMAKE([-Wall foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADER(config.h) -AC_CONFIG_MACRO_DIR([m4]) AM_GNU_GETTEXT([external]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) m4_ifdef([AM_MAINTAINER_MODE], [AM_MAINTAINER_MODE])