Qt: layout subtitles prefs
[vlc/asuraparaju-public.git] / bootstrap
blob0334f46bc91ba217136f022966d679fd9a700f50
1 #! /bin/sh
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>
10 if test "$#" != "0"; then
11 echo "Usage: $0"
12 echo " Calls autoreconf to generate m4 macros and prepare Makefiles."
13 exit 1
16 ###
17 ### Get a sane environment, just in case
18 ###
19 CYGWIN=binmode
20 export CYGWIN
22 set -e
23 set -x
25 cd "$(dirname "$0")"
28 ## Check for various tools
31 ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
33 # Check for contrib directory
34 if test -d extras/contrib/build/bin; then
35 PATH="`pwd`/extras/contrib/build/bin:$PATH"
36 if test -d extras/contrib/build/share/aclocal; then
37 ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/build/share/aclocal"
39 if test ".`uname -s`" = ".Darwin"; then
40 LD_LIBRARY_PATH=./extras/contrib/build/lib:$LD_LIBRARY_PATH
41 DYLD_LIBRARY_PATH=./extras/contrib/build/lib:$DYLD_LIBRARY_PATH
42 export LD_LIBRARY_PATH
43 export DYLD_LIBRARY_PATH
44 elif test ".`uname -s`" = ".BeOS"; then
45 LIBRARY_PATH=./extras/contrib/build/lib:$LIBRARY_PATH
46 BELIBRARIES=./extras/contrib/build/lib:$BELIBRARIES
47 export LIBRARY_PATH
48 export BELIBRARIES
50 elif test ".`uname -s`" = ".Darwin"; then
51 set +x
52 echo ""
53 echo "ERR: Contribs haven't been built"
54 echo "ERR: Please run:"
55 echo "ERR: "
56 echo "ERR: 'cd extras/contrib && ./bootstrap && make && cd ../..'"
57 echo "ERR: "
58 echo "ERR: Make sure fink has been disabled too."
59 echo ""
60 set -x
61 exit 1
64 # Check for pkg-config
65 if pkg-config --version >/dev/null 2>&1; then
66 # We have pkg-config, everything is cool.
67 PKGCONFIG=yes
68 else
69 PKGCONFIG=no
72 # Check for autopoint (GNU gettext)
73 export AUTOPOINT
74 test "$AUTOPOINT" || AUTOPOINT=autopoint
75 if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
76 AUTOPOINT=true
77 echo > ABOUT-NLS
81 ## Generate the modules makefile, by parsing modules/**/Modules.am
84 set +x
85 echo "generating modules/**/Makefile.am"
87 # Prepare m4/private.m4
88 rm -f m4/private.m4 && cat > m4/private.m4 << EOF
89 dnl Private VLC macros - generated by bootstrap
91 EOF
93 if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF
94 dnl User does not have pkg-config, so assume package was not found
95 AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
97 EOF
100 sh modules/genmf `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
103 ### classic bootstrap stuff
105 set -x
107 # Automake complains if these are not present
108 echo > vlc-config.in
109 echo > ABOUT-NLS
110 cp -f INSTALL INSTALL.git
112 autoreconf --install --force --verbose ${ACLOCAL_ARGS}
113 rm -f po/Makevars.template ABOUT-NLS
114 echo > ABOUT-NLS
115 mv -f INSTALL.git INSTALL
118 ## files which need to be regenerated
120 rm -f vlc-config.in vlc-config
121 rm -f src/misc/modules_builtin.h
122 rm -f stamp-builtin stamp-h* mozilla/stamp-pic
124 # Shut up
125 set +x
128 ## Tell the user about gettext, pkg-config and sed
130 if [ "$AUTOPOINT" = "true" ]; then
131 cat << EOF
133 ==============================================================
134 NOTE: GNU gettext appears to be missing or out-of-date.
135 Please install or update GNU gettext.
136 Also check if you have cvs, a dependency of autopoint.
137 Otherwise, you will not be able to build a source tarball.
141 if [ "$PKGCONFIG" = "no" ]; then
142 cat << EOF
144 ==============================================================
145 NOTE: "pkg-config" is missing from your system. Certain
146 libraries may not be detected properly.
150 echo "Successfully bootstrapped"