Commit c480ee6e authored by Richard Hughes's avatar Richard Hughes

Remove the automake build system

parent 318ca266
SUBDIRS = \
data \
po \
lib \
plugins \
src \
tests
# we need objects in src
SUBDIRS += doc
snapshot:
$(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCLEANFILES = \
gnome-software-*.tar.xz
MAINTAINERCLEANFILES = \
*~ \
aclocal.m4 \
ChangeLog \
compile \
config.guess \
config.h.* \
config.rpath \
config.sub \
configure \
depcomp \
gtk-doc.make \
install-sh \
ltmain.sh \
Makefile.in \
missing \
mkinstalldirs \
po/*.header \
po/Makevars.template \
po/Rules-quot \
po/*.sed \
po/*.sin \
po/*.po~ \
NEWS \
test-driver
EXTRA_DIST = \
AUTHORS \
autogen.sh \
config.h \
COPYING \
MAINTAINERS \
NEWS \
README
DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
--disable-tests \
--disable-dogtail
distclean-local:
if test $(srdcir) = .; then :; else \
rm -f ChangeLog; \
rm -f NEWS; \
fi
ChangeLog:
@echo Creating $@
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log 40b7dc172740c49933139d950b72aab5549df92e.. --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
NEWS: data/appdata/*.appdata.xml
$(AM_V_GEN) \
if test -e $(APPSTREAM_UTIL); then \
$(APPSTREAM_UTIL) appdata-to-news $^ > $@; \
else \
touch $@; \
fi
.PHONY: ChangeLog NEWS
-include $(top_srcdir)/git.mk
#!/bin/sh
# Copyright (C) 2009 Richard Hughes <richard@hughsie.com>
#
# Run this to generate all the initial makefiles, etc.
#
# Licensed under the GNU General Public License Version 2
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory \"\'$srcdir\'\" does not look like the"
echo " top-level package directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common!"
exit 1
}
REQUIRED_AUTOMAKE_VERSION=1.7 GNOME_DATADIR="$gnome_datadir" . gnome-autogen.sh
#!/bin/bash
# configure script adapter for Meson
# Based on build-api: https://github.com/cgwalters/build-api
# Copyright 2010, 2011, 2013 Colin Walters <walters@verbum.org>
# Copyright 2016 Emmanuele Bassi
# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
# Build API variables:
# buildapi-variable-require-builddir
# Little helper function for reading args from the commandline.
# it automatically handles -a b and -a=b variants, and returns 1 if
# we need to shift $3.
read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read "$1" <<< "${BASH_REMATCH[1]}"
else
read "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
sanitycheck() {
# $1 = arg name
# $1 = arg command
# $2 = arg alternates
local cmd=$( which $2 2>/dev/null )
if [ -x "$cmd" ]; then
read "$1" <<< "$cmd"
return 0
fi
test -z $3 || {
for alt in $3; do
cmd=$( which $alt 2>/dev/null )
if [ -x "$cmd" ]; then
read "$1" <<< "$cmd"
return 0
fi
done
}
echo -e "\e[1;31mERROR\e[0m: Command '$2' not found"
exit 1
}
sanitycheck MESON 'meson'
sanitycheck NINJA 'ninja' 'ninja-build'
enable_docs='-Denable-gtk-doc=false'
enable_man='-Denable-man=false'
enable_introspection=''
while (($# > 0)); do
case "${1%%=*}" in
--prefix) read_arg prefix "$@" || shift;;
--bindir) read_arg bindir "$@" || shift;;
--sbindir) read_arg sbindir "$@" || shift;;
--libexecdir) read_arg libexecdir "$@" || shift;;
--datarootdir) read_arg datarootdir "$@" || shift;;
--datadir) read_arg datadir "$@" || shift;;
--sysconfdir) read_arg sysconfdir "$@" || shift;;
--libdir) read_arg libdir "$@" || shift;;
--mandir) read_arg mandir "$@" || shift;;
--includedir) read_arg includedir "$@" || shift;;
--enable-gtk-doc) enable_docs='-Denable-gtk-doc=true';;
--disable-gtk-doc) enable_docs='-Denable-gtk-doc=false';;
--enable-man) enable_man='-Denable-man=true';;
--disable-man) enable_man='-Denable-man=false';;
--enable-introspection) enable_introspection='';;
--disable-introspection) enable_introspection='-Ddisable_introspection=true';;
*) echo -e "\e[1;33mINFO\e[0m: Ignoring unknown option '$1'";;
esac
shift
done
# Defaults
test -z ${prefix} && prefix="/usr/local"
test -z ${bindir} && bindir=${prefix}/bin
test -z ${sbindir} && sbindir=${prefix}/sbin
test -z ${libexecdir} && libexecdir=${prefix}/bin
test -z ${datarootdir} && datarootdir=${prefix}/share
test -z ${datadir} && datadir=${datarootdir}
test -z ${sysconfdir} && sysconfdir=${prefix}/etc
test -z ${libdir} && libdir=${prefix}/lib
test -z ${mandir} && mandir=${prefix}/share/man
test -z ${includedir} && includedir=${prefix}/include
# The source directory is the location of this file
srcdir=$(dirname $0)
# Wrapper Makefile for Ninja
cat > Makefile <<END
# Generated by configure; do not edit
all:
CC="\$(CC)" CXX="\$(CXX)" ${NINJA}
install:
DESTDIR="\$(DESTDIR)" ${NINJA} install
END
echo "Summary:"
echo " meson:....... ${MESON}"
echo " ninja:....... ${NINJA}"
echo " prefix:...... ${prefix}"
echo " bindir:...... ${bindir}"
echo " sbindir:..... ${sbindir}"
echo " libexecdir:.. ${libexecdir}"
echo " datarootdir:. ${datarootdir}"
echo " datadir:..... ${datadir}"
echo " sysconfdir:.. ${sysconfdir}"
echo " libdir:...... ${libdir}"
echo " mandir:...... ${mandir}"
echo " includedir:.. ${includedir}"
echo " additional:.."
echo " - ${enable_docs} ${enable_man} ${enable_introspection}"
exec ${MESON} \
--prefix=${prefix} \
--libdir=${libdir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--bindir=${bindir} \
--includedir=${includedir} \
--mandir=${mandir} \
--default-library shared \
${enable_docs} \
${enable_man} \
${enable_introspection} \
${srcdir}
# vim: ai ts=8 noet sts=2 ft=sh
# Copyright (C) 2010-2015 Richard Hughes <richard@hughsie.com>
AC_PREREQ(2.63)
AC_INIT([gnome-software],[3.25.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-software])
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar serial-tests foreign])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# enable nice build output on automake1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PROG_CC_C99
AC_PROG_INSTALL
LT_INIT
AM_PROG_CC_C_O
# set up gtk-doc
GTK_DOC_CHECK([1.11],[--flavour no-tmpl])
dnl ---------------------------------------------------------------------------
dnl - Extra verbose warning switches
dnl ---------------------------------------------------------------------------
WARN_CFLAGS_EXTRA="
-Waggregate-return
-Warray-bounds
-Wcast-align
-Wclobbered
-Wdeclaration-after-statement
-Wempty-body
-Wextra
-Wformat=2
-Wformat-nonliteral
-Wformat-security
-Wformat-signedness
-Wignored-qualifiers
-Wimplicit-function-declaration
-Winit-self
-Winline
-Wmissing-declarations
-Wmissing-format-attribute
-Wmissing-include-dirs
-Wmissing-noreturn
-Wmissing-parameter-type
-Wmissing-prototypes
-Wnested-externs
-Wno-discarded-qualifiers
-Wno-missing-field-initializers
-Wno-strict-aliasing
-Wno-suggest-attribute=format
-Wno-unused-parameter
-Wold-style-definition
-Woverride-init
-Wpacked
-Wpointer-arith
-Wredundant-decls
-Wreturn-type
-Wshadow
-Wsign-compare
-Wstrict-aliasing
-Wstrict-prototypes
-Wswitch-default
-Wtype-limits
-Wundef
-Wuninitialized
-Wunused-but-set-variable
-Wwrite-strings"
AX_APPEND_COMPILE_FLAGS([$WARN_CFLAGS_EXTRA], [WARN_CFLAGS])
AC_SUBST(WARN_CFLAGS)
dnl ---------------------------------------------------------------------------
dnl - gettext stuff
dnl ---------------------------------------------------------------------------
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.7])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [gnome-software])
AM_PATH_GLIB_2_0(2.46.0, :, AC_MSG_ERROR([GLib is required]), gobject gmodule gio)
GLIB_GSETTINGS
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.20.0 gio-unix-2.0)
PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.6.7)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 2.31.5)
PKG_CHECK_MODULES(JSON_GLIB, json-glib-1.0 >= 1.1.1)
PKG_CHECK_MODULES(SQLITE, sqlite3)
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.51.92)
PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.11.5)
PKG_CHECK_MODULES(LIBSECRET, libsecret-1)
PKG_CHECK_MODULES(VALGRIND, valgrind)
AC_PATH_PROG(APPSTREAM_UTIL, [appstream-util], [unfound])
# Default, but it's ≥ 0.9.1 if we're building tests because there we need --timestamp
# If you bump this to > 0.9.1, remove the setting of FLATPAK_REQUIRED in the
# flatpak case below, otherwise you'll make the requirement go backwards if
# tests are enabled.
FLATPAK_REQUIRED=0.8.0
# use -lm
LT_LIB_M
AC_SUBST(LIBM)
# check for PIE (position independent executable) support
if test x$with_pic != xno; then
AX_CHECK_COMPILE_FLAG([-fPIE],
[AX_CHECK_LINK_FLAG([-fPIE -pie],
[PIE_CFLAGS="-fPIE" PIE_LDFLAGS="-pie"])])
AC_SUBST(PIE_CFLAGS)
AC_SUBST(PIE_LDFLAGS)
fi
# check for full RELRO (relocation read-only) support
AX_CHECK_LINK_FLAG([-Wl,-z,relro,-z,now],
[RELRO_LDFLAGS="-Wl,-z,relro,-z,now"])
AC_SUBST([RELRO_LDFLAGS])
AC_ARG_ENABLE(man,
[AS_HELP_STRING([--enable-man],
[generate man pages [default=auto]])],,
enable_man=maybe)
AS_IF([test "$enable_man" != no], [
AC_PATH_PROG([XSLTPROC], [xsltproc])
AS_IF([test -z "$XSLTPROC"], [
AS_IF([test "$enable_man" = yes], [
AC_MSG_ERROR([xsltproc is required for --enable-man])
])
enable_man=no
])
])
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
AC_ARG_ENABLE(dogtail,
[AS_HELP_STRING([--enable-dogtail],
[test using dogtail [default=yes]])],,
enable_dogtail=no)
AM_CONDITIONAL(ENABLE_DOGTAIL, test "$enable_dogtail" != no)
AC_ARG_ENABLE(tests,
[AS_HELP_STRING([--enable-tests],
[test using tests [default=yes]])],,
enable_tests=yes)
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != no)
# spell checking
AC_ARG_ENABLE(gtkspell,
[AS_HELP_STRING([--enable-gtkspell],
[enable gtkspell support [default=auto]])],,
enable_gtkspell=yes)
AS_IF([test "x$enable_gtkspell" != "xno"], [
PKG_CHECK_MODULES(GTKSPELL,
[gtkspell3-3.0],
[have_gtkspell=yes],
[have_gtkspell=no])
], [
have_gtkspell=no
])
AS_IF([test "x$have_gtkspell" = "xyes"], [
AC_DEFINE(HAVE_GTKSPELL,1,[Build gtkspell support])
], [
AS_IF([test "x$enable_gtkspell" = "xyes"], [
AC_MSG_ERROR([gtkspell support requested but 'gtkspell3' was not found])
])
])
AM_CONDITIONAL(HAVE_GTKSPELL, test "$have_gtkspell" != no)
# gnome-desktop support
AC_ARG_ENABLE(gnome-desktop,
[AS_HELP_STRING([--enable-gnome-desktop],
[enable gnome-desktop support [default=auto]])],,
enable_gnome_desktop=yes)
AS_IF([test "x$enable_gnome_desktop" != "xno"], [
PKG_CHECK_MODULES(GNOME_DESKTOP,
[gnome-desktop-3.0 >= 3.17.92],
[have_gnome_desktop=yes],
[have_gnome_desktop=no])
], [
have_gnome_desktop=no
])
AS_IF([test "x$have_gnome_desktop" = "xyes"], [
AC_DEFINE(HAVE_GNOME_DESKTOP,1,[Build gnome_desktop support])
], [
AS_IF([test "x$enable_gnome_desktop" = "xyes"], [
AC_MSG_ERROR([gnome-desktop support requested but 'gnome-desktop' was not found])
])
])
AM_CONDITIONAL(HAVE_GNOME_DESKTOP, test "$have_gnome_desktop" != no)
# PackageKit
AC_ARG_ENABLE(packagekit,
[AS_HELP_STRING([--enable-packagekit],
[enable PackageKit support [default=auto]])],,
enable_packagekit=maybe)
AS_IF([test "x$enable_packagekit" != "xno"], [
PKG_CHECK_MODULES(PACKAGEKIT,
[packagekit-glib2 >= 1.1.0],
[have_packagekit=yes],
[have_packagekit=no])
], [
have_packagekit=no
])
AS_IF([test "x$have_packagekit" = "xyes"], [
AC_DEFINE(HAVE_PACKAGEKIT,1,[Build packagekit support])
], [
AS_IF([test "x$enable_packagekit" = "xyes"], [
AC_MSG_ERROR([packagekit support requested but 'packagekit-glib2' was not found])
])
])
AM_CONDITIONAL(HAVE_PACKAGEKIT, test "$have_packagekit" != no)
# PolicyKit
AC_ARG_ENABLE(polkit,
[AS_HELP_STRING([--enable-polkit],
[enable PolicyKit support [default=auto]])],,
enable_polkit=maybe)
AS_IF([test "x$enable_polkit" != "xno"], [
PKG_CHECK_MODULES(POLKIT,
[polkit-gobject-1],
[have_polkit=yes],
[have_polkit=no])
], [
have_polkit=no
])
AS_IF([test "x$have_polkit" = "xyes"], [
AC_DEFINE(HAVE_POLKIT,1,[Build polkit support])
], [
AS_IF([test "x$enable_polkit" = "xyes"], [
AC_MSG_ERROR([polkit support requested but 'polkit-gobject-1' was not found])
])
])
AM_CONDITIONAL(HAVE_POLKIT, test "$have_polkit" != no)
# fwupd
AC_ARG_ENABLE(firmware,
[AS_HELP_STRING([--enable-firmware],
[enable firmware support [default=auto]])],,
enable_firmware=maybe)
AS_IF([test "x$enable_firmware" != "xno"], [
PKG_CHECK_MODULES(FWUPD,
[fwupd >= 0.7.0],
[have_firmware=yes],
[have_firmware=no])
], [
have_firmware=no
])
AS_IF([test "x$have_firmware" = "xyes"], [
AC_DEFINE(HAVE_FIRMWARE,1,[Build firmware support])
], [
AS_IF([test "x$enable_firmware" = "xyes"], [
AC_MSG_ERROR([Firmware support requested but 'fwupd' was not found])
])
])
AM_CONDITIONAL(HAVE_FIRMWARE, test x$have_firmware = xyes)
# flatpak
AC_ARG_ENABLE(flatpak,
[AS_HELP_STRING([--enable-flatpak],
[enable flatpak support [default=auto]])],,
enable_flatpak=maybe)
AS_IF([test "x$enable_flatpak" != "xno"], [
AS_IF([test "x$enable_tests" = "xyes"], [
# the flatpak tests want to call flatpak build-export --timestamp,
# which exists as of 0.9.1
FLATPAK_REQUIRED=0.9.1
])
PKG_CHECK_MODULES(FLATPAK,
[flatpak >= $FLATPAK_REQUIRED],
[have_flatpak=yes],
[have_flatpak=no])
], [
have_flatpak=no
])
AS_IF([test "x$have_flatpak" = "xyes"], [
AC_DEFINE(HAVE_FLATPAK,1,[Build flatpak support])
], [
AS_IF([test "x$enable_flatpak" = "xyes"], [
AC_MSG_ERROR([flatpak support requested but 'flatpak' ≥ $FLATPAK_REQUIRED was not found])
])
])
AM_CONDITIONAL(HAVE_FLATPAK, test "$have_flatpak" != no)
# ostree
AC_ARG_ENABLE(ostree,
[AS_HELP_STRING([--enable-ostree],
[enable ostree support [default=auto]])],,
enable_ostree=maybe)
AS_IF([test "x$enable_ostree" != "xno"], [
PKG_CHECK_MODULES(OSTREE,
[ostree-1 rpm],
[have_ostree=yes],
[have_ostree=no])
], [
have_ostree=no
])
AS_IF([test "x$have_ostree" = "xyes"], [
AC_DEFINE(HAVE_OSTREE,1,[Build ostree support])
], [
AS_IF([test "x$enable_ostree" = "xyes"], [
AC_MSG_ERROR([ostree support requested but 'ostree' or 'rpm' was not found])
])
])
AM_CONDITIONAL(HAVE_OSTREE, test "$have_ostree" != no)
# Limba
AC_ARG_ENABLE(limba,
[AS_HELP_STRING([--enable-limba],
[enable Limba support [default=auto]])],,
enable_limba=maybe)
AS_IF([test "x$enable_limba" != "xno"], [
PKG_CHECK_MODULES(LIMBA,
limba >= 0.5.6,
[have_limba=yes],
[have_limba=no])
], [
have_limba=no
])
AS_IF([test "x$have_limba" = "xyes"], [
AC_DEFINE(HAVE_LIMBA, 1, [Build Limba support])
], [
AS_IF([test "x$enable_limba" = "xyes"], [
AC_MSG_ERROR([Limba support requested but 'limba>=0.5.6' was not found])
])
])
AM_CONDITIONAL(HAVE_LIMBA, test x$enable_limba = xyes)
# Steam
AC_ARG_ENABLE(steam,
[AS_HELP_STRING([--enable-steam],
[enable steam support [default=yes]])],,
enable_steam=yes)
AS_IF([test "x$enable_steam" = "xyes"], [
AC_DEFINE(HAVE_STEAM,1,[Build steam support])
])
AM_CONDITIONAL(HAVE_STEAM, test x$enable_steam = xyes)
# Shell Extensions
AC_ARG_ENABLE(shell_extensions,
[AS_HELP_STRING([--enable-shell-extensions],
[enable GNOME shell extensions support [default=yes]])],,
enable_shell_extensions=yes)
AS_IF([test "x$enable_shell_extensions" = "xyes"], [
AC_DEFINE(HAVE_SHELL_EXTENSIONS,1,[Build GNOME Shell extensions])], [
])
AM_CONDITIONAL(HAVE_SHELL_EXTENSIONS, [test "x$enable_shell_extensions" = "xyes"])
# Open Desktop Ratings Service
AC_ARG_ENABLE(odrs,
[AS_HELP_STRING([--enable-odrs],
[enable ODRS support [default=yes]])],,
enable_odrs=yes)
AM_CONDITIONAL(HAVE_ODRS, test "x$enable_odrs" = "xyes")
# Ubuntu-specific Reviews
AC_ARG_ENABLE(ubuntu-reviews,
[AS_HELP_STRING([--enable-ubuntu-reviews],
[enable Ubuntu reviews [default=no]])],,
enable_ubuntu_reviews=no)
AS_IF([test "x$enable_ubuntu_reviews" = "xyes"], [
PKG_CHECK_MODULES(OAUTH, oauth)
])
AM_CONDITIONAL(HAVE_UBUNTU_REVIEWS, [test "x$enable_ubuntu_reviews" = "xyes"])
AC_DEFINE(HAVE_UBUNTU_REVIEWS,1,[Build Ubuntu reviews])
# Webapps
AC_ARG_ENABLE(webapps,
[AS_HELP_STRING([--enable-webapps],
[enable webapps [default=yes]])],,
enable_webapps=yes)
AM_CONDITIONAL(HAVE_WEBAPPS, [test "x$enable_webapps" = "xyes"])
# GUDev
AC_ARG_ENABLE(gudev,
[AS_HELP_STRING([--enable-gudev],
[enable GUDev support [default=auto]])],,
enable_gudev=maybe)
AS_IF([test "x$enable_gudev" != "xno"], [
PKG_CHECK_MODULES(GUDEV,
gudev-1.0,
[have_gudev=yes],
[have_gudev=no])
], [
have_gudev=no
])
AS_IF([test "x$have_gudev" = "xyes"], [
AC_DEFINE(HAVE_GUDEV, 1, [Build GUDev support])
], [
AS_IF([test "x$enable_gudev" = "xyes"], [
AC_MSG_ERROR([GUDEV support requested but 'gudev-1.0' was not found])
])
])
AM_CONDITIONAL(HAVE_GUDEV, test x$have_gudev = xyes)
# this refers to the gnome-software plugin API version
# this is not in any way related to a package or soname version
GS_PLUGIN_API_VERSION=11
AC_SUBST(GS_PLUGIN_API_VERSION)
AC_DEFINE_UNQUOTED([GS_PLUGIN_API_VERSION], "$GS_PLUGIN_API_VERSION", [the plugin API version])
# Snap
AC_ARG_ENABLE(snap,
[AS_HELP_STRING([--enable-snap],
[enable Snap support [default=auto]])],,
enable_snap=maybe)
AS_IF([test "x$enable_snap" != "xno"], [
PKG_CHECK_MODULES(SNAP,
[snapd-glib],
[have_snap=yes],
[have_snap=no])
], [
have_snap=no
])
AS_IF([test "x$have_snap" = "xyes"], [
AC_DEFINE(HAVE_SNAP,1,[Build Snap support])
], [
AS_IF([test "x$enable_snap" = "xyes"], [
AC_MSG_ERROR([Snap support requested but 'snapd-glib' was not found])
])
])
AM_CONDITIONAL(HAVE_SNAP, test "$have_snap" != no)
# External appstream
AC_ARG_ENABLE(external-appstream,
[AS_HELP_STRING([--enable-external-appstream],
[enable External Appstream support [default=no]])],,
enable_external_appstream=no)
AM_CONDITIONAL(HAVE_EXTERNAL_APPSTREAM, test "x$enable_external_appstream" = "xyes")
GLIB_TESTS
# common path used by all plugins
AC_SUBST(GS_PLUGIN_DIR, "\$(libdir)/gs-plugins-\${GS_PLUGIN_API_VERSION}")
# common flags used by all plugins
GS_PLUGIN_CFLAGS=""
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS -I\$(top_srcdir)/lib"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS -DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS -DG_LOG_USE_STRUCTURED"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $APPSTREAM_CFLAGS"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $GLIB_CFLAGS"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $GTK_CFLAGS"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $SOUP_CFLAGS"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $WARN_CFLAGS"
GS_PLUGIN_CFLAGS="$GS_PLUGIN_CFLAGS $PIE_CFLAGS"
AC_SUBST(GS_PLUGIN_CFLAGS)
# common libraries used by all plugins
GS_PLUGIN_LIBS="$LIBM"
GS_PLUGIN_LIBS="$GS_PLUGIN_LIBS $APPSTREAM_LIBS"
GS_PLUGIN_LIBS="$GS_PLUGIN_LIBS $GLIB_LIBS"
GS_PLUGIN_LIBS="$GS_PLUGIN_LIBS $GTK_LIBS"
GS_PLUGIN_LIBS="$GS_PLUGIN_LIBS $SOUP_LIBS"
AC_SUBST(GS_PLUGIN_LIBS)
# common cflags used by the private library
GS_PRIVATE_CFLAGS="$GS_PLUGIN_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $GDK_PIXBUF_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $JSON_GLIB_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $POLKIT_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $LIBSECRET_CFLAGS"
GS_PRIVATE_CFLAGS="$GS_PRIVATE_CFLAGS $VALGRIND_CFLAGS"
AC_SUBST(GS_PRIVATE_CFLAGS)
# common libraries used by the private library
GS_PRIVATE_LIBS="$GS_PLUGIN_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $GDK_PIXBUF_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $JSON_GLIB_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $POLKIT_LIBS"
GS_PRIVATE_LIBS="$GS_PRIVATE_LIBS $LIBSECRET_LIBS"
AC_SUBST(GS_PRIVATE_LIBS)
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
po/Makefile.in
data/appdata/Makefile
data/Makefile
data/icons/Makefile
data/icons/hicolor/Makefile
data/icons/hicolor/16x16/Makefile
data/icons/hicolor/22x22/Makefile
data/icons/hicolor/24x24/Makefile
data/icons/hicolor/32x32/Makefile
data/icons/hicolor/48x48/Makefile
data/icons/hicolor/256x256/Makefile
data/icons/hicolor/scalable/Makefile
data/tests/Makefile
doc/Makefile
doc/api/Makefile
lib/Makefile
lib/gnome-software.pc
plugins/Makefile
plugins/core/Makefile
plugins/dpkg/Makefile
plugins/dummy/Makefile
plugins/epiphany/Makefile
plugins/external-appstream/Makefile
plugins/fedora-distro-upgrades/Makefile