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}
12 : ${GTKDOCIZE=gtkdocize}
15 test -z "$srcdir" && srcdir=.
21 FILE=loudmouth/loudmouth.h
22 CONFIGURE=configure.ac
26 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
28 echo "You must have autoconf installed to compile $PROJECT."
29 echo "Download the appropriate package for your distribution,"
30 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
34 (grep "^AC_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
35 ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
37 echo "You must have \`intltoolize' installed to compile $PROJECT."
38 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.22.tar.gz"
39 echo "(or a newer version if it is available)"
44 (grep "^GNOME_DOC_INIT" $srcdir/$CONFIGURE >/dev/null) && {
45 ($GNOME_DOC_PREPARE --version) < /dev/null > /dev/null 2>&1 || {
47 echo "You must have \`gnome-doc-prepare' installed to compile $PROJECT."
48 #echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.22.tar.gz"
49 #echo "(or a newer version if it is available)"
54 if grep "^GTK_DOC_CHECK" $srcdir/$CONFIGURE; then
55 ($GTKDOCIZE --version) < /dev/null > /dev/null 2>&1 || {
57 echo "You need gtk-doc to build $PACKAGE";
62 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
64 echo "You must have automake installed to compile $PROJECT."
65 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.9.tar.gz"
66 echo "(or a newer version if it is available)"
70 (grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
71 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
73 echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
74 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz"
75 echo "(or a newer version if it is available)"
80 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
81 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
84 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
85 GETTEXTIZE="glib-gettextize"
86 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
88 GETTEXTIZE="gettextize"
89 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
92 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
93 if test $? -ne 0; then
95 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
96 echo "Get $GETTEXTIZE_URL"
97 echo "(or a newer version if it is available)"
104 if test "$DIE" -eq 1; then
108 test $TEST_TYPE $FILE || {
109 echo "You must run this script in the top-level $PROJECT directory"
113 #if test -z "$*"; then
114 # echo "I am going to run ./configure with no arguments - if you wish "
115 # echo "to pass any to it, please specify them on the $0 command line."
119 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
125 if test -f $dr/NO-AUTO-GEN; then
126 echo skipping $dr -- flagged as no auto-gen
129 macrodirs= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
131 aclocalinclude="$ACLOCAL_FLAGS"
132 for k in $macrodirs; do
134 aclocalinclude="$aclocalinclude -I $k"
136 ## echo "**Warning**: No such directory \`$k'. Ignored."
139 if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE >/dev/null; then
140 if grep "sed.*POTFILES" $CONFIGURE >/dev/null; then
141 : do nothing -- we still have an old unmodified $CONFIGURE
143 echo "Creating $dr/aclocal.m4 ..."
144 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
145 echo "Running glib-gettextize... Ignore non-fatal messages."
146 echo "no" | glib-gettextize --force --copy
147 echo "Making $dr/aclocal.m4 writable ..."
148 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
151 if grep "^AC_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
152 echo "Running intltoolize..."
153 intltoolize --copy --force --automake
155 if grep "^GNOME_DOC_INIT" $CONFIGURE >/dev/null; then
156 echo "Running $GNOME_DOC_PREPARE..."
157 $GNOME_DOC_PREPARE --force --copy || exit 1
159 if grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null; then
160 echo "Running $LIBTOOLIZE..."
161 $LIBTOOLIZE --force --copy
163 echo "Running $ACLOCAL $aclocalinclude ..."
164 $ACLOCAL $aclocalinclude
165 if grep "^GTK_DOC_CHECK" $CONFIGURE > /dev/null; then
166 echo "Running $GTKDOCIZE..."
169 if grep "^AM_CONFIG_HEADER" $CONFIGURE >/dev/null; then
170 echo "Running $AUTOHEADER..."
173 echo "Running $AUTOMAKE --gnu $am_opt ..."
174 $AUTOMAKE --add-missing --gnu $am_opt
175 echo "Running $AUTOCONF ..."
181 conf_flags="--enable-maintainer-mode"
185 if test x$NOCONFIGURE = x; then
186 echo Running $srcdir/configure $conf_flags "$@" ...
187 $srcdir/configure $conf_flags "$@" \
188 && echo Now type \`make\' to compile $PROJECT || exit 1
190 echo Skipping configure process.