]> git.sesse.net Git - vlc/blob - bootstrap
We don't use extras/contrib anymore, no need to look there
[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 ###
23 ###  Get a sane environment, just in case
24 ###
25 CYGWIN=binmode
26 export CYGWIN
27
28 # Check for pkg-config
29 if ! "${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
30         echo 'Error: "pkg-config" is not installed.' >&2
31         exit 1
32 fi
33
34 # Prepare m4/private.m4
35 rm -f m4/private.m4 && cat > m4/private.m4 << EOF
36 dnl  Private VLC macros - generated by bootstrap
37 EOF
38
39 # Check for autopoint (GNU gettext)
40 export AUTOPOINT
41 test "$AUTOPOINT" || AUTOPOINT=autopoint
42 if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
43         AUTOPOINT=true
44         cat << EOF
45 NOTE: GNU gettext appears to be missing or out-of-date.
46 Please install or update GNU gettext.
47 Also check if you have cvs, a dependency of autopoint.
48 Otherwise, you will not be able to build a source tarball.
49 ==============================================================
50
51 EOF
52 fi
53
54 ###
55 ### Generate the modules makefile, by parsing modules/**/Modules.am
56 ###
57
58 echo "generating modules/**/Makefile.am"
59 find modules/ -name Modules.am | \
60 sed -ne 's,modules/\(.*\)/Modules.am,\1,p' | \
61 while read d; do
62         sh modules/genmf "$d"
63         printf "."
64 done
65 printf "\n"
66
67 set -x
68
69 ###
70 ###  classic bootstrap stuff
71 ###
72
73 # Automake complains if these are not present
74 echo > ABOUT-NLS
75 cp -f INSTALL INSTALL.git
76
77 autoreconf --install --force --verbose ${ACLOCAL_ARGS}
78 rm -f po/Makevars.template ABOUT-NLS
79 echo > ABOUT-NLS
80 mv -f INSTALL.git INSTALL
81
82 ##
83 ##  files which need to be regenerated
84 ##
85 rm -f stamp-h*
86
87 # Shut up
88 set +x
89 echo "Successfully bootstrapped"