summaryrefslogtreecommitdiff
path: root/graphics/cheese/patches/patch-aa
blob: bfa5a0dc06ca80137394029e6a7f6257e547e33b (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
$NetBSD: patch-aa,v 1.5 2009/05/21 16:11:25 wiz Exp $

http://bugzilla.gnome.org/show_bug.cgi?id=583469

--- configure.ac.orig	2008-11-24 18:03:24.000000000 -0500
+++ configure.ac	2008-12-23 22:47:58.000000000 -0500
@@ -17,8 +17,9 @@
 
 CFLAGS="${CFLAGS} -Wall"
 
-GNOME_MAINTAINER_MODE_DEFINES
-GNOME_COMPILE_WARNINGS
+dnl If you can find where these come from, use them! ;)
+dnl GNOME_MAINTAINER_MODE_DEFINES
+dnl GNOME_COMPILE_WARNINGS
 
 #*******************************************************************************
 # Expanded dirs
@@ -88,7 +89,6 @@
   cairo >= $CAIRO_REQUIRED \
   dbus-1 >= $DBUS_REQUIRED \
   dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
-  hal >= $HAL_REQUIRED \
   pangocairo >= $PANGOCAIRO_REQUIRED \
   librsvg-2.0 >= $LIBRSVG_REQUIRED)
 AC_SUBST(CHEESE_CFLAGS)
@@ -107,6 +107,25 @@
 
 AM_CONDITIONAL(WITH_HILDON, test "x$enable_hildon" = "xyes")
 
+AC_ARG_ENABLE(hal, AS_HELP_STRING([--enable-hal], [Use the HAL library (default=no)]),, enable_hal=no)
+
+if test "x$enable_hal" = "xyes"; then
+  PKG_CHECK_MODULES([HAL], hal >= $HAL_REQUIRED, ac_have_hal=yes, ac_have_hal=no)
+  AC_SUBST(CHEESE_CFLAGS)
+else
+  enable_hal=no
+fi
+
+if test "x$ac_have_hal" = "xyes"; then
+  AC_DEFINE(HAVE_HAL, 1, define to 1 if HAL is used)
+else
+  AC_DEFINE(HAVE_HAL, 0, define to 1 if HAL is used)
+fi
+
+AC_CHECK_HEADER([sys/videoio.h],
+  [AC_DEFINE(USE_SYS_VIDEOIO_H, 1, define to 1 if sys/videoio.h is present)],
+  [AC_DEFINE(USE_SYS_VIDEOIO_H, 0, define to 1 if sys/videoio.h is present)], [])
+
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2