Add gobject introspection
[profile/ivi/GUPnP-AV.git] / configure.ac
1 AC_PREREQ([2.63])
2 AC_INIT([gupnp-av],
3         [0.12.4],
4         [https://bugzilla.gnome.org/enter_bug.cgi?product=GUPnP],
5         [gupnp-av],
6         [http://www.gupnp.org/])
7
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_SRCDIR(libgupnp-av/gupnp-av.h)
10 AC_CONFIG_MACRO_DIR([m4])
11 AC_CONFIG_AUX_DIR([build-aux])
12
13 AM_INIT_AUTOMAKE([1.11 tar-ustar no-dist-gzip dist-xz -Wno-portability])
14 AM_MAINTAINER_MODE([enable])
15
16 AM_SILENT_RULES([yes])
17
18 # Check for programs
19 AC_PROG_CC
20 AM_PROG_CC_C_O
21 AC_HEADER_STDC
22 AC_FUNC_MMAP
23
24 # Initialize libtool
25 LT_PREREQ([2.2])
26 LT_INIT([win32-dll])
27
28 PKG_CHECK_MODULES(LIBGUPNP, gupnp-1.0 >= 0.19.0 \
29                             gobject-2.0 \
30                             libxml-2.0)
31
32 # glib-genmarshal
33 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
34 AC_SUBST(GLIB_GENMARSHAL)
35
36 # Debugging
37 AC_ARG_ENABLE(debug,
38         [  --enable-debug          enable debugging],,
39         enable_debug=no)
40 if test "x$enable_debug" = "xyes"; then
41         CFLAGS="$CFLAGS -g -Wall"
42 fi
43
44 GOBJECT_INTROSPECTION_CHECK([0.9.5])
45
46 # vapigen
47 have_vapigen=no
48 AS_IF([test "x$found_introspection" = "xyes"],
49       [
50        dnl output of g-i >= 1.36.0 needs vapigen >= 0.20 to process
51        AC_MSG_CHECKING([whether G-I is 1.36 or newer])
52        VAPIGEN_MIN_VERSION=0.14
53        AS_IF([pkg-config --atleast-version=1.36.0 gobject-introspection-1.0],
54              [
55               AC_MSG_RESULT([yes])
56               VAPIGEN_MIN_VERSION=0.20
57              ],[AC_MSG_RESULT([no])]
58        )
59        GUPNP_PROG_VAPIGEN([$VAPIGEN_MIN_VERSION])
60       ]
61 )
62 AS_IF([test "x$VAPIGEN" != "x"], [have_vapigen=yes])
63 AM_CONDITIONAL([HAVE_VAPIGEN], [test "x$VAPIGEN" != "x"])
64
65 GTK_DOC_CHECK([1.10],[--flavour no-tmpl])
66
67 AC_CONFIG_FILES([
68 Makefile
69 libgupnp-av/Makefile
70 tests/Makefile
71 tests/gtest/Makefile
72 doc/Makefile
73 doc/version.xml
74 data/Makefile
75 vala/Makefile
76 gupnp-av-1.0.pc
77 gupnp-av-1.0-uninstalled.pc
78 ])
79 AC_OUTPUT
80
81 echo "
82     ${PACKAGE} ${VERSION}
83     ---------------------
84
85     Prefix:                ${prefix}
86     GObject-Introspection: ${found_introspection}
87     VALA bindings:         ${have_vapigen}
88 "