blob: 823ccd49958253c5eed92143e63dfc9ca8695b66 (
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
76
77
78
79
80
81
82
83
84
85
86
87
|
#!/bin/sh
touch AUTHORS COPYING
if which glibtoolize > /dev/null 2>&1; then
glibtoolize --automake -f -c
else
libtoolize --automake -f -c
fi
aclocal
autoheader
if [ "$1" = "--dist" ]; then
shift 1
automake -a -c -f -i
else
automake -a -c -f
fi
autoconf
INCDIRS="-I/usr/local/include"
INCDIRS="$INCDIRS -I/usr/local/include/boost"
INCDIRS="$INCDIRS -I/usr/include/httpd/xml"
INCDIRS="$INCDIRS -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5"
LIBDIRS="-L/usr/local/lib"
LIBDIRS="$LIBDIRS -L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5"
SYSTEM=`uname -s`
if [ $SYSTEM = Linux ]; then
CXXFLAGS="-pthread"
elif [ $SYSTEM = Solaris ]; then
CXXFLAGS="-pthreads"
elif [ $SYSTEM = Darwin ]; then
CXXFLAGS="-Wno-long-double"
else
CXXFLAGS=""
fi
# Building the command-line tool as a shared library is a luxury,
# since there are no clients except a GUI tool which might use it (and
# that is built again anyway by Xcode).
SWITCHES="--disable-shared"
HERE="$PWD"
#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
if [ "$1" = "--debug" ]; then
shift 1
"$HERE/configure" --srcdir="$HERE" \
CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" $SWITCHES \
--enable-debug "$@"
elif [ "$1" = "--python-debug" ]; then
shift 1
"$HERE/configure" --srcdir="$HERE" \
CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g" $SWITCHES \
--enable-debug --enable-python "$@"
elif [ "$1" = "--opt" ]; then
shift 1
"$HERE/configure" --srcdir="$HERE" \
CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC" "$@" $SWITCHES
elif [ "$1" = "--flat-opt" ]; then
shift 1
"$HERE/configure" --srcdir="$HERE" \
CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450" "$@" $SWITCHES
elif [ "$1" = "--safe-opt" ]; then
shift 1
"$HERE/configure" --srcdir="$HERE" \
CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" \
CXXFLAGS="-fomit-frame-pointer -O3 -mcpu=7450 -fPIC -DDEBUG_LEVEL=1" "$@" \
$SWITCHES
elif [ "$1" = "--perf" ]; then
shift 1
"$HERE/configure" --srcdir="$HERE" \
CPPFLAGS="$INCDIRS" LDFLAGS="$LIBDIRS" CXXFLAGS="-g -pg" "$@" \
$SWITCHES
fi
rm AUTHORS COPYING
|