pud: fix java detection in the wireformat java bindings (again)
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 6 Nov 2013 13:14:53 +0000 (14:14 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 6 Nov 2013 13:15:44 +0000 (14:15 +0100)
Debian turns out to be a huge pain. Now I need to also check '-amd64'
since Wheezy changed it again... sigh...

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/wireformat-java/Makefile

index c76b26f..fe2b83e 100644 (file)
@@ -31,8 +31,10 @@ SHAREJAVADIR ?= $(SHAREDIR)/java/$(EXENAME)
 
 MACHINE=$(shell uname -m)
 ARCH=
+ARCH2=
 ifeq ($(strip $(MACHINE)),x86_64)
   ARCH=.$(MACHINE)
+  ARCH2=-amd64
 endif
 
 
@@ -46,11 +48,11 @@ INC_DIR_WIREFORMAT_FULL = $(INC_DIR_WIREFORMAT)/$(WIREFORMAT_PROJECT)
 ifneq ($(wildcard /usr/lib/jvm/java),)
   INC_DIR_JVM = /usr/lib/jvm/java/include
 else
-  ifneq ($(wildcard /usr/lib/jvm/default-java),)
-    INC_DIR_JVM = /usr/lib/jvm/default-java/include
+  ifneq ($(wildcard /usr/lib/jvm/java-1.7.0-openjdk$(ARCH)),)
+    INC_DIR_JVM = /usr/lib/jvm/java-1.7.0-openjdk$(ARCH)/include
   else
-    ifneq ($(wildcard /usr/lib/jvm/java-1.7.0-openjdk$(ARCH)),)
-      INC_DIR_JVM = /usr/lib/jvm/java-1.7.0-openjdk$(ARCH)/include
+    ifneq ($(wildcard /usr/lib/jvm/java-1.7.0-openjdk$(ARCH2)),)
+      INC_DIR_JVM = /usr/lib/jvm/java-1.7.0-openjdk$(ARCH2)/include
     else
       ifneq ($(wildcard /usr/lib/jvm/java-1.7.0-openjdk),)
         INC_DIR_JVM = /usr/lib/jvm/java-1.7.0-openjdk/include
@@ -58,10 +60,14 @@ else
         ifneq ($(wildcard /usr/lib/jvm/java-1.6.0-openjdk$(ARCH)),)
           INC_DIR_JVM = /usr/lib/jvm/java-1.6.0-openjdk$(ARCH)/include
         else
-          ifneq ($(wildcard /usr/lib/jvm/java-1.6.0-openjdk),)
-            INC_DIR_JVM = /usr/lib/jvm/java-1.6.0-openjdk/include
+          ifneq ($(wildcard /usr/lib/jvm/java-1.6.0-openjdk$(ARCH2)),)
+            INC_DIR_JVM = /usr/lib/jvm/java-1.6.0-openjdk$(ARCH2)/include
           else
-            $(error No java detected)
+            ifneq ($(wildcard /usr/lib/jvm/java-1.6.0-openjdk),)
+              INC_DIR_JVM = /usr/lib/jvm/java-1.6.0-openjdk/include
+            else
+              $(error No java detected)
+            endif
           endif
         endif
       endif