Search
lxdream.org :: lxdream/autogen.sh
lxdream 0.9.1
released Jun 29
Download Now
filename autogen.sh
changeset 1:eea311cfd33e
author nkeynes
date Sat Aug 05 00:18:21 2006 +0000 (13 years ago)
permissions -rwxr-xr-x
last change Add error lines to tests with incomplete polys
Split clip tests to separate data file
Add tests for cmd bit 23 ("use list size field")
view annotate diff log raw
     1 #!/bin/sh
     2 # Run this to generate all the initial makefiles, etc.
     4 srcdir=`dirname $0`
     5 test -z "$srcdir" && srcdir=.
     7 DIE=0
     9 if [ -n "$GNOME2_DIR" ]; then
    10 	ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
    11 	LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
    12 	PATH="$GNOME2_DIR/bin:$PATH"
    13 	export PATH
    14 	export LD_LIBRARY_PATH
    15 fi
    17 (test -f $srcdir/configure.in) || {
    18     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
    19     echo " top-level package directory"
    20     exit 1
    21 }
    23 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
    24   echo
    25   echo "**Error**: You must have \`autoconf' installed."
    26   echo "Download the appropriate package for your distribution,"
    27   echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
    28   DIE=1
    29 }
    31 (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
    32   (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
    33     echo 
    34     echo "**Error**: You must have \`intltool' installed."
    35     echo "You can get it from:"
    36     echo "  ftp://ftp.gnome.org/pub/GNOME/"
    37     DIE=1
    38   }
    39 }
    41 (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
    42   (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
    43     echo
    44     echo "**Error**: You must have \`xml-i18n-toolize' installed."
    45     echo "You can get it from:"
    46     echo "  ftp://ftp.gnome.org/pub/GNOME/"
    47     DIE=1
    48   }
    49 }
    51 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
    52   (libtool --version) < /dev/null > /dev/null 2>&1 || {
    53     echo
    54     echo "**Error**: You must have \`libtool' installed."
    55     echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
    56     DIE=1
    57   }
    58 }
    60 (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
    61   (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
    62   (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
    63     echo
    64     echo "**Error**: You must have \`glib' installed."
    65     echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
    66     DIE=1
    67   }
    68 }
    70 (automake --version) < /dev/null > /dev/null 2>&1 || {
    71   echo
    72   echo "**Error**: You must have \`automake' installed."
    73   echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
    74   DIE=1
    75   NO_AUTOMAKE=yes
    76 }
    79 # if no automake, don't bother testing for aclocal
    80 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
    81   echo
    82   echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
    83   echo "installed doesn't appear recent enough."
    84   echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
    85   DIE=1
    86 }
    88 if test "$DIE" -eq 1; then
    89   exit 1
    90 fi
    92 if test -z "$*"; then
    93   echo "**Warning**: I am going to run \`configure' with no arguments."
    94   echo "If you wish to pass any to it, please specify them on the"
    95   echo \`$0\'" command line."
    96   echo
    97 fi
    99 case $CC in
   100 xlc )
   101   am_opt=--include-deps;;
   102 esac
   104 for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.in -print`
   105 do 
   106   dr=`dirname $coin`
   107   if test -f $dr/NO-AUTO-GEN; then
   108     echo skipping $dr -- flagged as no auto-gen
   109   else
   110     echo processing $dr
   111     ( cd $dr
   113       aclocalinclude="$ACLOCAL_FLAGS"
   115       if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
   116 	echo "Creating $dr/aclocal.m4 ..."
   117 	test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
   118 	echo "Running glib-gettextize...  Ignore non-fatal messages."
   119 	echo "no" | glib-gettextize --force --copy
   120 	echo "Making $dr/aclocal.m4 writable ..."
   121 	test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
   122       fi
   123       if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
   124         echo "Running intltoolize..."
   125 	intltoolize --copy --force --automake
   126       fi
   127       if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
   128         echo "Running xml-i18n-toolize..."
   129 	xml-i18n-toolize --copy --force --automake
   130       fi
   131       if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
   132 	if test -z "$NO_LIBTOOLIZE" ; then 
   133 	  echo "Running libtoolize..."
   134 	  libtoolize --force --copy
   135 	fi
   136       fi
   137       echo "Running aclocal $aclocalinclude ..."
   138       aclocal $aclocalinclude
   139       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
   140 	echo "Running autoheader..."
   141 	autoheader
   142       fi
   143       echo "Running automake --gnu $am_opt ..."
   144       automake --add-missing --gnu $am_opt
   145       echo "Running autoconf ..."
   146       autoconf
   147     )
   148   fi
   149 done
   151 conf_flags="--enable-maintainer-mode"
   153 if test x$NOCONFIGURE = x; then
   154   echo Running $srcdir/configure $conf_flags "$@" ...
   155   $srcdir/configure $conf_flags "$@" \
   156   && echo Now type \`make\' to compile. || exit 1
   157 else
   158   echo Skipping configure process.
   159 fi
.