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
/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
45 elif test ".`uname -s`" = ".Darwin"; then
48 echo "ERR: Contribs haven't been built"
49 echo "ERR: Please run:"
51 echo "ERR: 'cd extras/contrib && ./bootstrap && make && cd ../..'"
53 echo "ERR: Make sure fink has been disabled too."
59 # Check for pkg-config
60 if pkg-config
--version >/dev
/null
2>&1; then
61 # We have pkg-config, everything is cool.
67 # Check for autopoint (GNU gettext)
69 test "$AUTOPOINT" || AUTOPOINT
=autopoint
70 if ! "$AUTOPOINT" --dry-run --force >/dev
/null
2>&1; then
76 ## Generate the modules makefile, by parsing modules/**/Modules.am
80 echo "generating modules/**/Makefile.am"
82 # Prepare m4/private.m4
83 rm -f m
4/private.
m4 && cat > m
4/private.
m4 << EOF
84 dnl Private VLC macros - generated by bootstrap
88 if [ "${PKGCONFIG}" = "no" ]; then cat >> m
4/private.
m4 << EOF
89 dnl User does not have pkg-config, so assume package was not found
90 AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
95 sh modules
/genmf
`sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
98 ### classic bootstrap stuff
102 # Automake complains if these are not present
105 cp -f INSTALL INSTALL.git
107 autoreconf
--install --force --verbose ${ACLOCAL_ARGS}
108 rm -f po
/Makevars.template ABOUT-NLS
110 mv -f INSTALL.git INSTALL
113 ## files which need to be regenerated
115 rm -f vlc-config.
in vlc-config
122 ## Tell the user about gettext, pkg-config and sed
124 if [ "$AUTOPOINT" = "true" ]; then
127 ==============================================================
128 NOTE: GNU gettext appears to be missing or out-of-date.
129 Please install or update GNU gettext.
130 Also check if you have cvs, a dependency of autopoint.
131 Otherwise, you will not be able to build a source tarball.
135 if [ "$PKGCONFIG" = "no" ]; then
138 ==============================================================
139 NOTE: "pkg-config" is missing from your system. Certain
140 libraries may not be detected properly.
144 echo "Successfully bootstrapped"