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`
121 if test -f $dr/NO-AUTO-GEN; then
122 echo skipping $dr -- flagged as no auto-gen
125 echo "* Processing directory $dr"
128 if [ -e $dr/configure.in ] ; then
129 configfile="configure.in"
131 configfile="configure.ac"
133 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
136 if grep "^AM_PROG_LIBTOOL" $configfile >/dev/null; then
137 if test -z "$NO_LIBTOOLIZE" ; then
138 echo "Running libtoolize --force --copy in "`pwd`"..."
139 libtoolize --force --copy || exit 1
142 echo "Running aclocal-$amver $aclocalinclude..."
143 aclocal-$amver $aclocalinclude
144 if grep "^AM_CONFIG_HEADER" $configfile >/dev/null; then
145 echo "Running autoheader in "`pwd`"..."
148 if grep "^AM_INIT_AUTOMAKE" $configfile >/dev/null; then
149 echo "Running automake-$amver --gnu --add-missing $am_opt ..."
150 automake-$amver --gnu --add-missing $am_opt || exit 1
152 echo "Running autoconf..."
158 #conf_flags="--enable-compile-warnings"
160 #--enable-compile-warnings=minimum"
163 #echo "rebuilding the api documentation... "
164 #cd docs && ./refresh-api " "&& echo "Done with the rebuilding of the api documentation." && cd .. || exit 1
167 if test x$NOCONFIGURE = x; then
169 echo "* Running ./configure $configure_args..."
172 ./configure $configure_args || exit 1
175 echo Skipping configure process.
178 echo Now type \`make\' to compile $PKG_NAME