2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
17 echo "You must have autoconf installed to compile $PROJECT."
18 echo "Download the appropriate package for your distribution,"
19 echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
26 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
31 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
33 echo "You must have $AUTOMAKE installed to compile $PROJECT."
34 echo "Download the appropriate package for your distribution,"
35 echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
39 (grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
40 (libtool --version) < /dev/null > /dev/null 2>&1 || {
42 echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
43 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
44 echo "(or a newer version if it is available)"
49 grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null && {
50 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
51 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
53 echo "**Error**: You must have \`glib' installed to compile $PROJECT."
58 (grep "^GTK_DOC_CHECK" configure.in >/dev/null) && {
59 (gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
61 echo "**Error**: You must have \`gtk-doc' installed to compile $PROJECT."
66 if test "$DIE" -eq 1; then
70 test $TEST_TYPE $FILE || {
71 echo "You must run this script in the top-level $PROJECT directory"
76 echo "I am going to run ./configure with no arguments - if you wish "
77 echo "to pass any to it, please specify them on the $0 command line."
81 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
84 for coin in ./configure.in
87 if test -f $dr/NO-AUTO-GEN; then
88 echo skipping $dr -- flagged as no auto-gen
91 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
93 aclocalinclude="$ACLOCAL_FLAGS"
94 for k in $macrodirs; do
96 aclocalinclude="$aclocalinclude -I $k"
98 ## echo "**Warning**: No such directory \`$k'. Ignored."
101 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
102 if grep "sed.*POTFILES" configure.in >/dev/null; then
103 : do nothing -- we still have an old unmodified configure.in
105 echo "Creating $dr/aclocal.m4 ..."
106 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
107 echo "Running gettextize... Ignore non-fatal messages."
108 echo "no" | gettextize --force --copy
109 echo "Making $dr/aclocal.m4 writable ..."
110 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
113 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
114 echo "Creating $dr/aclocal.m4 ..."
115 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
116 echo "Running gettextize... Ignore non-fatal messages."
117 echo "no" | gettextize --force --copy
118 echo "Making $dr/aclocal.m4 writable ..."
119 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
121 if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
122 echo "Creating $dr/aclocal.m4 ..."
123 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
124 echo "Running 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
129 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
130 echo "Running libtoolize..."
131 libtoolize --force --copy
133 if grep "^GTK_DOC_CHECK" configure.in >/dev/null; then
134 echo "Running gtkdocize..."
137 if grep "^IT_PROG_INTLTOOL" configure.in >/dev/null; then
138 echo "Running intltoolize..."
139 intltoolize --force --copy
141 echo "Running $ACLOCAL $aclocalinclude ..."
142 $ACLOCAL $aclocalinclude
143 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
144 echo "Running autoheader..."
147 echo "Running $AUTOMAKE --gnu $am_opt ..."
148 $AUTOMAKE --add-missing --gnu $am_opt
149 echo "Running autoconf ..."
155 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
159 if test x$NOCONFIGURE = x; then
160 echo Running $srcdir/configure $conf_flags "$@" ...
161 $srcdir/configure $conf_flags "$@" \
162 && echo Now type \`make\' to compile $PROJECT || exit 1
164 echo Skipping configure process.