mirror of
https://github.com/videolan/vlc.git
synced 2024-12-12 19:23:43 +08:00
3b851f4e9c
It is still possible to compile from tarball without pkg-config, though the result will probably be quite useless.
104 lines
2.3 KiB
Bash
Executable File
104 lines
2.3 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
## bootstrap file for the VLC media player
|
|
##
|
|
## Copyright (C) 2005-2008 the VideoLAN team
|
|
##
|
|
## Authors: Sam Hocevar <sam@zoy.org>
|
|
## Rémi Denis-Courmont <rem # videolan # org>
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
if test "$#" != "0"; then
|
|
echo "Usage: $0"
|
|
echo " Calls autoreconf to generate m4 macros and prepare Makefiles."
|
|
exit 1
|
|
fi
|
|
|
|
ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
|
|
|
|
###
|
|
### Get a sane environment, just in case
|
|
###
|
|
CYGWIN=binmode
|
|
export CYGWIN
|
|
|
|
# Check for contrib directory
|
|
if test -d extras/contrib/build/bin; then
|
|
PATH="`pwd`/extras/contrib/build/bin:$PATH"
|
|
if test -d extras/contrib/build/share/aclocal; then
|
|
ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/build/share/aclocal"
|
|
fi
|
|
if test ".`uname -s`" = ".Darwin"; then
|
|
LD_LIBRARY_PATH=./extras/contrib/build/lib:$LD_LIBRARY_PATH
|
|
DYLD_LIBRARY_PATH=./extras/contrib/build/lib:$DYLD_LIBRARY_PATH
|
|
export LD_LIBRARY_PATH
|
|
export DYLD_LIBRARY_PATH
|
|
fi
|
|
fi
|
|
|
|
# Check for pkg-config
|
|
if ! "${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
|
|
echo 'Error: "pkg-config" is not installed.' >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Prepare m4/private.m4
|
|
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
|
|
dnl Private VLC macros - generated by bootstrap
|
|
EOF
|
|
|
|
# Check for autopoint (GNU gettext)
|
|
export AUTOPOINT
|
|
test "$AUTOPOINT" || AUTOPOINT=autopoint
|
|
if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
|
|
AUTOPOINT=true
|
|
cat << EOF
|
|
NOTE: GNU gettext appears to be missing or out-of-date.
|
|
Please install or update GNU gettext.
|
|
Also check if you have cvs, a dependency of autopoint.
|
|
Otherwise, you will not be able to build a source tarball.
|
|
==============================================================
|
|
|
|
EOF
|
|
fi
|
|
|
|
###
|
|
### Generate the modules makefile, by parsing modules/**/Modules.am
|
|
###
|
|
|
|
echo "generating modules/**/Makefile.am"
|
|
find modules/ -name Modules.am | \
|
|
sed -ne 's,modules/\(.*\)/Modules.am,\1,p' | \
|
|
while read d; do
|
|
sh modules/genmf "$d"
|
|
printf "."
|
|
done
|
|
printf "\n"
|
|
|
|
set -x
|
|
|
|
###
|
|
### classic bootstrap stuff
|
|
###
|
|
|
|
# Automake complains if these are not present
|
|
echo > ABOUT-NLS
|
|
cp -f INSTALL INSTALL.git
|
|
|
|
autoreconf --install --force --verbose ${ACLOCAL_ARGS}
|
|
rm -f po/Makevars.template ABOUT-NLS
|
|
echo > ABOUT-NLS
|
|
mv -f INSTALL.git INSTALL
|
|
|
|
##
|
|
## files which need to be regenerated
|
|
##
|
|
rm -f stamp-h*
|
|
|
|
# Shut up
|
|
set +x
|
|
echo "Successfully bootstrapped"
|