aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/icedtea/openjdk-7-03b147/allow-headless-build.patch
blob: 80a98b1d2e9092a58b9a206bf2d009596f5418bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--- acinclude.m4.orig	2015-08-18 11:58:23.000000000 +0200
+++ acinclude.m4	2015-08-18 11:58:30.000000000 +0200
@@ -2178,3 +2178,37 @@
 AM_CONDITIONAL([NO_BYTECODE7], test x"${it_cv_bytecode7}" = "xyes")
 AC_PROVIDE([$0])dnl
 ])
+AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
+[
+
+  ###############################################################################
+  #
+  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
+  # We always build headless support.
+  #
+  AC_MSG_CHECKING([headful support])
+  AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
+      [disable building headful support (graphical UI support) @<:@enabled@:>@])],
+      [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
+
+  SUPPORT_HEADLESS=yes
+  BUILD_HEADLESS="BUILD_HEADLESS:=true"
+
+  if test "x$SUPPORT_HEADFUL" = xyes; then
+    # We are building both headful and headless.
+    headful_msg="include support for both headful and headless"
+  fi
+
+  if test "x$SUPPORT_HEADFUL" = xno; then
+    # Thus we are building headless only.
+    BUILD_HEADLESS="BUILD_HEADLESS:=true"
+    headful_msg="headless only"
+  fi
+
+  AC_MSG_RESULT([$headful_msg])
+
+  AC_SUBST(SUPPORT_HEADLESS)
+  AC_SUBST(SUPPORT_HEADFUL)
+  AC_SUBST(BUILD_HEADLESS)
+
+])
--- configure.ac.orig	2015-08-18 11:33:37.000000000 +0200
+++ configure.ac	2015-08-18 11:55:26.000000000 +0200
@@ -55,9 +55,13 @@
 IT_DISABLE_LANGTOOLS_TESTS
 IT_DISABLE_JDK_TESTS
 
+JDKOPT_SETUP_JDK_OPTIONS
+
+if test "x$SUPPORT_HEADFUL" = xyes; then
 # Use xvfb-run if found to run gui tests (check-jdk).
 AC_CHECK_PROG(XVFB_RUN_CMD, xvfb-run, [xvfb-run -a -e xvfb-errors], [])
 AC_SUBST(XVFB_RUN_CMD)
+fi
 
 AC_MSG_CHECKING([whether to include PulseAudio support])
 AC_ARG_ENABLE([pulse-java],
@@ -174,6 +178,7 @@
 IT_CHECK_FOR_SYSCALLS
 AC_CONFIG_FILES([remove-intree-libraries.sh])
 
+if test "x$SUPPORT_HEADFUL" = xyes; then
 dnl Check for Xproto headers and libraries.
 PKG_CHECK_MODULES(XPROTO, xproto,[XPROTO_FOUND=yes],[XPROTO_FOUND=no])
 if test "x${XPROTO_FOUND}" = xno
@@ -213,6 +218,7 @@
 Try installing libXrender-devel or configure --disable-xrender.])
   fi
 fi
+fi
 
 if test "x${ENABLE_SYSTEMTAP}" = xyes; then
 AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],