2 # Run this to generate all the initial makefiles, etc.
5 : ${AUTOHEADER=autoheader}
6 : ${AUTOMAKE=automake-1.9}
7 : ${ACLOCAL=aclocal-1.9}
8 : ${LIBTOOLIZE=libtoolize}
9 : ${INTLTOOLIZE=intltoolize}
11 : ${GNOME_DOC_PREPARE=gnome-doc-prepare}
14 test -z "$srcdir" && srcdir=.
20 CONFIGURE=configure.ac
24 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
26 echo "You must have autoconf installed to compile $PROJECT."
27 echo "Download the appropriate package for your distribution,"
28 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
32 (grep "^AC_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
33 ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
35 echo "You must have \`intltoolize' installed to compile $PROJECT."
36 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.35.tar.gz"
37 echo "(or a newer version if it is available)"
42 (grep "^GNOME_DOC_INIT" $srcdir/$CONFIGURE >/dev/null) && {
43 ($GNOME_DOC_PREPARE --version) < /dev/null > /dev/null 2>&1 || {
45 echo "You must have \`gnome-doc-prepare' installed to compile $PROJECT."
50 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
52 echo "You must have automake 1.9 installed to compile $PROJECT."
53 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.9.6.tar.gz"
54 echo "(or a newer version of 1.9.x if it is available)"
58 (grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
59 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
61 echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
62 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.22.tar.gz"
63 echo "(or a newer version if it is available)"
68 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
69 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
72 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
73 GETTEXTIZE="glib-gettextize"
74 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
76 GETTEXTIZE="gettextize"
77 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
80 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
81 if test $? -ne 0; then
83 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
84 echo "Get $GETTEXTIZE_URL"
85 echo "(or a newer version if it is available)"
91 if test "$DIE" -eq 1; then
95 test $TEST_TYPE $FILE || {
96 echo "You must run this script in the top-level $PROJECT directory"
100 #if test -z "$*"; then
101 # echo "I am going to run ./configure with no arguments - if you wish "
102 # echo "to pass any to it, please specify them on the $0 command line."
106 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
112 if test -f $dr/NO-AUTO-GEN; then
113 echo skipping $dr -- flagged as no auto-gen
116 macrodirs= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
118 aclocalinclude="$ACLOCAL_FLAGS"
119 for k in $macrodirs; do
121 aclocalinclude="$aclocalinclude -I $k"
123 ## echo "**Warning**: No such directory \`$k'. Ignored."
126 if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE >/dev/null; then
127 if grep "sed.*POTFILES" $CONFIGURE >/dev/null; then
128 : do nothing -- we still have an old unmodified $CONFIGURE
130 echo "Creating $dr/aclocal.m4 ..."
131 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
132 echo "Running glib-gettextize... Ignore non-fatal messages."
133 echo "no" | glib-gettextize --force --copy
134 echo "Making $dr/aclocal.m4 writable ..."
135 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
138 if grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
139 echo "Running intltoolize..."
140 intltoolize --copy --force --automake
142 if grep "^GNOME_DOC_INIT" $CONFIGURE >/dev/null; then
143 echo "Running $GNOME_DOC_PREPARE..."
144 $GNOME_DOC_PREPARE --force --copy || exit 1
146 if grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null; then
147 echo "Running $LIBTOOLIZE..."
148 $LIBTOOLIZE --force --copy
150 echo "Running $ACLOCAL $aclocalinclude ..."
151 $ACLOCAL $aclocalinclude
152 if grep "^AM_CONFIG_HEADER" $CONFIGURE >/dev/null; then
153 echo "Running $AUTOHEADER..."
156 echo "Running $AUTOMAKE --gnu $am_opt ..."
157 $AUTOMAKE --add-missing --gnu $am_opt
158 echo "Running $AUTOCONF ..."
164 conf_flags="--enable-maintainer-mode"
168 if test x$NOCONFIGURE = x; then
169 echo Running $srcdir/configure $conf_flags "$@" ...
170 $srcdir/configure $conf_flags "$@" \
171 && echo Now type \`make\' to compile $PROJECT || exit 1
173 echo Skipping configure process.