1 # Process this file with autoconf to produce a configure script.
5 [https://bugzilla.gnome.org/enter_bug.cgi?product=cheese],
7 [https://wiki.gnome.org/Apps/Cheese])
9 AC_CONFIG_AUX_DIR([build-aux])
10 AC_CONFIG_HEADERS([config.h])
11 AC_CONFIG_SRCDIR([configure.ac])
12 AC_CONFIG_MACRO_DIR([m4])
14 AM_INIT_AUTOMAKE([1.12 -Wall -Wno-portability dist-xz no-define no-dist-gzip nostdinc subdir-objects])
15 AM_MAINTAINER_MODE([enable])
16 AM_SILENT_RULES([yes])
21 AM_PROG_VALAC([0.23.3])
25 LT_INIT([disable-static])
27 PKG_PROG_PKG_CONFIG([0.24])
29 AC_SUBST([CHEESE_WFLAGS], ["-Wall -DGSEAL_ENABLE"])
31 GNOME_MAINTAINER_MODE_DEFINES
32 GNOME_COMPILE_WARNINGS([maximum])
34 #*******************************************************************************
36 #*******************************************************************************
37 # Before making a release, the CHEESE_LT_VERSION string should be modified.
38 # The string is of the form C:R:A.
39 # - If interfaces have been changed or added, but binary compatibility has
40 # been preserved, change to C+1:0:A+1
41 # - If binary compatibility has been broken (eg removed or changed interfaces)
43 # - If the interface is the same as the previous version, change to C:R+1:A
44 AC_SUBST([LIBCHEESE_LT_VERSION], [7:28:0])
45 AC_SUBST([LIBCHEESE_GTK_LT_VERSION], [24:12:1])
47 #*******************************************************************************
48 # Internationalization
49 #*******************************************************************************
50 AC_SUBST([GETTEXT_PACKAGE], [$PACKAGE_TARNAME])
51 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name])
52 IT_PROG_INTLTOOL([0.50.0])
54 #*******************************************************************************
55 # Check required libraries
56 #*******************************************************************************
59 GLIB_REQUIRED="glib-2.0 >= 2.39.90"
60 GTK_REQUIRED="gtk+-3.0 >= 3.13.4"
61 GDK_PIXBUF_REQUIRED="gdk-pixbuf-2.0"
62 GSTREAMER_REQUIRED="gstreamer-pbutils-1.0"
63 LIBGNOMEDESKTOP_REQUIRED="gnome-desktop-3.0"
64 CLUTTER_REQUIRED="clutter-1.0 >= 1.13.2"
65 CLUTTERGTK_REQUIRED="clutter-gtk-1.0"
66 CLUTTERGST_REQUIRED="clutter-gst-2.0 >= 1.9.0"
67 LIBCANBERRA_REQUIRED="libcanberra-gtk3 >= 0.26"
69 GNOME_VIDEO_EFFECTS_REQUIRED="gnome-video-effects"
71 # Libtool requires this, but it is only expanded once anyway.
74 AC_MSG_CHECKING([host operating system])
76 [*linux-*], [AC_MSG_RESULT([Linux])
77 UDEV_REQUIRED="gudev-1.0"],
78 [AC_MSG_RESULT([unsupported operating system])])
80 AC_MSG_CHECKING([for gudev-1.0])
81 AS_IF([test -n "$UDEV_REQUIRED"],
82 [PKG_CHECK_EXISTS([$UDEV_REQUIRED],
83 [AC_MSG_RESULT([found])
84 AC_DEFINE([HAVE_UDEV], [], [Enable gudev support])],
85 [AC_MSG_ERROR([$UDEV_REQUIRED not found])])],
86 [AC_MSG_RESULT([not needed])])
88 AC_CHECK_HEADERS([sys/videoio.h])
90 AC_CHECK_HEADER([X11/extensions/XTest.h],
91 [AC_CHECK_LIB([Xtst], [XTestFakeKeyEvent],
92 [AC_SUBST([XTEST_LIBS], ["-lX11 -lXtst"])])])
93 AM_CONDITIONAL([HAVE_XTEST], test "x$ac_cv_lib_Xtst_XTestFakeKeyEvent" = "xyes")
95 PKG_CHECK_MODULES([CHEESE],
100 $LIBGNOMEDESKTOP_REQUIRED
105 PKG_CHECK_MODULES([CHEESE_GTK],
108 $LIBCANBERRA_REQUIRED
111 PKG_CHECK_EXISTS([$GNOME_VIDEO_EFFECTS_REQUIRED],
113 [AC_MSG_WARN([The $GNOME_VIDEO_EFFECTS_REQUIRED package is required at runtime for effects])])
116 AC_SUBST([GLIB_COMPILE_RESOURCES], [`$PKG_CONFIG --variable glib_compile_resources gio-2.0`])
117 AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
119 # Recommend some runtime GStreamer plugins.
120 AC_PATH_PROGS([GST_INSPECT], [gst-inspect-1.0], [notfound])
121 AS_IF([test "x$GST_INSPECT" = "xnotfound"],
122 [AC_MSG_WARN([unable to check for runtime GStreamer plugin dependencies])],
123 [GST_RUNTIME_PLUGINS="camerabin vp8enc webmmux"
124 for gst_runtime_plugin in $GST_RUNTIME_PLUGINS
126 AC_MSG_CHECKING([for $gst_runtime_plugin GStreamer plugin])
127 AS_IF([$GST_INSPECT $gst_runtime_plugin >&AS_MESSAGE_LOG_FD],
128 [AC_MSG_RESULT([found])],
129 [AC_MSG_RESULT([not found])
130 AC_MSG_WARN([$gst_runtime_plugin was not found. It needs to be installed before Cheese is run])])
133 # Check for GLib testing utilities.
134 AC_PATH_PROG([GTESTER], [gtester], [notfound])
135 AC_PATH_PROG([GTESTER_REPORT], [gtester-report], [notfound])
136 AS_IF([test "x$GTESTER" = "xnotfound" -o "x$GTESTER_REPORT" = "xnotfound"],
137 [AC_MSG_WARN([testing disabled as the required utilities were not found])],
138 [CHEESE_ENABLE_TESTS=true
140 AC_SUBST([GTESTER_REPORT])])
141 AM_CONDITIONAL([CHEESE_ENABLE_TESTS], [test "x$CHEESE_ENABLE_TESTS" = "xtrue"])
144 AC_ARG_ENABLE([lcov],
145 [AS_HELP_STRING([--disable-lcov], [Disable lcov code coverage testing])])
147 AS_IF([test "x$enable_lcov" != "xno"],
148 [AC_PATH_PROG([LCOV], [lcov], [notfound])
149 AC_PATH_PROG([LCOV_GENHTML], [genhtml], [notfound])
150 AS_IF([test "x$LCOV" = "xnotfound" -o "x$LCOV_GENHTML" = "xnotfound"],
155 AS_IF([test "x$have_lcov" = "xyes"],
157 AC_SUBST([LCOV_GENHTML])
158 CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
159 LDFLAGS="$LDFLAGS -lgcov"],
160 [AS_IF([test "x$enable_lcov" = "xyes"],
161 [AC_MSG_ERROR([lcov code coverage reporting requested but not found])])])
163 AM_CONDITIONAL([CHEESE_ENABLE_LCOV], [test "x$have_lcov" = "xyes"])
165 AC_MSG_CHECKING([for glib-mkenums script])
166 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
167 AS_IF([test "x$GLIB_MKENUMS" = "x"],
168 [AC_MSG_ERROR([glib-mkenums not listed in glib-2.0 pkg-config file])],
169 [AC_SUBST([GLIB_MKENUMS])
170 AC_MSG_RESULT([$GLIB_MKENUMS])])
172 GOBJECT_INTROSPECTION_CHECK([0.6.7])
175 GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
177 # Manpage, generated with gtk-doc and xsltproc from DocBook XML.
179 [AS_HELP_STRING([--disable-man], [Disable building the man page])])
181 AS_IF([test "x$enable_man" != "xno"],
182 [AC_CHECK_PROG([have_xsltproc], [xsltproc], [yes], [no])
183 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.3//EN],
184 [DocBook XML DTD V4.3], [have_docbookdtd=yes], [have_docbookdtd=no])
185 JH_CHECK_XML_CATALOG(
186 [http://docbook.sourceforge.net/release/xsl/current/html/refentry.xsl],
187 [DocBook XSL Stylesheets], [have_docbookxsl=yes], [have_docbookxsl=no])
188 AS_IF([test "x$have_xsltproc" = "xyes" -a "x$have_docbookdtd" = "xyes" \
189 -a "x$have_docbookxsl" = "xyes"],
191 [AS_IF([test "x$enable_man" = "xyes"],
193 [manpage generation requested but required utilities were not found])])
197 AM_CONDITIONAL([ENABLE_MAN], [test "x$have_manutils" = "xyes"])
206 #*******************************************************************************
210 docs/reference/Makefile
211 docs/reference/version.xml
214 data/org.gnome.Camera.service
215 data/org.gnome.Cheese.desktop.in
216 data/org.gnome.Cheese.service
222 #**************************************************************************