4 [http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp],
6 [http://www.gupnp.org/])
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_SRCDIR([libgupnp/gupnp.h])
10 AC_CONFIG_MACRO_DIR([m4])
11 AC_CONFIG_AUX_DIR([build-aux])
16 AM_INIT_AUTOMAKE([1.11 tar-ustar no-dist-gzip dist-xz])
17 AM_MAINTAINER_MODE([enable])
19 AM_SILENT_RULES([yes])
31 AC_MSG_CHECKING([operating system])
44 AC_MSG_RESULT($target_os)
49 PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.24.0 \
53 libsoup-2.4 >= 2.28.2 \
56 PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
58 AM_CONDITIONAL(OS_WIN32, test "x$os_win32" = "xyes")
59 if test "x$os_win32" = "xno"; then
60 AC_ARG_WITH([context_manager],
62 [--with-context-manager=@<:@network-manager/connman/unix/linux@:>@],
63 [Context Manager backend to use]),,
64 [with_context_manager="none"])
66 LIBGUPNP_LIBS="$LIBGUPNP_LIBS -lrpcrt4"
67 with_context_manager="windows"
70 if test "x$with_context_manager" = "xnone"; then
73 with_context_manager="linux"
76 with_context_manager="unix"
81 AC_CHECK_HEADERS([sys/socket.h linux/rtnetlink.h],
84 [ #ifdef HAVE_SYS_SOCKET_H
85 #include <sys/socket.h>
88 AM_CONDITIONAL([HAVE_NETLINK], [test "x$HAVE_NETLINK" = "xyes"])
89 AC_SUBST(HAVE_NETLINK)
91 AC_CHECK_HEADERS([linux/wireless.h], [], [],
92 [ #ifdef HAVE_SYS_SOCKET_H
93 #include <sys/socket.h>
97 AC_MSG_CHECKING([Context Manager backend to use])
98 AC_MSG_RESULT([${with_context_manager}])
100 AM_CONDITIONAL([USE_NETWORK_MANAGER],
101 [test "x$with_context_manager" = "xnetwork-manager"])
102 AS_IF([test "x$with_context_manager" = "xnetwork-manager"],
103 [PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.26)])
105 AM_CONDITIONAL([USE_CONNMAN],
106 [test "x$with_context_manager" = "xconnman"])
108 if test "x$with_context_manager" = "xconnman"; then
109 PKG_CHECK_MODULES(CONNMAN, glib-2.0 >= 2.28 connman >= 0.80)
113 AS_IF([test "x$with_context_manager" = "xlinux"],
114 [AS_IF([test "x$HAVE_NETLINK" = "xno"],
115 [AC_MSG_NOTICE([No rtnetlink found, falling back to static context manager])],
119 AM_CONDITIONAL(USE_NETLINK, test "x$USE_NETLINK" = "xyes")
120 AC_SUBST(USE_NETLINK)
123 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
124 AC_SUBST(GLIB_GENMARSHAL)
128 AS_HELP_STRING([--enable-debug], [enable debugging]),,
130 if test "x$enable_debug" = "xyes"; then
131 CFLAGS="$CFLAGS -g -Wall -Werror"
134 GOBJECT_INTROSPECTION_CHECK([0.6.4])
138 AS_IF([test "x$found_introspection" = "xyes"],
140 dnl output of g-i >= 1.36.0 needs vapigen >= 0.20 to process
141 AC_MSG_CHECKING([whether G-I is 1.36 or newer])
142 VAPIGEN_MIN_VERSION=0.14
143 AS_IF([pkg-config --atleast-version=1.36.0 gobject-introspection-1.0],
146 VAPIGEN_MIN_VERSION=0.20
147 ],[AC_MSG_RESULT([no])]
149 GUPNP_PROG_VAPIGEN([$VAPIGEN_MIN_VERSION])
152 AS_IF([test "x$VAPIGEN" != "x"], [have_vapigen=yes])
153 AM_CONDITIONAL([HAVE_VAPIGEN], [test "x$VAPIGEN" != "x"])
156 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
169 gupnp-1.0-uninstalled.pc
174 ${PACKAGE} ${VERSION}
175 ---------------------
178 GObject-Introspection: ${found_introspection}
179 VALA bindings: ${have_vapigen}
180 Context manager: ${with_context_manager}