3 # Run this to generate all the initial makefiles, etc.
6 test -z "$srcdir" && srcdir=.
10 PKG_NAME="PLD Linux Distribution rc-scripts"
12 if [ "$1" = "changelog" -a -x ~/bin/svn2log.py ]; then
13 rm -f ${TMPDIR:-/tmp}/svn2log.tmp
14 awk -F":" ' { login=$1; if ($3 != "") { name=$3 } else { name=$1 }; email=$2; printf "%s\t%s <%s@pld-linux.org>\n", login, name, login } ' ~/.CVS-PLD/CVSROOT/users > ${TMPDIR:-/tmp}/svn2log.tmp
15 svn log -v --xml | ~/bin/svn2log.py --domain "pld-linux.org" -p /rc-scripts/trunk -u ${TMPDIR:-/tmp}/svn2log.tmp --exclude ChangeLog -o ChangeLog
16 rm -f ${TMPDIR:-/tmp}/svn2log.tmp
21 (test -f $srcdir/configure.ac \
22 && test -d $srcdir/src) || {
23 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
24 echo " top-level rc-scripts directory"
31 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
34 echo "Download the appropriate package for your distribution,"
35 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
39 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
40 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
42 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
43 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
44 echo "(or a newer version if it is available)"
49 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
50 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
51 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
53 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
54 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
55 echo "(or a newer version if it is available)"
60 (automake --version) < /dev/null > /dev/null 2>&1 || {
62 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
63 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
64 echo "(or a newer version if it is available)"
70 # if no automake, don't bother testing for aclocal
71 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
73 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
74 echo "installed doesn't appear recent enough."
75 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
76 echo "(or a newer version if it is available)"
80 if test "$DIE" -eq 1; then
85 echo "**Warning**: I am going to run \`configure' with no arguments."
86 echo "If you wish to pass any to it, please specify them on the"
87 echo \`$0\'" command line."
93 am_opt=--include-deps;;
96 for coin in `find $srcdir -name configure.ac -print`
99 if test -f $dr/NO-AUTO-GEN; then
100 echo skipping $dr -- flagged as no auto-gen
103 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
105 aclocalinclude="$ACLOCAL_FLAGS"
106 for k in $macrodirs; do
108 aclocalinclude="$aclocalinclude -I $k"
110 ## echo "**Warning**: No such directory \`$k'. Ignored."
113 if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
114 if grep "sed.*POTFILES" configure.ac >/dev/null; then
115 : do nothing -- we still have an old unmodified configure.ac
117 echo "Creating $dr/aclocal.m4 ..."
118 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
119 echo "Running gettextize... Ignore non-fatal messages."
120 echo "no" | gettextize --force --copy
121 echo "Making $dr/aclocal.m4 writable ..."
122 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
125 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
126 echo "Running libtoolize..."
127 libtoolize --force --copy
129 echo "Running aclocal $aclocalinclude ..."
130 aclocal $aclocalinclude
131 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
132 echo "Running autoheader..."
135 echo "Running autoconf ..."
137 echo "Running automake --gnu $am_opt ..."
138 automake --add-missing --gnu $am_opt
143 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
145 if test x$NOCONFIGURE = x; then
146 echo Running $srcdir/configure $conf_flags "$@" ...
147 $srcdir/configure $conf_flags "$@" \
148 && echo Now type \`make\' to compile $PKG_NAME
150 echo Skipping configure process.