2 # ***************************************************************************
3 # bootstrap : Set up config.mak
4 # ***************************************************************************
5 # Copyright (C) 2003 VideoLAN
8 # Authors: Christophe Massiot <massiot@via.ecp.fr>
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 # ***************************************************************************
25 if test "$#" -gt "1"; then
26 echo "Usage: $0 <host>" >&2
27 echo " Prepare config.mak file." >&2
36 BUILD=`gcc -dumpmachine`
37 if test "$#" = "1"; then
43 echo -e "# Automatically generated by bootstrap.\n# Make changes if you know what you're doing.\n" >| config.mak
45 echo "BUILD = $BUILD" >> config.mak
46 echo "HOST = $HOST" >> config.mak
49 powerpc-apple-darwin8 | ppc-darwin)
50 echo "EXTRA_CPPFLAGS = -no-cpp-precomp" >> config.mak
51 echo "CONTRIB_URL = http://download.videolan.org/pub/videolan/devtools/contrib-macosx.tar.bz2" >> config.mak
54 echo "EXTRA_LDFLAGS = -lnet" >> config.mak
60 if which curl >/dev/null; then
61 echo "WGET = curl -O" >> config.mak
62 elif wget --version >/dev/null 2>&1; then
63 echo "WGET = wget" >> config.mak
65 echo "You need at least wget or curl to fetch the packages." >&2
69 if which svn >/dev/null; then
70 echo "SVN = svn" >> config.mak
71 elif which /sw/bin/svn >/dev/null; then
72 echo "SVN = /sw/bin/svn" >> config.mak
74 echo "You don't have a subversion client installed." >&2
77 echo "PREFIX = `pwd`" >> config.mak