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=.
21 CONFIGURE=configure.ac
25 # check if gtk-doc is explicitely disabled
26 for ag_option in $AUTOGEN_CONFIGURE_ARGS $@
29 -disable-gtk-doc | --disable-gtk-doc)
35 if test x$enable_gtk_doc = xno; then
36 echo "skipping test for gtkdocize"
38 echo -n "checking for gtkdocize ... "
39 if (gtkdocize --version) < /dev/null > /dev/null 2>&1; then
43 echo " You must have gtk-doc installed to compile $PROJECT."
44 echo " Install the appropriate package for your distribution,"
45 echo " or get the source tarball at"
46 echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
47 echo " You can also use the option --disable-gtk-doc to skip"
48 echo " this test but then you will not be able to generate a"
49 echo " configure script that can build the API documentation."
54 if test x$enable_gtk_doc = xno; then
55 if test -f gtk-doc.make; then :; else
56 echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
58 echo "WARNING: You have disabled gtk-doc."
59 echo " As a result, you will not be able to generate the API"
60 echo " documentation and 'make dist' will not work."
66 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
68 echo "You must have autoconf installed to compile $PROJECT."
69 echo "Download the appropriate package for your distribution,"
70 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
74 (grep "^AC_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
75 ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
77 echo "You must have \`intltoolize' installed to compile $PROJECT."
78 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.35.tar.gz"
79 echo "(or a newer version if it is available)"
84 (grep "^GNOME_DOC_INIT" $srcdir/$CONFIGURE >/dev/null) && {
85 ($GNOME_DOC_PREPARE --version) < /dev/null > /dev/null 2>&1 || {
87 echo "You must have \`gnome-doc-prepare' installed to compile $PROJECT."
92 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
94 echo "You must have automake 1.9 installed to compile $PROJECT."
95 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.9.6.tar.gz"
96 echo "(or a newer version of 1.9.x if it is available)"
100 (grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
101 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
103 echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
104 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.22.tar.gz"
105 echo "(or a newer version if it is available)"
110 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
111 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
114 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
115 GETTEXTIZE="glib-gettextize"
116 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
118 GETTEXTIZE="gettextize"
119 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
122 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
123 if test $? -ne 0; then
125 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
126 echo "Get $GETTEXTIZE_URL"
127 echo "(or a newer version if it is available)"
133 if test "$DIE" -eq 1; then
137 test $TEST_TYPE $FILE || {
138 echo "You must run this script in the top-level $PROJECT directory"
142 #if test -z "$*"; then
143 # echo "I am going to run ./configure with no arguments - if you wish "
144 # echo "to pass any to it, please specify them on the $0 command line."
148 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
154 if test -f $dr/NO-AUTO-GEN; then
155 echo skipping $dr -- flagged as no auto-gen
158 macrodirs= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
160 aclocalinclude="$ACLOCAL_FLAGS"
161 for k in $macrodirs; do
163 aclocalinclude="$aclocalinclude -I $k"
165 ## echo "**Warning**: No such directory \`$k'. Ignored."
168 if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE >/dev/null; then
169 if grep "sed.*POTFILES" $CONFIGURE >/dev/null; then
170 : do nothing -- we still have an old unmodified $CONFIGURE
172 echo "Creating $dr/aclocal.m4 ..."
173 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
174 echo "Running glib-gettextize... Ignore non-fatal messages."
175 echo "no" | glib-gettextize --force --copy
176 echo "Making $dr/aclocal.m4 writable ..."
177 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
180 if grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
181 echo "Running intltoolize..."
182 intltoolize --copy --force --automake
184 if grep "^GNOME_DOC_INIT" $CONFIGURE >/dev/null; then
185 echo "Running $GNOME_DOC_PREPARE..."
186 $GNOME_DOC_PREPARE --force --copy || exit 1
188 if grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null; then
189 echo "Running $LIBTOOLIZE..."
190 $LIBTOOLIZE --force --copy
192 echo "Running $ACLOCAL $aclocalinclude ..."
193 $ACLOCAL $aclocalinclude
194 if grep "^AM_CONFIG_HEADER" $CONFIGURE >/dev/null; then
195 echo "Running $AUTOHEADER..."
198 echo "Running $AUTOMAKE --gnu $am_opt ..."
199 $AUTOMAKE --add-missing --gnu $am_opt
200 echo "Running $AUTOCONF ..."
206 conf_flags="--enable-maintainer-mode"
210 if test x$NOCONFIGURE = x; then
211 echo Running $srcdir/configure $conf_flags "$@" ...
212 $srcdir/configure $conf_flags "$@" \
213 && echo Now type \`make\' to compile $PROJECT || exit 1
215 echo Skipping configure process.