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}
13 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.22.tar.gz"
37 echo "(or a newer version if it is available)"
42 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
44 echo "You must have automake installed to compile $PROJECT."
45 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.7.tar.gz"
46 echo "(or a newer version 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 $PROJECT."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz"
55 echo "(or a newer version if it is available)"
60 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
61 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
64 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
65 GETTEXTIZE="glib-gettextize"
66 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
68 GETTEXTIZE="gettextize"
69 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
72 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
73 if test $? -ne 0; then
75 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
76 echo "Get $GETTEXTIZE_URL"
77 echo "(or a newer version if it is available)"
83 if test "$DIE" -eq 1; then
87 test $TEST_TYPE $FILE || {
88 echo "You must run this script in the top-level $PROJECT directory"
92 #if test -z "$*"; then
93 # echo "I am going to run ./configure with no arguments - if you wish "
94 # echo "to pass any to it, please specify them on the $0 command line."
98 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
104 if test -f $dr/NO-AUTO-GEN; then
105 echo skipping $dr -- flagged as no auto-gen
108 macrodirs= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
110 aclocalinclude="$ACLOCAL_FLAGS"
111 for k in $macrodirs; do
113 aclocalinclude="$aclocalinclude -I $k"
115 ## echo "**Warning**: No such directory \`$k'. Ignored."
118 if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE >/dev/null; then
119 if grep "sed.*POTFILES" $CONFIGURE >/dev/null; then
120 : do nothing -- we still have an old unmodified configure.in
122 echo "Creating $dr/aclocal.m4 ..."
123 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
124 echo "Running glib-gettextize... Ignore non-fatal messages."
125 echo "no" | glib-gettextize --force --copy
126 echo "Making $dr/aclocal.m4 writable ..."
127 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
130 if grep "^AC_PROG_INTLTOOL" $CONFIGURE >/dev/null ||
131 grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
132 echo "Running intltoolize..."
133 intltoolize --copy --force --automake
135 if grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null; then
136 echo "Running $LIBTOOLIZE..."
137 $LIBTOOLIZE --force --copy
139 echo "Running $ACLOCAL $aclocalinclude ..."
140 $ACLOCAL $aclocalinclude
141 if grep "^AM_CONFIG_HEADER" $CONFIGURE >/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"
157 if test x$NOCONFIGURE = x; then
158 echo Running $srcdir/configure $conf_flags "$@" ...
159 $srcdir/configure $conf_flags "$@" \
160 && echo Now type \`make\' to compile $PROJECT || exit 1
162 echo Skipping configure process.