blob: 0d8ed00e51db1a6904bd352602dd9ebbec7a0d34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#!/bin/sh
export AUTOCONF_VERSION=2.61
export AUTOMAKE_VERSION=1.9
touch AUTHORS COPYING ChangeLog
cmd=$(which glibtoolize 2>&1)
if [ -x "$cmd" ]; then
export LIBTOOLIZE="$cmd"
fi
autoreconf --force --install
HERE="$PWD"
if [ ! "$1" = "--local" ]; then
if [ -d "$HOME/Products" ]; then
projdir="$HOME/Products/$(basename $HERE)"
if [ ! -d "$projdir" ]; then
mkdir -p "$projdir"
fi
cd "$projdir" || (echo "Cannot change to $projdir"; exit 1)
fi
else
shift 1
fi
INCDIRS="-I/opt/local/include -I/usr/local/include -I/usr/include/httpd/xml"
INCDIRS="$INCDIRS -I/usr/include/python2.5"
LIBDIRS="-L/opt/local/lib -L/usr/local/lib"
SYSTEM=`uname -s`
if [ $SYSTEM = Linux ]; then
CXXFLAGS="-pthread"
elif [ $SYSTEM = Solaris ]; then
CXXFLAGS="-pthreads"
elif [ $SYSTEM = Darwin ]; then
#CXXFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CXXFLAGS="$CXXFLAGS -Wno-long-double"
#LIBDIRS="$LIBDIRS -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
else
CXXFLAGS=""
fi
if [ "$1" = "--debug" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -g" --enable-debug --enable-python "$@"
elif [ "$1" = "--opt" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@"
elif [ "$1" = "--flat-opt" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3 -mcpu=7450" "$@"
elif [ "$1" = "--safe-opt" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@"
elif [ "$1" = "--perf" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -g -pg" "$@"
elif [ "$1" = "--python" ]; then
shift 1
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -g" --enable-python "$@"
else
$HERE/configure CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="$CXXFLAGS -g" "$@"
fi
rm -f AUTHORS COPYING
|