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

1138
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";; *) _JNI_SUBDIR="genunix";;
esac esac
AC_ARG_WITH(jre-architecture,
[ --with-jre-architecture=value specify cpu architecture for jre],
jre_architecture="$withval", jre_architecture="")
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
save_CPPFLAGS="$CPPFLAGS" save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$_JNI_SUBDIR" CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$_JNI_SUBDIR"
@ -73,23 +77,30 @@ AC_CHECK_HEADERS(jni.h)
if test "$ac_cv_header_jni_h" = "yes"; then if test "$ac_cv_header_jni_h" = "yes"; then
JDBC_VM_LIBS="-ljvm" JDBC_VM_LIBS="-ljvm"
jre_lib="$JAVA_HOME/jre/lib" jre_lib="$JAVA_HOME/jre/lib"
# If on a 32/64bit system and compiling for the 64bit model
# adjust the cpu type to be the 64bit version if test "$jre_architecture" = ""; then
case "$CFLAGS" in
*-m64*) # If on a 32/64bit system and compiling for the 64bit model
if test "$GNUSTEP_HOST_CPU" = "ix86"; then # adjust the cpu type to be the 64bit version
_CPU="x86_64" case "$CFLAGS" in
else *-m64*)
_CPU="$GNUSTEP_HOST_CPU" if test "$GNUSTEP_HOST_CPU" = "ix86"; then
fi;; _CPU="x86_64"
*) _CPU="$GNUSTEP_HOST_CPU";; else
esac _CPU="$GNUSTEP_HOST_CPU"
case "$_CPU" in fi;;
ix86) JAVA_CPU=i386;; *) _CPU="$GNUSTEP_HOST_CPU";;
x86_64) JAVA_CPU=amd64;; esac
sparc) JAVA_CPU=sparc;; case "$_CPU" in
*) JAVA_CPU=i386;; ix86) JAVA_CPU=i386;;
esac x86_64) JAVA_CPU=amd64;;
sparc) JAVA_CPU=sparc;;
*) JAVA_CPU=i386;;
esac
else
JAVA_CPU="$jre_architecture"
fi
jre_cpu="$jre_lib/$JAVA_CPU" jre_cpu="$jre_lib/$JAVA_CPU"
JDBC_VM_LIBDIRS="-L$jre_cpu/server" JDBC_VM_LIBDIRS="-L$jre_cpu/server"
CFLAGS="$CFLAGS $JDBC_VM_LIBDIRS" CFLAGS="$CFLAGS $JDBC_VM_LIBDIRS"