Allow --with-jre-architecture= to override guessed cpu architecture

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@24195 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-12-08 19:34:50 +00:00
parent 1aeb216ed9
commit 5e2991ca45
2 changed files with 335 additions and 848 deletions

1104
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -66,6 +66,10 @@ case "$GNUSTEP_HOST_OS" in
*) _JNI_SUBDIR="genunix";;
esac
AC_ARG_WITH(jre-architecture,
[ --with-jre-architecture=value specify cpu architecture for jre],
jre_architecture="$withval", jre_architecture="")
save_CFLAGS="$CFLAGS"
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$_JNI_SUBDIR"
@ -73,6 +77,9 @@ AC_CHECK_HEADERS(jni.h)
if test "$ac_cv_header_jni_h" = "yes"; then
JDBC_VM_LIBS="-ljvm"
jre_lib="$JAVA_HOME/jre/lib"
if test "$jre_architecture" = ""; then
# If on a 32/64bit system and compiling for the 64bit model
# adjust the cpu type to be the 64bit version
case "$CFLAGS" in
@ -90,6 +97,10 @@ if test "$ac_cv_header_jni_h" = "yes"; then
sparc) JAVA_CPU=sparc;;
*) JAVA_CPU=i386;;
esac
else
JAVA_CPU="$jre_architecture"
fi
jre_cpu="$jre_lib/$JAVA_CPU"
JDBC_VM_LIBDIRS="-L$jre_cpu/server"
CFLAGS="$CFLAGS $JDBC_VM_LIBDIRS"