| author | J. Ali Harlow <ali@juiblex.co.uk> |
| Wed Aug 24 15:28:52 2011 +0100 (2011-08-24) | |
| changeset 399 | 98aade0d875b |
| parent 262 | 63644cc28e0b |
| child 438 | fab0b8a61dcb |
| permissions | -rwxr-xr-x |
| rhughes@241 | 1 |
#!/bin/sh |
| rhughes@241 | 2 |
# Run this to generate all the initial makefiles, etc. |
| rhughes@241 | 3 |
|
| rhughes@241 | 4 |
srcdir=`dirname $0` |
| rhughes@241 | 5 |
test -z "$srcdir" && srcdir=. |
| rhughes@241 | 6 |
|
| rhughes@241 | 7 |
DIE=0 |
| rhughes@241 | 8 |
|
| rhughes@241 | 9 |
(test -f $srcdir/configure.ac) || {
|
| rhughes@241 | 10 |
echo -n "**Error**: Directory $srcdir does not look like the" |
| rhughes@241 | 11 |
echo " top-level package directory" |
| rhughes@241 | 12 |
exit 1 |
| rhughes@241 | 13 |
} |
| rhughes@241 | 14 |
|
| rhughes@241 | 15 |
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
| rhughes@241 | 16 |
echo |
| rhughes@241 | 17 |
echo "**Error**: You must have autoconf installed." |
| rhughes@241 | 18 |
echo "Download the appropriate package for your distribution," |
| rhughes@241 | 19 |
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
| rhughes@241 | 20 |
DIE=1 |
| rhughes@241 | 21 |
} |
| rhughes@241 | 22 |
|
| rhughes@241 | 23 |
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
|
| rhughes@241 | 24 |
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
| rhughes@241 | 25 |
echo |
| rhughes@241 | 26 |
echo "**Error**: You must have libtool installed." |
| rhughes@241 | 27 |
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" |
| rhughes@241 | 28 |
DIE=1 |
| rhughes@241 | 29 |
} |
| rhughes@241 | 30 |
} |
| rhughes@241 | 31 |
|
| rhughes@241 | 32 |
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
| rhughes@241 | 33 |
echo |
| rhughes@241 | 34 |
echo "**Error**: You must have automake installed." |
| rhughes@241 | 35 |
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" |
| rhughes@241 | 36 |
DIE=1 |
| rhughes@241 | 37 |
NO_AUTOMAKE=yes |
| rhughes@241 | 38 |
} |
| rhughes@241 | 39 |
|
| rhughes@241 | 40 |
|
| rhughes@241 | 41 |
# if no automake, don't bother testing for aclocal |
| rhughes@241 | 42 |
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
| rhughes@241 | 43 |
echo |
| rhughes@241 | 44 |
echo "**Error**: Missing aclocal. The version of automake" |
| rhughes@241 | 45 |
echo "installed doesn't appear recent enough." |
| rhughes@241 | 46 |
echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" |
| rhughes@241 | 47 |
DIE=1 |
| rhughes@241 | 48 |
} |
| rhughes@241 | 49 |
|
| ali@323 | 50 |
if [ -z "$GNULIB_TOOL" ]; then |
| ali@323 | 51 |
GNULIB_TOOL=`which gnulib-tool` |
| ali@323 | 52 |
if [ -z "$GNULIB_TOOL" ]; then |
| ali@323 | 53 |
echo |
| ali@323 | 54 |
echo "**Error**: Missing gnulib-tool. Set GNULIB_TOOL to point" |
| ali@323 | 55 |
echo "to a copy of gnulib-tool which is not in your PATH." |
| ali@323 | 56 |
echo "You can get gnulib from http://www.gnu.org/software/gnulib/" |
| ali@323 | 57 |
DIE=1 |
| ali@323 | 58 |
fi |
| ali@323 | 59 |
fi |
| ali@323 | 60 |
|
| rhughes@241 | 61 |
if test "$DIE" -eq 1; then |
| rhughes@241 | 62 |
exit 1 |
| rhughes@241 | 63 |
fi |
| rhughes@241 | 64 |
|
| rhughes@241 | 65 |
if test -z "$*"; then |
| rhughes@241 | 66 |
echo "**Warning**: I am going to run configure with no arguments." |
| rhughes@241 | 67 |
echo "If you wish to pass any to it, please specify them on the" |
| rhughes@241 | 68 |
echo $0 " command line." |
| rhughes@241 | 69 |
echo |
| rhughes@241 | 70 |
fi |
| rhughes@241 | 71 |
|
| rhughes@241 | 72 |
case $CC in |
| rhughes@241 | 73 |
xlc ) |
| rhughes@241 | 74 |
am_opt=--include-deps;; |
| rhughes@241 | 75 |
esac |
| rhughes@241 | 76 |
|
| ali@323 | 77 |
aclocalinclude="-I gl/m4 $ACLOCAL_FLAGS" |
| rhughes@241 | 78 |
|
| rhughes@241 | 79 |
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then |
| rhughes@241 | 80 |
if test -z "$NO_LIBTOOLIZE" ; then |
| rhughes@241 | 81 |
echo "Running libtoolize..." |
| rhughes@241 | 82 |
libtoolize --force --copy |
| rhughes@241 | 83 |
fi |
| rhughes@241 | 84 |
fi |
| rhughes@241 | 85 |
echo "Running aclocal $aclocalinclude ..." |
| rhughes@241 | 86 |
aclocal $aclocalinclude |
| rhughes@241 | 87 |
if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then |
| rhughes@241 | 88 |
echo "Running autoheader..." |
| rhughes@241 | 89 |
autoheader |
| rhughes@241 | 90 |
fi |
| rhughes@241 | 91 |
echo "Running automake --gnu -Wno-portability $am_opt ..." |
| rhughes@241 | 92 |
automake --add-missing --gnu -Wno-portability $am_opt |
| rhughes@241 | 93 |
echo "Running autoconf ..." |
| rhughes@241 | 94 |
autoconf |
| rhughes@241 | 95 |
|
| rhughes@241 | 96 |
intltoolize --copy --force --automake || exit 1 |
| rhughes@241 | 97 |
|
| krh@262 | 98 |
gtkdocize --copy --flavour no-tmpl |
| krh@262 | 99 |
|
| ali@323 | 100 |
echo "Running $GNULIB_TOOL --update ..." |
| ali@323 | 101 |
$GNULIB_TOOL --update |
| ali@323 | 102 |
|
| rhughes@241 | 103 |
conf_flags="--enable-maintainer-mode" |
| rhughes@241 | 104 |
|
| rhughes@241 | 105 |
if test x$NOCONFIGURE = x; then |
| rhughes@241 | 106 |
echo "Running $srcdir/configure $conf_flags $@ ..." |
| rhughes@241 | 107 |
$srcdir/configure $conf_flags "$@" \ |
| rhughes@241 | 108 |
&& echo "Now type make to compile." || exit 1 |
| rhughes@241 | 109 |
else |
| rhughes@241 | 110 |
echo "Skipping configure process." |
| rhughes@241 | 111 |
fi |