3 # Run this to generate all the initial makefiles, etc.
6 test -z "$srcdir" && srcdir=.
8 PKG_NAME="PLD Linux Distribution rc-scripts"
10 if [ "$1" = "changelog" ]; then
18 (test -f $srcdir/configure.ac \
19 && test -d $srcdir/src) || {
20 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
21 echo " top-level rc-scripts directory"
28 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
30 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
31 echo "Download the appropriate package for your distribution,"
32 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
36 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
37 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
39 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
40 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
41 echo "(or a newer version if it is available)"
46 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
47 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
48 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
50 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
51 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
52 echo "(or a newer version if it is available)"
57 (automake --version) < /dev/null > /dev/null 2>&1 || {
59 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
60 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
61 echo "(or a newer version if it is available)"
67 # if no automake, don't bother testing for aclocal
68 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
70 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
71 echo "installed doesn't appear recent enough."
72 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
73 echo "(or a newer version if it is available)"
77 if test "$DIE" -eq 1; then
82 echo "**Warning**: I am going to run \`configure' with no arguments."
83 echo "If you wish to pass any to it, please specify them on the"
84 echo \`$0\'" command line."
90 am_opt=--include-deps;;
93 for coin in `find $srcdir -name configure.ac -print`
96 if test -f $dr/NO-AUTO-GEN; then
97 echo skipping $dr -- flagged as no auto-gen
100 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
102 aclocalinclude="$ACLOCAL_FLAGS"
103 for k in $macrodirs; do
105 aclocalinclude="$aclocalinclude -I $k"
107 ## echo "**Warning**: No such directory \`$k'. Ignored."
110 if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
111 if grep "sed.*POTFILES" configure.ac >/dev/null; then
112 : do nothing -- we still have an old unmodified configure.ac
114 echo "Creating $dr/aclocal.m4 ..."
115 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
116 echo "Running gettextize... Ignore non-fatal messages."
117 echo "no" | gettextize --force --copy
118 echo "Making $dr/aclocal.m4 writable ..."
119 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
122 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
123 echo "Running libtoolize..."
124 libtoolize --force --copy
126 echo "Running aclocal $aclocalinclude ..."
127 aclocal $aclocalinclude
128 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
129 echo "Running autoheader..."
132 echo "Running autoconf ..."
134 echo "Running automake --gnu $am_opt ..."
135 automake --add-missing --gnu $am_opt
140 conf_flags="" #--enable-maintainer-mode --enable-compile-warnings --enable-iso-c
142 if test x$NOCONFIGURE = x; then
143 echo Running $srcdir/configure $conf_flags "$@" ...
144 $srcdir/configure $conf_flags "$@" \
145 && echo Now type \`make\' to compile $PKG_NAME
147 echo Skipping configure process.