2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
11 if [ -n "$GNOME2_DIR" ]; then
12 ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
13 LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
14 PATH="$GNOME2_DIR/bin:$PATH"
16 export LD_LIBRARY_PATH
19 (test -f $srcdir/configure.ac) || {
20 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
21 echo " top-level package directory"
25 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
27 echo "**Error**: You must have \`autoconf' installed."
28 echo "Download the appropriate package for your distribution,"
29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
33 (grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
34 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
36 echo "**Error**: You must have \`intltool' installed."
37 echo "You can get it from:"
38 echo " ftp://ftp.gnome.org/pub/GNOME/"
43 (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
44 (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
46 echo "**Error**: You must have \`xml-i18n-toolize' installed."
47 echo "You can get it from:"
48 echo " ftp://ftp.gnome.org/pub/GNOME/"
53 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
54 (libtool --version) < /dev/null > /dev/null 2>&1 || {
56 echo "**Error**: You must have \`libtool' installed."
57 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
62 (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
63 (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
64 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
66 echo "**Error**: You must have \`glib' installed."
67 echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
72 (automake --version) < /dev/null > /dev/null 2>&1 || {
74 echo "**Error**: You must have \`automake' installed."
75 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
81 # if no automake, don't bother testing for aclocal
82 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
84 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
85 echo "installed doesn't appear recent enough."
86 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
90 if test "$DIE" -eq 1; then
95 echo "**Warning**: I am going to run \`configure' with no arguments."
96 echo "If you wish to pass any to it, please specify them on the"
97 echo \`$0\'" command line."
103 am_opt=--include-deps;;
106 for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print`
109 if test -f $dr/NO-AUTO-GEN; then
110 echo skipping $dr -- flagged as no auto-gen
115 aclocalinclude="$ACLOCAL_FLAGS"
117 if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
118 echo "Creating $dr/aclocal.m4 ..."
119 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
120 echo "Running glib-gettextize... Ignore non-fatal messages."
121 echo "no" | glib-gettextize --force --copy
122 echo "Making $dr/aclocal.m4 writable ..."
123 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
125 if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
126 echo "Running intltoolize..."
127 intltoolize --copy --force --automake
129 if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
130 echo "Running xml-i18n-toolize..."
131 xml-i18n-toolize --copy --force --automake
133 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
134 if test -z "$NO_LIBTOOLIZE" ; then
135 echo "Running libtoolize..."
136 libtoolize --force --copy
139 echo "Running aclocal $aclocalinclude ..."
140 aclocal $aclocalinclude
141 if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
142 echo "Running autoheader..."
145 echo "Running automake --gnu $am_opt ..."
146 automake --add-missing --gnu $am_opt
147 echo "Running autoconf ..."
153 conf_flags="--enable-maintainer-mode"
155 if test x$NOCONFIGURE = x; then
156 echo Running $srcdir/configure $conf_flags "$@" ...
157 $srcdir/configure $conf_flags "$@" \
158 && echo Now type \`make\' to compile. || exit 1
160 echo Skipping configure process.