2 # Run this to generate all the initial makefiles,
3 # etc. just after a checkout.
7 alias make=${MAKE:-make}
11 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
13 echo "**Error**: You must have \`autoconf' installed to compile tinc."
14 echo "Download the appropriate package for your distribution,"
15 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
19 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
20 (libtool --version) < /dev/null > /dev/null 2>&1 || {
22 echo "**Error**: You must have \`libtool' installed to compile tinc."
23 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
24 echo "(or a newer version if it is available)"
29 grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
30 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
31 (gettext --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`gettext' installed to compile tinc."
34 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
35 echo "(or a newer version if it is available)"
40 grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
41 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
42 (gettext --version) < /dev/null > /dev/null 2>&1 || {
44 echo "**Error**: You must have \`gettext' installed to compile tinc."
45 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
46 echo "(or a newer version if it is available)"
51 (automake --version) < /dev/null > /dev/null 2>&1 || {
53 echo "**Error**: You must have \`automake' installed to compile tinc."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
55 echo "(or a newer version if it is available)"
61 # if no automake, don't bother testing for aclocal
62 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
64 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
65 echo "installed doesn't appear recent enough."
66 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
67 echo "(or a newer version if it is available)"
71 if test "$DIE" -eq 1; then
76 echo "**Warning**: I am going to run \`configure' with no arguments."
77 echo "If you wish to pass any to it, please specify them on the"
78 echo \`$0\'" command line."
84 am_opt=--include-deps;;
87 for coin in `find $srcdir -name configure.in -print`
90 if test -f $dr/NO-AUTO-GEN; then
91 echo skipping $dr -- flagged as no auto-gen
94 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
96 aclocalinclude="$ACLOCAL_FLAGS"
97 for k in $macrodirs; do
99 if test -f $k/Makefile.am.in; then
100 make -C $k -f Makefile.am.in Makefile.am
102 aclocalinclude="$aclocalinclude -I $k"
104 ## echo "**Warning**: No such directory \`$k'. Ignored."
108 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
109 if grep "sed.*POTFILES" configure.in >/dev/null; then
110 : do nothing -- we still have an old unmodified configure.in
112 echo "Creating $dr/aclocal.m4 ..."
113 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
114 echo "Running gettextize... Ignore non-fatal messages."
115 echo "no" | gettextize --force --copy
116 echo "Making $dr/aclocal.m4 writable ..."
117 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
120 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
121 echo "Creating $dr/aclocal.m4 ..."
122 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
123 echo "Running gettextize... Ignore non-fatal messages."
124 echo "no" | gettextize --force --copy
125 echo "Making $dr/aclocal.m4 writable ..."
126 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
128 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
129 echo "Running libtoolize..."
130 libtoolize --force --copy
132 echo "Running aclocal $aclocalinclude ..."
133 aclocal $aclocalinclude
134 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
135 echo "Running autoheader..."
138 echo "Running automake --gnu $am_opt ..."
139 automake --add-missing --gnu $am_opt
140 echo "Running autoconf ..."
146 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
148 if test x$NOCONFIGURE = x; then
149 echo Running $srcdir/configure $conf_flags "$@" ...
150 $srcdir/configure $conf_flags "$@" \
151 && echo Now type \`make\' to compile $PKG_NAME || exit 1
153 echo Skipping configure process.