Blame configure.ac

Packit Service 931a4f
AC_PREREQ([2.64])
Packit Service 931a4f
AC_INIT([gupnp],
Packit Service 931a4f
        [1.0.6],
Packit Service 931a4f
        [https://gitlab.gnome.org/GNOME/gupnp/issues/new],
Packit Service 931a4f
        [gupnp],
Packit Service 931a4f
        [http://www.gupnp.org/])
Packit Service 931a4f
Packit Service 931a4f
AC_CONFIG_HEADERS([config.h])
Packit Service 931a4f
AC_CONFIG_SRCDIR([libgupnp/gupnp.h])
Packit Service 931a4f
AC_CONFIG_MACRO_DIR([m4])
Packit Service 931a4f
AC_CONFIG_AUX_DIR([build-aux])
Packit Service 931a4f
Packit Service 931a4f
AC_CANONICAL_HOST
Packit Service 931a4f
AC_CANONICAL_TARGET
Packit Service 931a4f
Packit Service 931a4f
AM_INIT_AUTOMAKE([1.11 tar-ustar no-dist-gzip dist-xz])
Packit Service 931a4f
AM_MAINTAINER_MODE([enable])
Packit Service 931a4f
Packit Service 931a4f
AM_SILENT_RULES([yes])
Packit Service 931a4f
Packit Service 931a4f
AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
Packit Service 931a4f
AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK])
Packit Service 931a4f
AX_CHECK_ENABLE_DEBUG([yes])
Packit Service 931a4f
Packit Service 931a4f
# Check for programs
Packit Service 931a4f
AC_PROG_CC
Packit Service 931a4f
AC_FUNC_MMAP
Packit Service 931a4f
AC_SYS_LARGEFILE
Packit Service 931a4f
Packit Service 931a4f
AX_IS_RELEASE([git-directory])
Packit Service 931a4f
AX_COMPILER_FLAGS([WARN_CFLAGS])
Packit Service 931a4f
Packit Service 931a4f
# Initialize libtool
Packit Service 931a4f
LT_PREREQ([2.2])
Packit Service 931a4f
LT_INIT
Packit Service 931a4f
Packit Service 931a4f
GUUL_CHECK_UUID([internal])
Packit Service 931a4f
UUID_LIBS=$GUUL_PKG
Packit Service 931a4f
AC_SUBST([UUID_LIBS])
Packit Service 931a4f
Packit Service 931a4f
AC_MSG_CHECKING([operating system])
Packit Service 931a4f
os_win32=no
Packit Service 931a4f
case "$target_os" in
Packit Service 931a4f
     mingw*|cygwin*)
Packit Service 931a4f
        os_win32=yes
Packit Service 931a4f
        AC_MSG_RESULT(Win32)
Packit Service 931a4f
        ;;
Packit Service 931a4f
     darwin*)
Packit Service 931a4f
        AC_MSG_RESULT(Darwin)
Packit Service 931a4f
        ;;
Packit Service 931a4f
     *)
Packit Service 931a4f
        AC_MSG_RESULT($target_os)
Packit Service 931a4f
        ;;
Packit Service 931a4f
esac
Packit Service 931a4f
Packit Service 931a4f
PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.40.0 \
Packit Service 931a4f
                            gio-2.0 \
Packit Service 931a4f
                            gmodule-2.0 \
Packit Service 931a4f
                            gssdp-1.0 >= 0.14.15 \
Packit Service 931a4f
                            libsoup-2.4 >= 2.48.0 \
Packit Service 931a4f
                            libxml-2.0)
Packit Service 931a4f
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
Packit Service 931a4f
Packit Service 931a4f
AM_CONDITIONAL(OS_WIN32, test "x$os_win32" = "xyes")
Packit Service 931a4f
if test "x$os_win32" = "xno"; then
Packit Service 931a4f
    AC_ARG_WITH([context_manager],
Packit Service 931a4f
            AS_HELP_STRING(
Packit Service 931a4f
                        [--with-context-manager=@<:@network-manager/connman/unix/linux@:>@],
Packit Service 931a4f
                        [Context Manager backend to use]),,
Packit Service 931a4f
            [with_context_manager="none"])
Packit Service 931a4f
else
Packit Service 931a4f
    with_context_manager="windows"
Packit Service 931a4f
fi
Packit Service 931a4f
Packit Service 931a4f
if test "x$with_context_manager" = "xnone"; then
Packit Service 931a4f
        case "$target_os" in
Packit Service 931a4f
        linux*)
Packit Service 931a4f
                with_context_manager="linux"
Packit Service 931a4f
                ;;
Packit Service 931a4f
        *)
Packit Service 931a4f
                with_context_manager="unix"
Packit Service 931a4f
                ;;
Packit Service 931a4f
        esac
Packit Service 931a4f
fi
Packit Service 931a4f
Packit Service 931a4f
AC_CHECK_HEADERS([sys/socket.h linux/rtnetlink.h],
Packit Service 931a4f
                [ HAVE_NETLINK=yes ],
Packit Service 931a4f
                [ HAVE_NETLINK=no ],
Packit Service 931a4f
                [ #ifdef HAVE_SYS_SOCKET_H
Packit Service 931a4f
                  #include <sys/socket.h>
Packit Service 931a4f
                  #endif
Packit Service 931a4f
                ])
Packit Service 931a4f
AM_CONDITIONAL([HAVE_NETLINK], [test "x$HAVE_NETLINK" = "xyes"])
Packit Service 931a4f
AC_SUBST(HAVE_NETLINK)
Packit Service 931a4f
Packit Service 931a4f
AC_CHECK_HEADERS([ifaddrs.h],
Packit Service 931a4f
                 [ HAVE_IFADDRS_H=yes ],
Packit Service 931a4f
                 [ HAVE_IFADDRS_H=no ])
Packit Service 931a4f
AM_CONDITIONAL([HAVE_IFADDRS_H], [test "x$HAVE_IFADDRS_H" = "xyes"])
Packit Service 931a4f
AC_SUBST(HAVE_IFADDRS_H)
Packit Service 931a4f
Packit Service 931a4f
AC_CHECK_HEADERS([linux/wireless.h], [], [],
Packit Service 931a4f
                [ #ifdef HAVE_SYS_SOCKET_H
Packit Service 931a4f
                  #include <sys/socket.h>
Packit Service 931a4f
                  #endif
Packit Service 931a4f
                ])
Packit Service 931a4f
Packit Service 931a4f
AC_MSG_CHECKING([Context Manager backend to use])
Packit Service 931a4f
AC_MSG_RESULT([${with_context_manager}])
Packit Service 931a4f
Packit Service 931a4f
AM_CONDITIONAL([USE_NETWORK_MANAGER],
Packit Service 931a4f
               [test "x$with_context_manager" = "xnetwork-manager"])
Packit Service 931a4f
Packit Service 931a4f
AM_CONDITIONAL([USE_CONNMAN],
Packit Service 931a4f
               [test "x$with_context_manager" = "xconnman"])
Packit Service 931a4f
Packit Service 931a4f
USE_NETLINK=no
Packit Service 931a4f
AS_IF([test "x$with_context_manager" = "xlinux"],
Packit Service 931a4f
      [AS_IF([test "x$HAVE_NETLINK" = "xno"],
Packit Service 931a4f
             [AS_IF([test "x$HAVE_IFADDRS" = "xyes"],
Packit Service 931a4f
	     AC_MSG_NOTICE([No rtnetlink found, falling back to static context manager]),
Packit Service 931a4f
	     AC_MSG_ERROR([No rtnetlink nor ifaddrs.h found]))],
Packit Service 931a4f
             [USE_NETLINK=yes])
Packit Service 931a4f
      ],[])
Packit Service 931a4f
Packit Service 931a4f
AM_CONDITIONAL(USE_NETLINK, test "x$USE_NETLINK" = "xyes")
Packit Service 931a4f
AC_SUBST(USE_NETLINK)
Packit Service 931a4f
Packit Service 931a4f
# glib-genmarshal
Packit Service 931a4f
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
Packit Service 931a4f
AC_SUBST(GLIB_GENMARSHAL)
Packit Service 931a4f
Packit Service 931a4f
GOBJECT_INTROSPECTION_CHECK([0.6.4])
Packit Service 931a4f
Packit Service 931a4f
# vapigen
Packit Service 931a4f
have_vapigen=no
Packit Service 931a4f
AS_IF([test "x$found_introspection" = "xyes"],
Packit Service 931a4f
      [
Packit Service 931a4f
       dnl output of g-i >= 1.36.0 needs vapigen >= 0.20 to process
Packit Service 931a4f
       AC_MSG_CHECKING([whether G-I is 1.36 or newer])
Packit Service 931a4f
       VAPIGEN_MIN_VERSION=0.14
Packit Service 931a4f
       AS_IF([pkg-config --atleast-version=1.36.0 gobject-introspection-1.0],
Packit Service 931a4f
             [
Packit Service 931a4f
              AC_MSG_RESULT([yes])
Packit Service 931a4f
              VAPIGEN_MIN_VERSION=0.20
Packit Service 931a4f
             ],[AC_MSG_RESULT([no])]
Packit Service 931a4f
       )
Packit Service 931a4f
       GUPNP_PROG_VAPIGEN([$VAPIGEN_MIN_VERSION])
Packit Service 931a4f
      ]
Packit Service 931a4f
)
Packit Service 931a4f
AS_IF([test "x$VAPIGEN" != "x"], [have_vapigen=yes])
Packit Service 931a4f
AM_CONDITIONAL([HAVE_VAPIGEN], [test "x$VAPIGEN" != "x"])
Packit Service 931a4f
Packit Service 931a4f
# Gtk-doc
Packit Service 931a4f
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
Packit Service 931a4f
Packit Service 931a4f
AC_CONFIG_FILES([
Packit Service 931a4f
Makefile
Packit Service 931a4f
libgupnp/Makefile
Packit Service 931a4f
examples/Makefile
Packit Service 931a4f
tools/Makefile
Packit Service 931a4f
tests/Makefile
Packit Service 931a4f
tests/gtest/Makefile
Packit Service 931a4f
doc/Makefile
Packit Service 931a4f
doc/version.xml
Packit Service 931a4f
vala/Makefile
Packit Service 931a4f
gupnp-1.0.pc
Packit Service 931a4f
gupnp-1.0-uninstalled.pc
Packit Service 931a4f
])
Packit Service 931a4f
AC_OUTPUT
Packit Service 931a4f
Packit Service 931a4f
echo "
Packit Service 931a4f
    ${PACKAGE} ${VERSION}
Packit Service 931a4f
    ---------------------
Packit Service 931a4f
Packit Service 931a4f
    Prefix:                ${prefix}
Packit Service 931a4f
    GObject-Introspection: ${found_introspection}
Packit Service 931a4f
    VALA bindings:         ${have_vapigen}
Packit Service 931a4f
    Context manager:       ${with_context_manager}
Packit Service 931a4f
    UUID Library:          ${GUUL_FLAVOR}
Packit Service 931a4f
"