2 # Run this to generate all the initial makefiles, etc.
6 if [ -n "$GNOME2_DIR" ]; then
7 ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
8 LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
9 PATH="$GNOME2_DIR/bin:$PATH"
11 export LD_LIBRARY_PATH
14 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
16 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
17 echo "Download the appropriate package for your distribution,"
18 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
22 # Determine whether to use configure.in or configure.ac
24 if [ -f $srcdir/configure.ac ]; then
25 CONFIGURE="$srcdir/configure.ac"
27 CONFIGURE="$srcdir/configure.in"
30 (grep "^AC_PROG_INTLTOOL" "$CONFIGURE" >/dev/null) && {
31 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
33 echo "**Error**: You must have \`intltoolize' installed to compile $PKG_NAME."
34 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.10.tar.gz"
35 echo "(or a newer version if it is available)"
40 (grep "^AM_PROG_XML_I18N_TOOLS" "$CONFIGURE" >/dev/null) && {
41 (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
43 echo "**Error**: You must have \`xml-i18n-toolize' installed to compile $PKG_NAME."
44 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/xml-i18n-tools/xml-i18n-tools-0.9.tar.gz"
45 echo "(or a newer version of xml-i18n-tools or intltool if it is available)"
50 (grep "^AM_PROG_LIBTOOL" "$CONFIGURE" >/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.2d.tar.gz"
55 echo "(or a newer version if it is available)"
61 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
62 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
65 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
66 GETTEXTIZE="glib-gettextize"
67 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v1.3/glib-1.3.11.tar.gz"
69 GETTEXTIZE="gettextize"
70 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
73 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
74 if test $? -ne 0; then
76 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
77 echo "Get $GETTEXTIZE_URL"
78 echo "(or a newer version if it is available)"
84 (automake --version) < /dev/null > /dev/null 2>&1 || {
86 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
87 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
88 echo "(or a newer version if it is available)"
94 # if no automake, don't bother testing for aclocal
95 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
97 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
98 echo "installed doesn't appear recent enough."
99 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
100 echo "(or a newer version if it is available)"
104 if test "$DIE" -eq 1; then
108 if test -z "$*"; then
109 echo "**Warning**: I am going to run \`configure' with no arguments."
110 echo "If you wish to pass any to it, please specify them on the"
111 echo \`$0\'" command line."
117 am_opt=--include-deps;;
120 for coin in `find $srcdir -name configure.in -print -o -name configure.ac -print`
124 if test -f $dr/NO-AUTO-GEN; then
125 echo skipping $dr -- flagged as no auto-gen
130 aclocalinclude="$ACLOCAL_FLAGS"
132 if test "$GETTEXTIZE"; then
133 echo "Creating $dr/aclocal.m4 ..."
134 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
135 echo "Running $GETTEXTIZE... Ignore non-fatal messages."
136 echo "no" | $GETTEXTIZE --force --copy
137 echo "Making $dr/aclocal.m4 writable ..."
138 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
140 if grep "^AC_PROG_INTLTOOL" $bn >/dev/null; then
141 echo "Running intltoolize..."
142 intltoolize --copy --force --automake
144 if grep "^AM_PROG_XML_I18N_TOOLS" $bn >/dev/null; then
145 echo "Running xml-i18n-toolize..."
146 xml-i18n-toolize --copy --force --automake
148 if grep "^AM_PROG_LIBTOOL" $bn >/dev/null; then
149 if test -z "$NO_LIBTOOLIZE" ; then
150 echo "Running libtoolize..."
151 libtoolize --force --copy
154 echo "Running aclocal $aclocalinclude ..."
155 aclocal $aclocalinclude
156 if grep "^AM_CONFIG_HEADER" $bn >/dev/null; then
157 echo "Running autoheader..."
160 echo "Running automake --gnu $am_opt ..."
161 automake --add-missing --gnu $am_opt
162 echo "Running autoconf ..."
168 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
170 if test x$NOCONFIGURE = x; then
171 echo Running $srcdir/configure $conf_flags "$@" ...
172 $srcdir/configure $conf_flags "$@" \
173 && echo Now type \`make\' to compile $PKG_NAME || exit 1
175 echo Skipping configure process.