vlc/bootstrap

90 lines
1.8 KiB
Plaintext
Raw Normal View History

#! /bin/sh
## bootstrap file for the VLC media player
##
2008-03-23 20:43:06 +01:00
## Copyright (C) 2005-2008 the VideoLAN team
##
2006-03-04 21:24:19 +01:00
## Authors: Sam Hocevar <sam@zoy.org>
## Rémi Denis-Courmont <rem # videolan # org>
2011-08-30 18:32:56 +02:00
set -e
cd "$(dirname "$0")"
if test "$#" != "0"; then
echo "Usage: $0"
2008-03-23 20:30:28 +01:00
echo " Calls autoreconf to generate m4 macros and prepare Makefiles."
exit 1
fi
2011-08-30 18:32:56 +02:00
ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
###
### Get a sane environment, just in case
###
CYGWIN=binmode
export CYGWIN
# 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
2011-08-30 18:32:56 +02:00
# Prepare m4/private.m4
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
dnl Private VLC macros - generated by bootstrap
EOF
2011-08-30 18:32:56 +02:00
# 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
2011-08-30 18:32:56 +02:00
###
### 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"
2007-07-29 10:47:13 +02:00
2011-08-30 18:32:56 +02:00
set -x
###
### classic bootstrap stuff
###
# Automake complains if these are not present
echo > ABOUT-NLS
2008-03-23 20:43:35 +01:00
cp -f INSTALL INSTALL.git
2008-03-25 17:55:30 +01:00
autoreconf --install --force --verbose ${ACLOCAL_ARGS}
rm -f po/Makevars.template ABOUT-NLS
echo > ABOUT-NLS
2008-03-23 20:43:35 +01:00
mv -f INSTALL.git INSTALL
##
## files which need to be regenerated
##
rm -f stamp-h*
# Shut up
set +x
echo "Successfully bootstrapped"