2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
7 PKG_NAME="TLD Linux rc-scripts"
9 if [ -x ./changelog.sh ]; then
12 echo "Error: missing script changelog.sh to generate ChangeLog" >&2
19 (test -f $srcdir/configure.ac \
20 && test -d $srcdir/src) || {
21 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
22 echo " top-level rc-scripts directory"
29 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
31 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
32 echo "Download the appropriate package for your distribution,"
33 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
37 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
38 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
40 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
41 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
42 echo "(or a newer version if it is available)"
47 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
48 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
49 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
51 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
52 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
53 echo "(or a newer version if it is available)"
58 (automake --version) < /dev/null > /dev/null 2>&1 || {
60 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
61 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
62 echo "(or a newer version if it is available)"
68 # if no automake, don't bother testing for aclocal
69 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
71 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
72 echo "installed doesn't appear recent enough."
73 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
74 echo "(or a newer version if it is available)"
78 if test "$DIE" -eq 1; then
83 echo "**Warning**: I am going to run \`configure' with no arguments."
84 echo "If you wish to pass any to it, please specify them on the"
85 echo \`$0\'" command line."
91 am_opt=--include-deps;;
94 for coin in `find $srcdir -name configure.ac -print`
97 if test -f $dr/NO-AUTO-GEN; then
98 echo skipping $dr -- flagged as no auto-gen
101 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
103 aclocalinclude="$ACLOCAL_FLAGS"
104 for k in $macrodirs; do
106 aclocalinclude="$aclocalinclude -I $k"
108 ## echo "**Warning**: No such directory \`$k'. Ignored."
111 if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
112 if grep "sed.*POTFILES" configure.ac >/dev/null; then
113 : do nothing -- we still have an old unmodified configure.ac
115 echo "Creating $dr/aclocal.m4 ..."
116 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
117 echo "Running gettextize... Ignore non-fatal messages."
118 echo "no" | gettextize --force --copy
119 echo "Making $dr/aclocal.m4 writable ..."
120 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
123 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
124 echo "Running libtoolize..."
125 libtoolize --force --copy
127 echo "Running aclocal $aclocalinclude ..."
128 aclocal $aclocalinclude
129 if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
130 echo "Running autoheader..."
133 echo "Running autoconf ..."
135 echo "Running automake --gnu $am_opt ..."
136 automake --add-missing --gnu $am_opt
141 conf_flags="" #--enable-maintainer-mode --enable-compile-warnings --enable-iso-c
143 if test x$NOCONFIGURE = x; then
144 echo Running $srcdir/configure $conf_flags "$@" ...
145 $srcdir/configure $conf_flags "$@" \
146 && echo Now type \`make\' to compile $PKG_NAME
148 echo Skipping configure process.