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" -a -x ~/bin/svn2log.py ]; then
11 [ -n "$2" ] && dir="$2" || dir="rc-scripts"
12 rm -f ${TMPDIR:-/tmp}/svn2log.tmp
13 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
14 svn log -v --xml | ~/bin/svn2log.py --domain "pld-linux.org" -p /${dir}/trunk -u ${TMPDIR:-/tmp}/svn2log.tmp --exclude ChangeLog -o ChangeLog
15 rm -f ${TMPDIR:-/tmp}/svn2log.tmp
22 (test -f $srcdir/configure.ac \
23 && test -d $srcdir/src) || {
24 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
25 echo " top-level rc-scripts directory"
32 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
34 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
35 echo "Download the appropriate package for your distribution,"
36 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
40 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
41 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
43 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
44 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
45 echo "(or a newer version if it is available)"
50 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
51 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
52 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
54 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
55 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
56 echo "(or a newer version if it is available)"
61 (automake --version) < /dev/null > /dev/null 2>&1 || {
63 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
64 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
65 echo "(or a newer version if it is available)"
71 # if no automake, don't bother testing for aclocal
72 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
74 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
75 echo "installed doesn't appear recent enough."
76 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
77 echo "(or a newer version if it is available)"
81 if test "$DIE" -eq 1; then
86 echo "**Warning**: I am going to run \`configure' with no arguments."
87 echo "If you wish to pass any to it, please specify them on the"
88 echo \`$0\'" command line."
94 am_opt=--include-deps;;
97 for coin in `find $srcdir -name configure.ac -print`
100 if test -f $dr/NO-AUTO-GEN; then
101 echo skipping $dr -- flagged as no auto-gen
104 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
106 aclocalinclude="$ACLOCAL_FLAGS"
107 for k in $macrodirs; do
109 aclocalinclude="$aclocalinclude -I $k"
111 ## echo "**Warning**: No such directory \`$k'. Ignored."
114 if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
115 if grep "sed.*POTFILES" configure.ac >/dev/null; then
116 : do nothing -- we still have an old unmodified configure.ac
118 echo "Creating $dr/aclocal.m4 ..."
119 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
120 echo "Running gettextize... Ignore non-fatal messages."
121 echo "no" | gettextize --force --copy
122 echo "Making $dr/aclocal.m4 writable ..."
123 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
126 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
127 echo "Running libtoolize..."
128 libtoolize --force --copy
130 echo "Running aclocal $aclocalinclude ..."
131 aclocal $aclocalinclude
132 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
133 echo "Running autoheader..."
136 echo "Running autoconf ..."
138 echo "Running automake --gnu $am_opt ..."
139 automake --add-missing --gnu $am_opt
144 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
146 if test x$NOCONFIGURE = x; then
147 echo Running $srcdir/configure $conf_flags "$@" ...
148 $srcdir/configure $conf_flags "$@" \
149 && echo Now type \`make\' to compile $PKG_NAME
151 echo Skipping configure process.