-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakeself.sh
51 lines (46 loc) · 1.17 KB
/
makeself.sh
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
#!/bin/sh
set -e
MAKE="${MAKE:-make}"
if [ $# = 0 ]; then
opts="xft=no"
if [ "`which wx-config 2>/dev/null`" = "" ]; then
opts="${opts} wx=no"
fi
if [ "`which gtk-demo 2>/dev/null`" = "" ]; then
opts="${opts} gtk=no"
fi
else
opts="$*"
fi
if [ `uname` = 'Darwin' ]; then
opts="${opts} x11=no"
fi
if [ ! -z "${DESTDIR}" ]; then
opts="${opts} DESTDIR=${DESTDIR}"
unset DESTDIR # important because DESTDIR is also used by 3rd party build scripts
fi
if [ ! -z "${GRDIR}" ]; then
opts="${opts} GRDIR=${GRDIR}"
gr_lib="${GRDIR}/lib"
else
gr_lib="/usr/local/gr/lib"
fi
if [ -z "${QTDIR}" ]; then
for dir in ${HOME}/anaconda /opt/anaconda /usr/local/anaconda
do
if [ -d ${dir} ]; then
export QTDIR=${dir}
break
fi
done
fi
opts="${opts} USE_STATIC_CAIRO_LIBS=1 USE_STATIC_AGG_LIBS=1 USE_STATIC_XERCESC_LIBS=1"
extras=`pwd`/3rdparty/build
extras_lib=${extras}/lib
export PATH="${extras}/bin:${PATH}"
${MAKE} -C 3rdparty
${MAKE} -C 3rdparty extras
${MAKE} EXTRA_CFLAGS="${EXTRA_CFLAGS} -I${extras}/include" \
EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS} -I${extras}/include" \
EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -L${extras_lib}" \
${opts} install