Use the event log under Windows.
[tinc] / autogen.sh
index 3c10a55..ecdd701 100644 (file)
@@ -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
@@ -90,22 +96,14 @@ do
     echo processing $dr
     macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
     ( cd $dr
-      aclocalinclude="$ACLOCAL_FLAGS"
-      for k in $macrodirs; do
-       if test -d $k; then
-          aclocalinclude="$aclocalinclude -I $k"
-       ##else 
-       ##  echo "**Warning**: No such directory \`$k'.  Ignored."
-        fi
-      done
       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 +111,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
@@ -122,6 +120,18 @@ do
        echo "Running libtoolize..."
        libtoolize --force --copy
       fi
+      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
       echo "Running aclocal $aclocalinclude ..."
       aclocal $aclocalinclude
       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then