Include: add some win32 comment
[vlc.git] / bootstrap
bloba17fb78e978def60bad70a5393fb73a855a2a736
1 #! /bin/sh
3 ## bootstrap file for the VLC media player
4 ##
5 ## Copyright (C) 2005-2008 the VideoLAN team
6 ##
7 ## Authors: Sam Hocevar <sam@zoy.org>
8 ## RĂ©mi Denis-Courmont <rem # videolan # org>
10 set -e
12 cd "$(dirname "$0")"
14 if test "$#" != "0"; then
15 echo "Usage: $0"
16 echo " Calls autoreconf to generate m4 macros and prepare Makefiles."
17 exit 1
20 ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
22 ###
23 ### Get a sane environment, just in case
24 ###
25 CYGWIN=binmode
26 export CYGWIN
28 # Check for contrib directory
29 if test -d extras/contrib/build/bin; then
30 PATH="`pwd`/extras/contrib/build/bin:$PATH"
31 if test -d extras/contrib/build/share/aclocal; then
32 ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/build/share/aclocal"
34 if test ".`uname -s`" = ".Darwin"; then
35 LD_LIBRARY_PATH=./extras/contrib/build/lib:$LD_LIBRARY_PATH
36 DYLD_LIBRARY_PATH=./extras/contrib/build/lib:$DYLD_LIBRARY_PATH
37 export LD_LIBRARY_PATH
38 export DYLD_LIBRARY_PATH
42 # Prepare m4/private.m4
43 rm -f m4/private.m4 && cat > m4/private.m4 << EOF
44 dnl Private VLC macros - generated by bootstrap
45 EOF
47 # Check for pkg-config
48 if ! pkg-config --version >/dev/null 2>&1; then
49 cat << EOF
50 NOTE: "pkg-config" is missing from your system.
51 Many underlying libraries will not be detected.
52 ==============================================================
54 EOF
55 cat >> m4/private.m4 << EOF
56 dnl User does not have pkg-config, so assume package was not found
57 AC_DEFUN([PKG_CHECK_MODULES],[ifelse([\$4], , :, [\$4])])
59 EOF
62 # Check for autopoint (GNU gettext)
63 export AUTOPOINT
64 test "$AUTOPOINT" || AUTOPOINT=autopoint
65 if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
66 AUTOPOINT=true
67 cat << EOF
68 NOTE: GNU gettext appears to be missing or out-of-date.
69 Please install or update GNU gettext.
70 Also check if you have cvs, a dependency of autopoint.
71 Otherwise, you will not be able to build a source tarball.
72 ==============================================================
74 EOF
77 ###
78 ### Generate the modules makefile, by parsing modules/**/Modules.am
79 ###
81 echo "generating modules/**/Makefile.am"
82 find modules/ -name Modules.am | \
83 sed -ne 's,modules/\(.*\)/Modules.am,\1,p' | \
84 while read d; do
85 sh modules/genmf "$d"
86 printf "."
87 done
88 printf "\n"
90 set -x
92 ###
93 ### classic bootstrap stuff
94 ###
96 # Automake complains if these are not present
97 echo > ABOUT-NLS
98 cp -f INSTALL INSTALL.git
100 autoreconf --install --force --verbose ${ACLOCAL_ARGS}
101 rm -f po/Makevars.template ABOUT-NLS
102 echo > ABOUT-NLS
103 mv -f INSTALL.git INSTALL
106 ## files which need to be regenerated
108 rm -f stamp-h*
110 # Shut up
111 set +x
112 echo "Successfully bootstrapped"