2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
7 PKG_NAME="PLD Linux Distribution rc-scripts"
12 (test -f $srcdir/configure.ac \
13 && test -d $srcdir/src) || {
14 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
15 echo " top-level rc-scripts directory"
22 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
24 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
25 echo "Download the appropriate package for your distribution,"
26 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
30 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
31 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
34 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
35 echo "(or a newer version if it is available)"
40 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
41 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
42 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
44 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
45 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.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 $PKG_NAME."
54 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.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://sourceware.cygnus.com/pub/automake/automake-1.4-p4.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.ac -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 aclocalinclude="$aclocalinclude -I $k"
101 ## echo "**Warning**: No such directory \`$k'. Ignored."
104 if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
105 if grep "sed.*POTFILES" configure.ac >/dev/null; then
106 : do nothing -- we still have an old unmodified configure.ac
108 echo "Creating $dr/aclocal.m4 ..."
109 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
110 echo "Running gettextize... Ignore non-fatal messages."
111 echo "no" | gettextize --force --copy
112 echo "Making $dr/aclocal.m4 writable ..."
113 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
116 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
117 echo "Running libtoolize..."
118 libtoolize --force --copy
120 echo "Running aclocal $aclocalinclude ..."
121 aclocal $aclocalinclude
122 if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
123 echo "Running autoheader..."
126 echo "Running autoconf ..."
128 echo "Running automake --gnu $am_opt ..."
129 automake --add-missing --gnu $am_opt
134 conf_flags="" #--enable-maintainer-mode --enable-compile-warnings --enable-iso-c
136 if test x$NOCONFIGURE = x; then
137 echo Running $srcdir/configure $conf_flags "$@" ...
138 $srcdir/configure $conf_flags "$@" \
139 && echo Now type \`make\' to compile $PKG_NAME
141 echo Skipping configure process.