Merged -r6847:6850 from eb/trial-merge into trunk. This changeset
[debian/gnuradio] / configure-cell-cross
1 #!/bin/bash
2
3 #
4 # Before trying to use this script, please follow the instructions at
5 # http://gnuradio.org/trac/wiki/CrossCompilingForCell
6 #
7
8 scriptdir=`dirname $0`
9
10 prefix=
11 for arg in "$@"
12 do
13   case $arg in
14     --prefix=*)
15       prefix=${arg#--prefix=}
16       ;;
17   esac
18 done
19
20 if test x$prefix = x
21 then
22   echo "usage: $0 --prefix=PREFIX [configure options...]" 1>&2
23   exit 1
24 fi
25
26
27 arch=ppu
28 cell_root=/mnt/cell-root
29 python_version=2.5
30 # compiler_includes="-I${cell_root}/usr/include -I${cell_root}/usr/local/include -I${cell_root}/usr/lib/gcc/ppu/4.1.1/include -I${cell_root}/usr/lib/gcc/ppu/4.1.1/include/c++"
31 compiler_includes="-I${cell_root}/usr/include"
32
33 $scriptdir/configure                        \
34     CC=${arch}32-gcc                        \
35     CXX=${arch}32-g++                       \
36     AR=${arch}-ar                           \
37     NM=${arch}-nm                           \
38     RANLIB=${arch}-ranlib                   \
39     STRIP=${arch}-strip                     \
40     F77=false                               \
41     CPPFLAGS="$compiler_includes"                                                       \
42     LDFLAGS="-L${cell_root}/lib -L${cell_root}/usr/lib"                                 \
43     PYTHON_CPPFLAGS=-I${cell_root}/usr/include/python${python_version}                  \
44     PKG_CONFIG_PATH=${cell_root}/usr/lib/pkgconfig:${cell_root}/usr/local/lib/pkgconfig \
45     --host=powerpc64-unknown-linux-gnu      \
46     --prefix=$prefix                        \
47     --with-pythondir=$prefix/lib/python${python_version}/site-packages
48
49
50 # Hack the libtool script so that it doesn't code an --rpath flag into anything
51
52 #sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
53 #sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool