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"
15 ###### End of conf part
17 for dir in $acmacrodirs ; do
18 if test -d $dir ; then
19 aclocalinclude="$aclocalinclude -I $dir";
24 test -z "$srcdir" && srcdir=.
26 echo "Autoregenerate package \`$PKG_NAME' in directory \`$srcdir'";
28 (test -f $srcdir/configure.ac \
29 && test -f $srcdir/src/include/gras.h) || {
30 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
31 echo " top-level $PKG_NAME directory"
36 ###### Some tests (borrowed from macros/autogen.sh from achtung)
39 # 27/5/00: Changed "to compile gnome" to "to compile $PKG_NAME"
40 # 27/5/00: removed gettext
44 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
46 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
47 echo "Download the appropriate package for your distribution,"
48 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
52 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
53 (libtool --version) < /dev/null > /dev/null 2>&1 || {
55 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
56 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz"
57 echo "(or a newer version if it is available)"
62 (automake-$amver --version) < /dev/null > /dev/null 2>&1 || {
64 echo "**Error**: You must have \`automake' $amver installed to compile $PKG_NAME."
65 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-amver.tar.gz"
66 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://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
77 echo "(or a newer version if it is available)"
81 if test "$DIE" -eq 1; then
85 ###### END of test part
94 if test -e aci.conf ; then
96 echo "**Warning**: I am going to run \`configure' with arguments resulting from aci_configurator execution."
97 echo "ie, $configure_args."
98 echo "If you wish to pass other ones, please specify them on the"
99 echo \`$0\'" command line, or rerun aci_configurator and save the new ones."
102 configure_args="--enable-maintainer-mode --enable-gtk-doc"
103 echo "**Warning**: I am going to run \`configure' with no arguments."
104 echo "If you wish to pass any to it, please specify them on the"
105 echo \`$0\'" command line."
114 am_opt=--include-deps;;
117 #for coin in `find $srcdir -name configure.ac -print `\
118 # `find $srcdir -name configure.in -print`
119 for coin in `ls $srcdir/configure.ac $srcdir/configure.in 2>/dev/null`
122 if test -f $dr/NO-AUTO-GEN; then
123 echo skipping $dr -- flagged as no auto-gen
126 echo "* Processing directory $dr"
129 if [ -e $dr/configure.in ] ; then
130 configfile="configure.in"
132 configfile="configure.ac"
134 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
137 if grep "^AM_PROG_LIBTOOL" $configfile >/dev/null; then
138 if test -z "$NO_LIBTOOLIZE" ; then
139 echo "Running libtoolize --force --copy in "`pwd`"..."
140 libtoolize --force --copy || exit 1
143 echo "Running aclocal-$amver $aclocalinclude..."
144 aclocal-$amver $aclocalinclude
145 if grep "^AM_CONFIG_HEADER" $configfile >/dev/null; then
146 echo "Running autoheader in "`pwd`"..."
148 else if grep "^AC_CONFIG_HEADERS" $configfile >/dev/null; then
149 echo "Running autoheader in "`pwd`"..."
152 if grep "^AM_INIT_AUTOMAKE" $configfile >/dev/null; then
153 echo "Running automake-$amver --gnu --add-missing $am_opt ..."
154 automake-$amver --gnu --add-missing $am_opt || exit 1
156 echo "Running autoconf..."
162 #conf_flags="--enable-compile-warnings"
164 #--enable-compile-warnings=minimum"
167 #echo "rebuilding the api documentation... "
168 #cd docs && ./refresh-api " "&& echo "Done with the rebuilding of the api documentation." && cd .. || exit 1
171 if test x$NOCONFIGURE = x; then
173 echo "* Running ./configure $configure_args..."
176 ./configure $configure_args || exit 1
179 echo Skipping configure process.
182 echo Now type \`make\' to compile $PKG_NAME