3 ## bootstrap file for the VLC media player
5 ## Copyright (C) 2005-2008 the VideoLAN team
7 ## Authors: Sam Hocevar <sam@zoy.org>
8 ## RĂ©mi Denis-Courmont <rem # videolan # org>
10 if test "$#" != "0"; then
12 echo " Calls autoreconf to generate m4 macros and prepare Makefiles."
17 ### Get a sane environment, just in case
26 ## Check for various tools
29 ACLOCAL_ARGS
="-I m4 ${ACLOCAL_ARGS}"
31 # Check for contrib directory
32 if test -d extras
/contrib
/bin
; then
33 PATH
="`pwd`/extras/contrib/bin:$PATH"
34 if test -d extras
/contrib
/share
/aclocal
; then
35 ACLOCAL_ARGS
="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
37 if test ".`uname -s`" = ".Darwin"; then
38 LD_LIBRARY_PATH
=.
/extras
/contrib
/lib
:$LD_LIBRARY_PATH
39 DYLD_LIBRARY_PATH
=.
/extras
/contrib
/lib
:$DYLD_LIBRARY_PATH
40 export LD_LIBRARY_PATH
41 export DYLD_LIBRARY_PATH
42 elif test ".`uname -s`" = ".BeOS"; then
43 LIBRARY_PATH
=.
/extras
/contrib
/lib
:$LIBRARY_PATH
44 BELIBRARIES
=.
/extras
/contrib
/lib
:$BELIBRARIES
48 elif test ".`uname -s`" = ".Darwin"; then
51 echo "ERR: Contribs haven't been built"
52 echo "ERR: Please run:"
54 echo "ERR: 'cd extras/contrib && ./bootstrap && make && cd ../..'"
56 echo "ERR: Make sure fink has been disabled too."
62 # Check for pkg-config
63 if pkg-config
--version >/dev
/null
2>&1; then
64 # We have pkg-config, everything is cool.
70 # Check for autopoint (GNU gettext)
72 test "$AUTOPOINT" || AUTOPOINT
=autopoint
73 if ! "$AUTOPOINT" --dry-run --force >/dev
/null
2>&1; then
79 ## Generate the modules makefile, by parsing modules/**/Modules.am
83 echo "generating modules/**/Makefile.am"
85 # Prepare m4/private.m4
86 rm -f m
4/private.
m4 && cat > m
4/private.
m4 << EOF
87 dnl Private VLC macros - generated by bootstrap
91 if [ "${PKGCONFIG}" = "no" ]; then cat >> m
4/private.
m4 << EOF
92 dnl User does not have pkg-config, so assume package was not found
93 AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
98 modules
/genmf
`sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
101 ### classic bootstrap stuff
105 # Automake complains if these are not present
108 cp -f INSTALL INSTALL.git
110 autoreconf
--install --force --verbose ${ACLOCAL_ARGS}
111 rm -f po
/Makevars.template ABOUT-NLS
113 mv -f INSTALL.git INSTALL
115 # Patch po/Makefile.in.in but it's not a drama if it fails
116 patch -p1 < po
/makefile-qt4.
patch || true
119 ## files which need to be regenerated
121 rm -f vlc-config.
in vlc-config
122 rm -f src
/misc
/modules_builtin.h
123 rm -f stamp-builtin stamp-h
* mozilla
/stamp-pic
129 ## Tell the user about gettext, pkg-config and sed
131 if [ "$AUTOPOINT" = "true" ]; then
134 ==============================================================
135 NOTE: GNU gettext appears to be missing or out-of-date.
136 Please install or update GNU gettext.
137 Also check if you have cvs, a dependency of autopoint.
138 Otherwise, you will not be able to build a source tarball.
142 if [ "$PKGCONFIG" = "no" ]; then
145 ==============================================================
146 NOTE: "pkg-config" is missing from your system. Certain
147 libraries may not be detected properly.
151 echo "Successfully bootstrapped"