summaryrefslogtreecommitdiffstats
path: root/recipes-core/jamvm/jamvm/libffi.patch
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2011-11-12 20:58:34 +0100
committerHenning Heinold <heinold@inf.fu-berlin.de>2011-11-26 23:41:44 +0100
commit57e069cde6617f00ca8834a82c6f360af43d5067 (patch)
tree48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/jamvm/jamvm/libffi.patch
downloadmeta-java-57e069cde6617f00ca8834a82c6f360af43d5067.tar.gz
meta-java: initial commit
* taken over mostly stuff from oe classic * cleaned up recipes * added license checksums * bump icedtea6-native to 1.8.11 * use jamvm from git as native
Diffstat (limited to 'recipes-core/jamvm/jamvm/libffi.patch')
-rw-r--r--recipes-core/jamvm/jamvm/libffi.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes-core/jamvm/jamvm/libffi.patch b/recipes-core/jamvm/jamvm/libffi.patch
new file mode 100644
index 0000000..1f68c5e
--- /dev/null
+++ b/recipes-core/jamvm/jamvm/libffi.patch
@@ -0,0 +1,69 @@
1Index: git/configure.ac
2===================================================================
3--- git.orig/configure.ac 2011-11-18 15:47:15.339088111 +0100
4+++ git/configure.ac 2011-11-18 15:47:15.742392674 +0100
5@@ -273,9 +273,24 @@
6 AC_CHECK_LIB(z,inflate,,AC_MSG_ERROR(zlib is missing))
7 fi
8
9-if test "$enable_ffi" != no; then
10- AC_CHECK_LIB(ffi,ffi_call,,AC_MSG_ERROR(libffi is missing))
11+LIBFFI_FOUND=no
12+if test "$enable_ffi" = yes
13+then
14+PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
15+if test "x${LIBFFI_FOUND}" = xno
16+then
17+ LIBFFI_FOUND=
18+ AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no])
19+ AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no])
20+ if test "x${LIBFFI_FOUND}" = xno
21+ then
22+ AC_MSG_ERROR([Could not find libffi headers - \
23+ Instal libffi-devel or libffi-dev.])
24+ fi
25+fi
26 fi
27+AC_SUBST(LIBFFI_CFLAGS)
28+AC_SUBST(LIBFFI_LIBS)
29
30 dnl Checks for header files.
31 AC_HEADER_STDC
32@@ -285,10 +300,6 @@
33 AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR(zlib.h is missing))
34 fi
35
36-if test "$enable_ffi" != no; then
37- AC_CHECK_HEADER(ffi.h,,AC_MSG_ERROR(ffi.h is missing))
38-fi
39-
40 if test "$enable_zip" != no; then
41 AC_DEFINE([USE_ZIP],1,[use zip])
42 use_zip_yes=
43@@ -302,7 +313,9 @@
44 AC_SUBST(use_zip_no)
45
46 if test "$enable_ffi" != no; then
47- AC_DEFINE([USE_FFI],1,[use FFI])
48+ if test "$LIBFFI_FOUND" != no; then
49+ AC_DEFINE([USE_FFI],1,[use FFI])
50+ fi
51 fi
52
53 if test "$enable_md_stubs" != no; then
54Index: git/src/Makefile.am
55===================================================================
56--- git.orig/src/Makefile.am 2011-11-18 15:47:15.685730049 +0100
57+++ git/src/Makefile.am 2011-11-18 15:49:43.881825251 +0100
58@@ -43,8 +43,9 @@
59 jamvm_LDADD = libcore.la
60 libjvm_la_LIBADD = libcore.la
61 libcore_la_LIBADD = interp/libinterp.la os/@os@/@arch@/libnative.la \
62- os/@os@/libos.la classlib/@classlib@/libclasslib.la
63+ os/@os@/libos.la classlib/@classlib@/libclasslib.la \
64+ $(LIBFFI_LIBS)
65
66-AM_CPPFLAGS = -I$(top_srcdir)/src/interp/engine
67+AM_CPPFLAGS = -I$(top_srcdir)/src/interp/engine $(LIBFFI_CFLAGS)
68
69 DISTCLEANFILES = arch.h classlib.h classlib-defs.h classlib-symbol.h