source: gs2-extensions/afrepo/trunk/src/gs3-devel.sh@ 27337

Last change on this file since 27337 was 27337, checked in by davidb, 8 years ago

64-bit check, setting -fPIC flag if it is added.

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#!/bin/bash
2
3if [ -d cascade-make ] ; then
4 source cascade-make/lib/cascade-lib.bash GEXT_AFREPO . $*
5fi
6
7if [ -z $GEXT_AFREPO ] ; then
8 source ./gs3-setup.sh
9fi
10
11if [ -z $GEXTAFREPO_DEVEL ] ; then
12 # Set environment variable so we can tell devel.bash has been sourced
13 export GEXT_AFREPO_DEVEL=$GEXT_AFREPO
14
15 export PATH="$GEXT_AFREPO_INSTALLED/bin:$PATH"
16 export CFLAGS="-I$GEXT_AFREPO_INSTALLED/include $CFLAGS"
17 export CPPFLAGS="-I$GEXT_AFREPO_INSTALLED/include $CPPFLAGS"
18 export CXXFLAGS="-I$GEXT_AFREPO_INSTALLED/include $CXXFLAGS"
19 export LDFLAGS="-L$GEXT_AFREPO_INSTALLED/lib $LDFLAGS"
20 export PKG_CONFIG_PATH="$GEXT_AFREPO_INSTALLED/lib/pkgconfig:$PKG_CONFIG_PATH"
21
22 is_64bit=`uname -m | grep _64`
23 if [ "x$is_64bit" != "x" ] ; then
24 already_set=`echo $CFLAGS | grep fPIC`
25 if [ "x$already_set" = "x" ] ; then
26 # not present => add in
27 export CFLAGS="-fPIC"
28 fi
29 fi
30
31 echo "+Your environment is now setup to compile afrepo"
32
33else
34 echo "+Your environment is already setup to compile afrepo"
35fi
Note: See TracBrowser for help on using the repository browser.