~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.2.1/configure-bb10

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
 
 
4
F="configure-bb10"
 
5
 
 
6
if test "$*" = "--help" -o "$*" = "-h"; then
 
7
  echo "$F [--simulator] [OPTIONS]"
 
8
  echo ""
 
9
  echo "where:"
 
10
  echo "  --simulator Optional parameter to specify that the compilation"
 
11
  echo "              target is a simulator."
 
12
  echo "  OPTIONS     Other options that will be passed directly to"
 
13
  echo "              ./configure script. Run ./configure --help"
 
14
  echo "              for more info."
 
15
  exit 0
 
16
fi
 
17
 
 
18
# Find simulator argument
 
19
args=""
 
20
simulator="no"
 
21
for arg in "$@"; do
 
22
    if test "$arg" = "--simulator"; then
 
23
        simulator="yes"
 
24
    else
 
25
        args="$args $arg"
 
26
    fi
 
27
done
 
28
 
 
29
if test "$simulator" = "yes"; then
 
30
  TARGET_ARCH="x86"
 
31
  TARGET_ARCHEND=${TARGET_ARCH}
 
32
  LIBDIR=${TARGET_ARCH}
 
33
  TARGET_HOST="i486-pc-nto-qnx8.0.0"
 
34
else
 
35
  TARGET_ARCH="armv7"
 
36
  TARGET_ARCHEND="${TARGET_ARCH}le"
 
37
  LIBDIR="armle-v7"
 
38
  TARGET_HOST="arm-unknown-nto-qnx8.0.0eabi"
 
39
fi
 
40
 
 
41
RANLIB="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ranlib "
 
42
CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp -E "
 
43
CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp "
 
44
LD="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ld " 
 
45
export LDFLAGS="$LDFLAGS -L${QNX_TARGET}/${LIBDIR}/usr/lib -L${QNX_TARGET}/${LIBDIR}/lib -L${QNX_HOST}/usr/lib/gcc/${TARGET_HOST}/4.6.3 -lgcc -lasound -laudio_manager"
 
46
 
 
47
if test "$CFLAGS" = ""; then
 
48
  # Default if no CFLAGS is set in env
 
49
  export CFLAGS=" -g -O2"
 
50
fi
 
51
export CFLAGS="$CFLAGS -fPIC -DPJ_CONFIG_BB10=1 -DPJMEDIA_AUDIO_DEV_HAS_BB10=1" 
 
52
 
 
53
# Invoke configure
 
54
./configure --host=${TARGET_HOST} --disable-oss $args
 
55
RETVAL=$?
 
56
 
 
57
# Write to pjsip.pri only if configure was successful
 
58
if test $RETVAL -eq 0; then
 
59
        echo "# Config file to be included in app's .pro file" > pjsip.pri
 
60
        echo "# Auto-generated by 'configure-bb10 $*'" >> pjsip.pri
 
61
        make -f bb10-config.mak >> pjsip.pri
 
62
 
 
63
        echo PJSIP config file for BB10 has been written to \'pjsip.pri\'. You can include this file from your application\'s .pro file.
 
64
        echo
 
65
fi
 
66
 
 
67