2 # Run this to generate all the initial makefiles,
3 # etc. just after a checkout.
9 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
11 echo "**Error**: You must have \`autoconf' installed to compile tinc."
12 echo "Download the appropriate package for your distribution,"
13 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
17 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
18 (libtool --version) < /dev/null > /dev/null 2>&1 || {
20 echo "**Error**: You must have \`libtool' installed to compile tinc."
21 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
22 echo "(or a newer version if it is available)"
27 grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
28 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
29 (gettext --version) < /dev/null > /dev/null 2>&1 || {
31 echo "**Error**: You must have \`gettext' installed to compile tinc."
32 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
33 echo "(or a newer version if it is available)"
38 grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
39 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
40 (gettext --version) < /dev/null > /dev/null 2>&1 || {
42 echo "**Error**: You must have \`gettext' installed to compile tinc."
43 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
44 echo "(or a newer version if it is available)"
49 (automake --version) < /dev/null > /dev/null 2>&1 || {
51 echo "**Error**: You must have \`automake' installed to compile tinc."
52 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
53 echo "(or a newer version if it is available)"
59 # if no automake, don't bother testing for aclocal
60 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
62 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
63 echo "installed doesn't appear recent enough."
64 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
65 echo "(or a newer version if it is available)"
69 if test "$DIE" -eq 1; then
73 # Make sure configure doesn't complain about old configuration
77 echo "**Warning**: I am going to run \`configure' with no arguments."
78 echo "If you wish to pass any to it, please specify them on the"
79 echo \`$0\'" command line."
85 am_opt=--include-deps;;
88 for coin in `find $srcdir -name configure.in -print`
91 if test -f $dr/NO-AUTO-GEN; then
92 echo skipping $dr -- flagged as no auto-gen
95 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
97 aclocalinclude="$ACLOCAL_FLAGS"
98 for k in $macrodirs; do
100 if test -f $k/Makefile.am.in; then
101 make -C $k -f Makefile.am.in Makefile.am
103 aclocalinclude="$aclocalinclude -I $k"
105 ## echo "**Warning**: No such directory \`$k'. Ignored."
109 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
110 if grep "sed.*POTFILES" configure.in >/dev/null; then
111 : do nothing -- we still have an old unmodified configure.in
113 echo "Creating $dr/aclocal.m4 ..."
114 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
115 echo "Running gettextize... Ignore non-fatal messages."
116 echo "no" | gettextize --force --copy
117 echo "Making $dr/aclocal.m4 writable ..."
118 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
121 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
122 echo "Creating $dr/aclocal.m4 ..."
123 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
124 echo "Running gettextize... Ignore non-fatal messages."
125 echo "no" | gettextize --force --copy
126 echo "Making $dr/aclocal.m4 writable ..."
127 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
129 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
130 echo "Running libtoolize..."
131 libtoolize --force --copy
133 echo "Running aclocal $aclocalinclude ..."
134 aclocal $aclocalinclude
135 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
136 echo "Running autoheader..."
139 echo "Running automake --gnu $am_opt ..."
140 automake --add-missing --gnu $am_opt
141 echo "Running autoconf ..."
147 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
149 if test x$NOCONFIGURE = x; then
150 echo Running $srcdir/configure $conf_flags "$@" ...
151 $srcdir/configure $conf_flags "$@" \
152 && echo Now type \`make\' to compile $PKG_NAME || exit 1
154 echo Skipping configure process.