PageRenderTime 37ms CodeModel.GetById 22ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/liblo-0.26/autogen.sh

#
Shell | 121 lines | 108 code | 11 blank | 2 comment | 19 complexity | e825e3b038763a5ae2e6498df501f27f MD5 | raw file
Possible License(s): LGPL-2.1
  1#!/bin/sh
  2# Run this to generate all the initial makefiles, etc.
  3
  4srcdir=`dirname $0`
  5test -z "$srcdir" && srcdir=.
  6
  7DIE=0
  8
  9(test -f $srcdir/configure.ac) || {
 10    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
 11    echo " top-level package directory"
 12    exit 1
 13}
 14
 15(autoconf --version) < /dev/null > /dev/null 2>&1 || {
 16  echo
 17  echo "**Error**: You must have \`autoconf' installed."
 18  echo "Download the appropriate package for your distribution,"
 19  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
 20  DIE=1
 21}
 22
 23(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
 24  (libtoolize --version) < /dev/null > /dev/null 2>&1 \
 25	  && LIBTOOLIZE=libtoolize || {
 26	(glibtoolize --version) < /dev/null > /dev/null 2>&1 \
 27		&& LIBTOOLIZE=glibtoolize || {
 28      echo
 29      echo "**Error**: You must have \`libtool' installed."
 30      echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
 31      DIE=1
 32    }
 33  }
 34}
 35
 36(automake --version) < /dev/null > /dev/null 2>&1 || {
 37  echo
 38  echo "**Error**: You must have \`automake' installed."
 39  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
 40  DIE=1
 41  NO_AUTOMAKE=yes
 42}
 43
 44
 45# if no automake, don't bother testing for aclocal
 46test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
 47  echo
 48  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
 49  echo "installed doesn't appear recent enough."
 50  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
 51  DIE=1
 52}
 53
 54if test "$DIE" -eq 1; then
 55  exit 1
 56fi
 57
 58if test -z "$*"; then
 59  echo "**Warning**: I am going to run \`configure' with no arguments."
 60  echo "If you wish to pass any to it, please specify them on the"
 61  echo \`$0\'" command line."
 62  echo
 63fi
 64
 65case $CC in
 66xlc )
 67  am_opt=--include-deps;;
 68esac
 69
 70for coin in `find $srcdir -name configure.ac -print`
 71do 
 72  dr=`dirname $coin`
 73  if test -f $dr/NO-AUTO-GEN; then
 74    echo skipping $dr -- flagged as no auto-gen
 75  else
 76    echo processing $dr
 77    ( cd $dr
 78
 79      aclocalinclude="$ACLOCAL_FLAGS"
 80
 81      if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
 82	echo "Creating $dr/aclocal.m4 ..."
 83	test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
 84	echo "Running glib-gettextize...  Ignore non-fatal messages."
 85	echo "no" | glib-gettextize --force --copy
 86	echo "Making $dr/aclocal.m4 writable ..."
 87	test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
 88      fi
 89      if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
 90        echo "Running intltoolize..."
 91	intltoolize --copy --force --automake
 92      fi
 93      if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
 94	if test -z "$NO_LIBTOOLIZE" ; then 
 95	  echo "Running libtoolize..."
 96	  $LIBTOOLIZE --force --copy
 97	fi
 98      fi
 99      echo "Running aclocal $aclocalinclude ..."
100      aclocal $aclocalinclude
101      if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
102	echo "Running autoheader..."
103	autoheader
104      fi
105      echo "Running automake --gnu $am_opt ..."
106      automake --add-missing --gnu $am_opt
107      echo "Running autoconf ..."
108      autoconf
109    )
110  fi
111done
112
113conf_flags="--enable-maintainer-mode"
114
115if test x$NOCONFIGURE = x; then
116  echo Running $srcdir/configure $conf_flags "$@" ...
117  $srcdir/configure $conf_flags "$@" \
118  && echo Now type \`make\' to compile. || exit 1
119else
120  echo Skipping configure process.
121fi