Search
lxdream.org :: lxdream/autogen.sh :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename autogen.sh
changeset 1:eea311cfd33e
author nkeynes
date Wed Dec 02 10:36:49 2009 +1000 (14 years ago)
permissions -rw-r--r--
last change Add missing SUBV instruction to the emulation core (translation core is ok),
along with test cases. Thanks to D. Jeff Dionne for pointing this out.
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/autogen.sh Wed Dec 02 10:36:49 2009 +1000
1.3 @@ -0,0 +1,159 @@
1.4 +#!/bin/sh
1.5 +# Run this to generate all the initial makefiles, etc.
1.6 +
1.7 +srcdir=`dirname $0`
1.8 +test -z "$srcdir" && srcdir=.
1.9 +
1.10 +DIE=0
1.11 +
1.12 +if [ -n "$GNOME2_DIR" ]; then
1.13 + ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
1.14 + LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
1.15 + PATH="$GNOME2_DIR/bin:$PATH"
1.16 + export PATH
1.17 + export LD_LIBRARY_PATH
1.18 +fi
1.19 +
1.20 +(test -f $srcdir/configure.in) || {
1.21 + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
1.22 + echo " top-level package directory"
1.23 + exit 1
1.24 +}
1.25 +
1.26 +(autoconf --version) < /dev/null > /dev/null 2>&1 || {
1.27 + echo
1.28 + echo "**Error**: You must have \`autoconf' installed."
1.29 + echo "Download the appropriate package for your distribution,"
1.30 + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
1.31 + DIE=1
1.32 +}
1.33 +
1.34 +(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
1.35 + (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
1.36 + echo
1.37 + echo "**Error**: You must have \`intltool' installed."
1.38 + echo "You can get it from:"
1.39 + echo " ftp://ftp.gnome.org/pub/GNOME/"
1.40 + DIE=1
1.41 + }
1.42 +}
1.43 +
1.44 +(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
1.45 + (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
1.46 + echo
1.47 + echo "**Error**: You must have \`xml-i18n-toolize' installed."
1.48 + echo "You can get it from:"
1.49 + echo " ftp://ftp.gnome.org/pub/GNOME/"
1.50 + DIE=1
1.51 + }
1.52 +}
1.53 +
1.54 +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
1.55 + (libtool --version) < /dev/null > /dev/null 2>&1 || {
1.56 + echo
1.57 + echo "**Error**: You must have \`libtool' installed."
1.58 + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
1.59 + DIE=1
1.60 + }
1.61 +}
1.62 +
1.63 +(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
1.64 + (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
1.65 + (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
1.66 + echo
1.67 + echo "**Error**: You must have \`glib' installed."
1.68 + echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
1.69 + DIE=1
1.70 + }
1.71 +}
1.72 +
1.73 +(automake --version) < /dev/null > /dev/null 2>&1 || {
1.74 + echo
1.75 + echo "**Error**: You must have \`automake' installed."
1.76 + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
1.77 + DIE=1
1.78 + NO_AUTOMAKE=yes
1.79 +}
1.80 +
1.81 +
1.82 +# if no automake, don't bother testing for aclocal
1.83 +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
1.84 + echo
1.85 + echo "**Error**: Missing \`aclocal'. The version of \`automake'"
1.86 + echo "installed doesn't appear recent enough."
1.87 + echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
1.88 + DIE=1
1.89 +}
1.90 +
1.91 +if test "$DIE" -eq 1; then
1.92 + exit 1
1.93 +fi
1.94 +
1.95 +if test -z "$*"; then
1.96 + echo "**Warning**: I am going to run \`configure' with no arguments."
1.97 + echo "If you wish to pass any to it, please specify them on the"
1.98 + echo \`$0\'" command line."
1.99 + echo
1.100 +fi
1.101 +
1.102 +case $CC in
1.103 +xlc )
1.104 + am_opt=--include-deps;;
1.105 +esac
1.106 +
1.107 +for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.in -print`
1.108 +do
1.109 + dr=`dirname $coin`
1.110 + if test -f $dr/NO-AUTO-GEN; then
1.111 + echo skipping $dr -- flagged as no auto-gen
1.112 + else
1.113 + echo processing $dr
1.114 + ( cd $dr
1.115 +
1.116 + aclocalinclude="$ACLOCAL_FLAGS"
1.117 +
1.118 + if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
1.119 + echo "Creating $dr/aclocal.m4 ..."
1.120 + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
1.121 + echo "Running glib-gettextize... Ignore non-fatal messages."
1.122 + echo "no" | glib-gettextize --force --copy
1.123 + echo "Making $dr/aclocal.m4 writable ..."
1.124 + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
1.125 + fi
1.126 + if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
1.127 + echo "Running intltoolize..."
1.128 + intltoolize --copy --force --automake
1.129 + fi
1.130 + if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
1.131 + echo "Running xml-i18n-toolize..."
1.132 + xml-i18n-toolize --copy --force --automake
1.133 + fi
1.134 + if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
1.135 + if test -z "$NO_LIBTOOLIZE" ; then
1.136 + echo "Running libtoolize..."
1.137 + libtoolize --force --copy
1.138 + fi
1.139 + fi
1.140 + echo "Running aclocal $aclocalinclude ..."
1.141 + aclocal $aclocalinclude
1.142 + if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
1.143 + echo "Running autoheader..."
1.144 + autoheader
1.145 + fi
1.146 + echo "Running automake --gnu $am_opt ..."
1.147 + automake --add-missing --gnu $am_opt
1.148 + echo "Running autoconf ..."
1.149 + autoconf
1.150 + )
1.151 + fi
1.152 +done
1.153 +
1.154 +conf_flags="--enable-maintainer-mode"
1.155 +
1.156 +if test x$NOCONFIGURE = x; then
1.157 + echo Running $srcdir/configure $conf_flags "$@" ...
1.158 + $srcdir/configure $conf_flags "$@" \
1.159 + && echo Now type \`make\' to compile. || exit 1
1.160 +else
1.161 + echo Skipping configure process.
1.162 +fi
.