This is the start of trying to handle 32 bit vs. 64 bit compilation
on select platforms. For example, on linux you can compile 32 bit and 64 bit if the os and hardware can handle 64 bits. In many cases you want to stick to 32 bit compilations. One reason is that python may only be set up for 32 bit add-on modules. e.g see the SIZEOF_VOID_P defn in pyconfig.h So, I added BITCOMPILE BITHARDWARE, and BITCHANGE variables I also added the variable ldemulationarg, because it's needed in one case for 32 bit compilations on 64 bit linux boxes. Later I will add the default compiler flags that make this 32 bit compilation work. Now they are brought in through a prep script.
This commit is contained in:
parent
d2bdb5c9a6
commit
a01ddcedcc
2 changed files with 703 additions and 333 deletions
987
config/configure
vendored
987
config/configure
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -17,7 +17,42 @@ AC_DEFINE(NDEBUG)
|
|||
|
||||
ac_sys_system=`uname -s`
|
||||
ac_sys_release=`uname -r`
|
||||
sys_hardware=`uname -i`
|
||||
|
||||
#
|
||||
# Determine the number of hardware bits in the system
|
||||
#
|
||||
#
|
||||
# BITHARDWARE is the default number of compilation bits in pointers
|
||||
#
|
||||
case $ac_sys_system in
|
||||
Linux* )
|
||||
echo 'linux ' $sys_hardware
|
||||
case $sys_hardware in
|
||||
x86_64 ) BITHARDWARE=64 ;;
|
||||
* ) BITHARDWARE=${BITHARDWARE:="32"} ;;
|
||||
esac ;;
|
||||
* ) BITHARDWARE=${BITHARDWARE:="32"} ;;
|
||||
esac
|
||||
#
|
||||
# BITCOMPILE is the desired number of compilation bits in pointers
|
||||
# Note, it can be different than the number of hardware bits.
|
||||
# Many times you will want to compile 32 bits on a 64 bit
|
||||
# machine
|
||||
if test -z $BITCOMPILE ; then
|
||||
BITCOMPILE=$BITHARDWARE
|
||||
fi
|
||||
|
||||
BITCHANGE=
|
||||
if test $BITCOMPILE != $BITHARDWARE ; then
|
||||
BITCHANGE='y'
|
||||
fi
|
||||
|
||||
echo 'BITHARDWARE= ' $BITHARDWARE
|
||||
echo 'BITCOMPILE= ' $BITCOMPILE
|
||||
AC_SUBST(BITCOMPILE)
|
||||
AC_SUBST(BITHARDWARE)
|
||||
AC_SUBST(BITCHANGE)
|
||||
|
||||
SHARED_CTLIB=0
|
||||
OS_IS_DARWIN=0
|
||||
|
|
@ -26,13 +61,19 @@ OS_IS_CYGWIN=0
|
|||
EXTRA_LINK=${EXTRA_LINK:=""}
|
||||
|
||||
mex_ext=mexglx
|
||||
ldemulationarg=
|
||||
|
||||
case $ac_sys_system in
|
||||
Darwin*) OS_IS_DARWIN=1
|
||||
EXTRA_LINK="-framework Accelerate "$EXTRA_LINK
|
||||
CXX_INCLUDES="$CXX_INCLUDES -I/System/Library/Frameworks/Accelerate.framework/Headers"
|
||||
mex_ext=mexmac;;
|
||||
CYGWIN*) OS_IS_CYGWIN=1; mex_ext=dll;;
|
||||
CYGWIN*) OS_IS_CYGWIN=1; mex_ext=dll;;
|
||||
Linux* ) case $BITHARDWARE in
|
||||
64 ) if test "$BITCHANGE" = "y" ; then
|
||||
ldemulationarg='-melf_i386'
|
||||
fi ;;
|
||||
esac
|
||||
esac
|
||||
|
||||
CVF_LIBDIR=""
|
||||
|
|
@ -45,6 +86,9 @@ if test "x${OS_IS_CYGWIN}" = "x1"; then
|
|||
fi
|
||||
AC_SUBST(CVF_LIBDIR)
|
||||
|
||||
echo "ldemulationarg = " $ldemulationarg
|
||||
AC_SUBST(ldemulationarg)
|
||||
|
||||
#
|
||||
# Determine if clib is to be a static or dynamic library
|
||||
# -> will test to see if USE_DLL is defined in the cygwmin environment
|
||||
|
|
@ -241,6 +285,9 @@ use_sundials=0
|
|||
sundials_inc=
|
||||
CVODE_LIBS='-lcvode'
|
||||
|
||||
############################################################################
|
||||
# SUNDIALS SETUP
|
||||
###########################################################################
|
||||
if test "$USE_SUNDIALS" = "default"; then
|
||||
ldsave=$LDFLAGS
|
||||
LDFLAGS='-L'$SUNDIALS_HOME/lib' '$ldsave
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue