bootstrap 1.72 KB
Newer Older
1 2
#! /bin/sh

3
##  bootstrap file for the VLC media player
4
##
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
5
## Copyright (C) 2005-2008 the VideoLAN team
6
##
7 8
##  Authors: Sam Hocevar <sam@zoy.org>
##           Rémi Denis-Courmont <rem # videolan # org>
9

10 11 12 13
set -e

cd "$(dirname "$0")"

Sam Hocevar's avatar
Sam Hocevar committed
14 15
if test "$#" != "0"; then
  echo "Usage: $0"
16
  echo "  Calls autoreconf to generate m4 macros and prepare Makefiles."
17 18 19
  exit 1
fi

20 21
ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"

22 23 24 25 26
# Check for tools directory
if test -d extras/tools/build/bin; then
  PATH="`pwd`/extras/tools/build/bin:$PATH"
fi

27
###
28
###  Get a sane environment, just in case
29
###
30 31
CYGWIN=binmode
export CYGWIN
32

33 34 35 36 37 38
# Check for pkg-config
if ! "${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
	echo 'Error: "pkg-config" is not installed.' >&2
	exit 1
fi

39 40 41 42 43 44
# Check for autopoint (GNU gettext)
export AUTOPOINT
test "$AUTOPOINT" || AUTOPOINT=autopoint
if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
	AUTOPOINT=true
	cat << EOF
45 46
NOTE: autopoint (GNU gettext-tools) appears to be missing or out-of-date.
Please install or update GNU gettext tools.
47
Otherwise, you will not be able to build a source tarball.
48
==========================================================================
49 50 51

EOF
fi
52

53 54
# Check for flex and bison
if ! flex --version >/dev/null 2>&1; then
55 56 57 58
	echo "ERROR: flex is not installed." >&2
	if ! test -f modules/codec/webvtt/CSSLexer.c; then
		exit 1
	fi
59 60 61
fi

if ! bison --version >/dev/null 2>&1; then
62 63 64 65
	echo "ERROR: GNU bison is not installed." >&2
	if ! test -f modules/codec/webvtt/CSSGrammar.c; then
		exit 1
	fi
66 67
fi

68
###
69
###  classic bootstrap stuff
70
###
71

72
autoreconf --install --force --verbose ${ACLOCAL_ARGS}
73
rm -f po/Makevars.template
74 75

##
Sam Hocevar's avatar
Sam Hocevar committed
76
##  files which need to be regenerated
77
##
78
rm -f stamp-h*
79

80
# Shut up
81
set +x
82
echo "Successfully bootstrapped"