2 # Run this to generate all the initial makefiles, etc.
9 # a list of all dirs containing possibly some macros
10 acmacrodirs="${HOME}/share/aclocal ${PWD}/acmacro /usr/share/aclocal/gnome2-macros"
13 ###### End of conf part
15 for dir in $acmacrodirs ; do
16 if test -d $dir ; then
17 aclocalinclude="$aclocalinclude -I $dir";
22 test -z "$srcdir" && srcdir=.
24 echo "Autoregenerate package \`$PKG_NAME' in directory \`$srcdir'";
26 (test -f $srcdir/configure.ac \
27 && test -f $srcdir/src/include/gras.h) || {
28 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
29 echo " top-level $PKG_NAME directory"
34 ###### Some tests (borrowed from macros/autogen.sh from achtung)
37 # 27/5/00: Changed "to compile gnome" to "to compile $PKG_NAME"
38 # 27/5/00: removed gettext
42 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
44 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
45 echo "Download the appropriate package for your distribution,"
46 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
50 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
51 (libtool --version) < /dev/null > /dev/null 2>&1 || {
53 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz"
55 echo "(or a newer version if it is available)"
60 (automake-1.7 --version) < /dev/null > /dev/null 2>&1 || {
62 echo "**Error**: You must have \`automake' 1.7 installed to compile $PKG_NAME."
63 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.7.tar.gz"
64 echo "(or a newer version if it is available)"
69 # if no automake, don't bother testing for aclocal
70 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
72 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
73 echo "installed doesn't appear recent enough."
74 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
75 echo "(or a newer version if it is available)"
79 if test "$DIE" -eq 1; then
83 ###### END of test part
92 if test -e aci.conf ; then
94 echo "**Warning**: I am going to run \`configure' with arguments resulting from aci_configurator execution."
95 echo "ie, $configure_args."
96 echo "If you wish to pass other ones, please specify them on the"
97 echo \`$0\'" command line, or rerun aci_configurator and save the new ones."
100 configure_args="--enable-maintainer-mode"
101 echo "**Warning**: I am going to run \`configure' with no arguments."
102 echo "If you wish to pass any to it, please specify them on the"
103 echo \`$0\'" command line."
112 am_opt=--include-deps;;
115 for coin in `find $srcdir -name configure.ac -print `\
116 `find $srcdir -name configure.in -print`
119 if test -f $dr/NO-AUTO-GEN; then
120 echo skipping $dr -- flagged as no auto-gen
123 echo "* Processing directory $dr"
126 if [ -e $dr/configure.in ] ; then
127 configfile="configure.in"
129 configfile="configure.ac"
131 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
134 if grep "^AM_PROG_LIBTOOL" $configfile >/dev/null; then
135 if test -z "$NO_LIBTOOLIZE" ; then
136 echo "Running libtoolize --force --copy in "`pwd`"..."
137 libtoolize --force --copy || exit 1
140 echo "Running aclocal-1.7 $aclocalinclude..."
141 aclocal-1.7 $aclocalinclude
142 if grep "^AM_CONFIG_HEADER" $configfile >/dev/null; then
143 echo "Running autoheader in "`pwd`"..."
146 if grep "^AM_INIT_AUTOMAKE" $configfile >/dev/null; then
147 echo "Running automake-1.7 --gnu --add-missing $am_opt ..."
148 automake-1.7 --gnu --add-missing $am_opt || exit 1
150 echo "Running autoconf..."
156 #conf_flags="--enable-compile-warnings"
158 #--enable-compile-warnings=minimum"
161 #echo "rebuilding the api documentation... "
162 #cd docs && ./refresh-api " "&& echo "Done with the rebuilding of the api documentation." && cd .. || exit 1
165 if test x$NOCONFIGURE = x; then
167 echo "* Running ./configure $configure_args..."
170 ./configure $configure_args || exit 1
173 echo Skipping configure process.
176 echo Now type \`make\' to compile $PKG_NAME