X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=autogen.sh;h=1209bd8e0045d7fb70f7eabdef1df0911dc9040d;hp=3c10a55ec693b0c4e13dd3f45142d4ba1766e115;hb=856de4c5fe8acd779aa9277d4554e34ff3625e97;hpb=f0101589959496593db672c6a35704ea5fb33238 diff --git a/autogen.sh b/autogen.sh index 3c10a55e..1209bd8e 100644 --- a/autogen.sh +++ b/autogen.sh @@ -1,13 +1,19 @@ #!/bin/sh -# Run this to generate all the initial makefiles, etc. +# Run this to generate all the initial makefiles, +# etc. just after a checkout. DIE=0 -srcdir="`pwd`" +if ${MAKE:-gmake} -q -C . autogen.sh 2> /dev/null +then + alias make=${MAKE:-gmake} +fi + +srcdir="`/bin/pwd`" (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo - echo "**Error**: You must have \`autoconf' installed to compile Gnome." + echo "**Error**: You must have \`autoconf' installed to compile tinc." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 @@ -16,7 +22,7 @@ srcdir="`pwd`" (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo - echo "**Error**: You must have \`libtool' installed to compile Gnome." + echo "**Error**: You must have \`libtool' installed to compile tinc." echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" echo "(or a newer version if it is available)" DIE=1 @@ -27,7 +33,7 @@ grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ (gettext --version) < /dev/null > /dev/null 2>&1 || { echo - echo "**Error**: You must have \`gettext' installed to compile Gnome." + echo "**Error**: You must have \`gettext' installed to compile tinc." echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" echo "(or a newer version if it is available)" DIE=1 @@ -38,7 +44,7 @@ grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ (gettext --version) < /dev/null > /dev/null 2>&1 || { echo - echo "**Error**: You must have \`gettext' installed to compile Gnome." + echo "**Error**: You must have \`gettext' installed to compile tinc." echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" echo "(or a newer version if it is available)" DIE=1 @@ -47,7 +53,7 @@ grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { (automake --version) < /dev/null > /dev/null 2>&1 || { echo - echo "**Error**: You must have \`automake' installed to compile Gnome." + echo "**Error**: You must have \`automake' installed to compile tinc." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 @@ -93,19 +99,23 @@ do aclocalinclude="$ACLOCAL_FLAGS" for k in $macrodirs; do if test -d $k; then + if test -f $k/Makefile.am.in; then + make -C $k -f Makefile.am.in Makefile.am + fi aclocalinclude="$aclocalinclude -I $k" ##else ## echo "**Warning**: No such directory \`$k'. Ignored." fi done + touch ChangeLog if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then if grep "sed.*POTFILES" configure.in >/dev/null; then : do nothing -- we still have an old unmodified configure.in else echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running gettextize... Ignore non-fatal messages." - echo "no" | gettextize --force --copy + echo "Running autopoint..." + autopoint --force echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi @@ -113,8 +123,8 @@ do if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running gettextize... Ignore non-fatal messages." - echo "no" | gettextize --force --copy + echo "Running autopoint..." + autopoint --force echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi