[go: up one dir, main page]

Menu

[r1]: / trunk / bootstrap  Maximize  Restore  History

Download this file

71 lines (59 with data), 1.4 kB

#! /bin/sh

##  bootstrap file 
##  borrowed from libdvdplay (Sam Hocevar <sam@zoy.org>)

set -x
set -e

# Get a sane environment, just in case
LANG=C
export LANG
CYGWIN=binmode
export CYGWIN

# Check for automake
amvers="no"
if [ -n "$AMVERS" ]; then
  amvers="-$AMVERS"
elif automake-1.10 --version >/dev/null 2>&1; then
  amvers="-1.10"
elif automake-1.9 --version >/dev/null 2>&1; then
  amvers="-1.9"
elif automake-1.8 --version >/dev/null 2>&1; then
  amvers="-1.8"
elif automake-1.7 --version >/dev/null 2>&1; then
  amvers="-1.7"
elif automake --version > /dev/null 2>&1; then
  amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
  if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
    amvers="no"
  else
    amvers=""
  fi
fi

if test "$amvers" = "no"; then
  set +x
  echo "$0: you need automake version 1.5 or later"
  exit 1
fi

# Check for libtool
libtoolize="no"
if libtoolize --version >/dev/null 2>&1; then
  libtoolize="libtoolize"
elif glibtoolize --version >/dev/null 2>&1; then
  libtoolize="glibtoolize"
fi

if test "$libtoolize" = "no"; then
  set +x
  echo "$0: you need libtool"
  exit 1
fi

aclocal${amvers} -I m4 "$@" ${ACLOCAL_FLAGS} 
${libtoolize} --copy --force --ltdl

autoconf
autoheader
automake${amvers} --add-missing --copy

# libltdl
(cd libltdl
aclocal${amvers}

autoconf
autoheader
automake${amvers} --add-missing --copy
)