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
28 ## Check for various tools
31 ACLOCAL_ARGS
="-I m4 ${ACLOCAL_ARGS}"
33 # Check for contrib directory
34 if test -d extras
/contrib
/bin
; then
35 PATH
="`pwd`/extras/contrib/bin:$PATH"
36 if test -d extras
/contrib
/share
/aclocal
; then
37 ACLOCAL_ARGS
="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
39 if test ".`uname -s`" = ".Darwin"; then
40 LD_LIBRARY_PATH
=.
/extras
/contrib
/lib
:$LD_LIBRARY_PATH
41 DYLD_LIBRARY_PATH
=.
/extras
/contrib
/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
/lib
:$LIBRARY_PATH
46 BELIBRARIES
=.
/extras
/contrib
/lib
:$BELIBRARIES
50 elif test ".`uname -s`" = ".Darwin"; then
53 echo "ERR: Contribs haven't been built"
54 echo "ERR: Please run:"
56 echo "ERR: 'cd extras/contrib && ./bootstrap && make && cd ../..'"
58 echo "ERR: Make sure fink has been disabled too."
64 # Check for pkg-config
65 if pkg-config
--version >/dev
/null
2>&1; then
66 # We have pkg-config, everything is cool.
72 # Check for autopoint (GNU gettext)
74 test "$AUTOPOINT" || AUTOPOINT
=autopoint
75 if ! "$AUTOPOINT" --dry-run --force >/dev
/null
2>&1; then
81 ## Generate the modules makefile, by parsing modules/**/Modules.am
85 echo "generating modules/**/Makefile.am"
87 # Prepare m4/private.m4
88 rm -f m
4/private.
m4 && cat > m
4/private.
m4 << EOF
89 dnl Private VLC macros - generated by bootstrap
93 if [ "${PKGCONFIG}" = "no" ]; then cat >> m
4/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])])
100 modules
/genmf
`sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
103 ### classic bootstrap stuff
107 # Automake complains if these are not present
110 cp -f INSTALL INSTALL.git
112 autoreconf
--install --force --verbose ${ACLOCAL_ARGS}
113 rm -f po
/Makevars.template 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
128 ## Tell the user about gettext, pkg-config and sed
130 if [ "$AUTOPOINT" = "true" ]; then
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
144 ==============================================================
145 NOTE: "pkg-config" is missing from your system. Certain
146 libraries may not be detected properly.
150 echo "Successfully bootstrapped"