]> git.sesse.net Git - vlc/blob - bootstrap
demux: ts: parse SL config
[vlc] / bootstrap
1 #! /bin/sh
2
3 ##  bootstrap file for the VLC media player
4 ##
5 ## Copyright (C) 2005-2008 the VideoLAN team
6 ##
7 ##  Authors: Sam Hocevar <sam@zoy.org>
8 ##           RĂ©mi Denis-Courmont <rem # videolan # org>
9
10 set -e
11
12 cd "$(dirname "$0")"
13
14 if test "$#" != "0"; then
15   echo "Usage: $0"
16   echo "  Calls autoreconf to generate m4 macros and prepare Makefiles."
17   exit 1
18 fi
19
20 ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
21
22 # Check for tools directory
23 if test -d extras/tools/build/bin; then
24   PATH="`pwd`/extras/tools/build/bin:$PATH"
25 fi
26
27 ###
28 ###  Get a sane environment, just in case
29 ###
30 CYGWIN=binmode
31 export CYGWIN
32
33 # Check for pkg-config
34 if ! "${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
35         echo 'Error: "pkg-config" is not installed.' >&2
36         exit 1
37 fi
38
39 # Prepare m4/private.m4
40 rm -f m4/private.m4 && cat > m4/private.m4 << EOF
41 dnl  Private VLC macros - generated by bootstrap
42 EOF
43
44 # Check for autopoint (GNU gettext)
45 export AUTOPOINT
46 test "$AUTOPOINT" || AUTOPOINT=autopoint
47 if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
48         AUTOPOINT=true
49         cat << EOF
50 NOTE: GNU gettext appears to be missing or out-of-date.
51 Please install or update GNU gettext.
52 Also check if you have cvs, a dependency of autopoint.
53 Otherwise, you will not be able to build a source tarball.
54 ==============================================================
55
56 EOF
57 fi
58
59 ###
60 ### Generate the modules makefile, by parsing modules/**/Modules.am
61 ###
62
63 echo "generating modules/**/Makefile.am"
64 for d in modules/*/*/Modules.am; do
65         d="${d#modules/}"
66         d="${d%/Modules.am}"
67         ${CONFIG_SHELL-sh} modules/genmf "$d"
68         printf "."
69 done
70 printf "\n"
71
72 set -x
73
74 ###
75 ###  classic bootstrap stuff
76 ###
77
78 autoreconf --install --force --verbose ${ACLOCAL_ARGS}
79 rm -f po/Makevars.template
80
81 ##
82 ##  files which need to be regenerated
83 ##
84 rm -f stamp-h*
85
86 # Shut up
87 set +x
88 echo "Successfully bootstrapped"