2 # Run this to generate all the initial makefiles, etc.
5 PKG_NAME="the package."
9 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
11 echo "**Error**: You must have \`autoconf' installed to."
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."
21 echo "Get ftp://ftp.gnu.org/pub/gnu/"
22 echo "(or a newer version if it is available)"
27 (automake --version) < /dev/null > /dev/null 2>&1 || {
29 echo "**Error**: You must have \`automake' installed."
30 echo "Get ftp://ftp.gnu.org/pub/gnu/"
31 echo "(or a newer version if it is available)"
37 # if no automake, don't bother testing for aclocal
38 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
40 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
41 echo "installed doesn't appear recent enough."
42 echo "Get ftp://ftp.gnu.org/pub/gnu/"
43 echo "(or a newer version if it is available)"
47 if test "$DIE" -eq 1; then
52 echo "**Warning**: I am going to run \`configure' with no arguments."
53 echo "If you wish to pass any to it, please specify them on the"
54 echo \`$0\'" command line."
60 am_opt=--include-deps;;
63 for coin in `find $srcdir -name configure.in -a \( ! -regex '.*/\..*' \) -print`
66 if test -f $dr/NO-AUTO-GEN; then
67 echo skipping $dr -- flagged as no auto-gen
70 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
72 aclocalinclude="$ACLOCAL_FLAGS"
73 for k in $macrodirs; do
75 aclocalinclude="$aclocalinclude -I $k"
77 ## echo "**Warning**: No such directory \`$k'. Ignored."
80 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
81 if grep "sed.*POTFILES" configure.in >/dev/null; then
82 : do nothing -- we still have an old unmodified configure.in
84 echo "Creating $dr/aclocal.m4 ..."
85 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
86 echo "Running gettextize... Ignore non-fatal messages."
88 echo "Making $dr/aclocal.m4 writable ..."
89 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
92 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
93 echo "Creating $dr/aclocal.m4 ..."
94 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
95 echo "Running gettextize... Ignore non-fatal messages."
97 echo "Making $dr/aclocal.m4 writable ..."
98 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
100 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
101 echo "Running libtoolize..."
102 libtoolize --force --copy
104 echo "Running aclocal $aclocalinclude ..."
105 aclocal $aclocalinclude
106 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
107 echo "Running autoheader..."
110 echo "Running automake --gnu $am_opt ..."
111 automake --add-missing --gnu $am_opt
112 echo "Running autoconf ..."
118 #conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
120 if test x$NOCONFIGURE = x; then
121 echo Running $srcdir/configure $conf_flags "$@" ...
122 $srcdir/configure $conf_flags "$@" \
123 && echo Now type \`make\' to compile $PKG_NAME
125 echo Skipping configure process.