]> git.pld-linux.org Git - projects/rc-scripts.git/blame - autogen.sh
- cleanups in sysinit + fix for shutting down bridge
[projects/rc-scripts.git] / autogen.sh
CommitLineData
7e04fe0e 1#!/bin/sh
7824432b 2# $Id: autogen.sh,v 1.5.2.2 2001/09/30 10:19:34 misiek Exp $
7e04fe0e 3# Run this to generate all the initial makefiles, etc.
4
5srcdir=`dirname $0`
6test -z "$srcdir" && srcdir=.
7
a04d924e 8PKG_NAME="PLD GNU/Linux rc-scripts"
7e04fe0e 9
10(test -f $srcdir/configure.in \
7e04fe0e 11 && test -d $srcdir/src) || {
12 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
13 echo " top-level rc-scripts directory"
14
15 exit 1
16}
17
18DIE=0
19
20(autoconf --version) < /dev/null > /dev/null 2>&1 || {
21 echo
972964bb 22 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
7e04fe0e 23 echo "Download the appropriate package for your distribution,"
24 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
25 DIE=1
26}
27
28(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
29 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
30 echo
972964bb 31 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
7824432b 32 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
7e04fe0e 33 echo "(or a newer version if it is available)"
34 DIE=1
35 }
36}
37
38grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
39 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
40 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
41 echo
972964bb 42 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
7824432b 43 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
7e04fe0e 44 echo "(or a newer version if it is available)"
45 DIE=1
46 }
47}
48
49(automake --version) < /dev/null > /dev/null 2>&1 || {
50 echo
972964bb 51 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
7824432b 52 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
7e04fe0e 53 echo "(or a newer version if it is available)"
54 DIE=1
55 NO_AUTOMAKE=yes
56}
57
58
59# if no automake, don't bother testing for aclocal
60test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
61 echo
62 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
63 echo "installed doesn't appear recent enough."
7824432b 64 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
7e04fe0e 65 echo "(or a newer version if it is available)"
66 DIE=1
67}
68
69if test "$DIE" -eq 1; then
70 exit 1
71fi
72
73if test -z "$*"; then
74 echo "**Warning**: I am going to run \`configure' with no arguments."
75 echo "If you wish to pass any to it, please specify them on the"
76 echo \`$0\'" command line."
77 echo
78fi
79
80case $CC in
81xlc )
82 am_opt=--include-deps;;
83esac
84
85for coin in `find $srcdir -name configure.in -print`
86do
87 dr=`dirname $coin`
88 if test -f $dr/NO-AUTO-GEN; then
89 echo skipping $dr -- flagged as no auto-gen
90 else
91 echo processing $dr
92 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
93 ( cd $dr
94 aclocalinclude="$ACLOCAL_FLAGS"
95 for k in $macrodirs; do
96 if test -d $k; then
97 aclocalinclude="$aclocalinclude -I $k"
98 ##else
99 ## echo "**Warning**: No such directory \`$k'. Ignored."
100 fi
101 done
102 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
103 if grep "sed.*POTFILES" configure.in >/dev/null; then
104 : do nothing -- we still have an old unmodified configure.in
105 else
106 echo "Creating $dr/aclocal.m4 ..."
107 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
108 echo "Running gettextize... Ignore non-fatal messages."
109 echo "no" | gettextize --force --copy
110 echo "Making $dr/aclocal.m4 writable ..."
111 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
112 fi
113 fi
114 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
115 echo "Running libtoolize..."
116 libtoolize --force --copy
117 fi
118 echo "Running aclocal $aclocalinclude ..."
119 aclocal $aclocalinclude
120 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
121 echo "Running autoheader..."
122 autoheader
123 fi
7e04fe0e 124 echo "Running autoconf ..."
125 autoconf
7824432b
AM
126 echo "Running automake --gnu $am_opt ..."
127 automake --add-missing --gnu $am_opt
7e04fe0e 128 )
129 fi
130done
131
132conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
133
134if test x$NOCONFIGURE = x; then
135 echo Running $srcdir/configure $conf_flags "$@" ...
136 $srcdir/configure $conf_flags "$@" \
137 && echo Now type \`make\' to compile $PKG_NAME
138else
139 echo Skipping configure process.
140fi
This page took 0.065054 seconds and 4 git commands to generate.