]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tools/configure.ac
build both 32 and 64-bit versions of the JNI code so as to support both
[tinyos-2.x.git] / tools / configure.ac
index debc3de254939f5e19b5e649c12c7095cef8ac67..60ec10cb308d7e8867fc184bb93419f8fce53748 100644 (file)
@@ -73,12 +73,14 @@ case $host in
     AC_MSG_RESULT(yes)
     JNIPREFIX=
     JNISUFFIX=dll
+    JNIVERSIONS=.
     INSTALLJNI="install --group=SYSTEM"
     CYGWIN=yes
     ;;
   *)
     JNIPREFIX=lib
     JNISUFFIX=so
+    JNIVERSIONS="-32. -64."
     INSTALLJNI="install"
     AC_MSG_RESULT(no)
 esac
@@ -93,8 +95,14 @@ fi
 JDK=`dirname "$JAVAC_DIR"`
 AC_MSG_RESULT($JDK)
 
-GETENVLIB=${JNIPREFIX}getenv.$JNISUFFIX
-TOSCOMMLIB=${JNIPREFIX}toscomm.$JNISUFFIX
+function jnimap {
+  for v in $JNIVERSIONS; do
+    echo -n "${JNIPREFIX}$1$v$JNISUFFIX "
+  done
+}
+
+GETENVLIB=`jnimap getenv`
+TOSCOMMLIB=`jnimap toscomm`
 
 AC_SUBST(GETENVLIB)
 AC_SUBST(TOSCOMMLIB)