build: drop autotools

This commit is contained in:
Aleksander Morgado
2022-10-27 20:41:55 +00:00
parent 3c430ce292
commit f419f56628
63 changed files with 1 additions and 6916 deletions

188
.gitignore vendored
View File

@@ -1,189 +1,3 @@
*~ *~
*.o *.bz2
*.lo
*.la
*.loT
*.gcno
*.gcda
*.tar.xz
*.pyc *.pyc
*.dirstamp
.deps
.libs
Makefile
Makefile.in
/INSTALL
/aclocal.m4
/autom4te.cache*
/compile
/config.*
/configure
/depcomp
/install-sh
/ltmain.sh
/missing
/stamp-h1
/libtool
/tags
/TAGS
/ABOUT-NLS
/ChangeLog
/include/ModemManager-version.h
/include/ModemManager-names.h
/libmm-glib/generated/mm-gdbus-*.[ch]
/libmm-glib/generated/mm-enums-types.[ch]
/libmm-glib/generated/mm-errors-types.[ch]
/libmm-glib/generated/mm-errors-quarks.c
/libmm-glib/generated/*.xml
/libmm-glib/generated/tests/mm-gdbus-*.[ch]
/libmm-glib/tests/test-common-helpers
/libmm-glib/tests/test-pco
/libmm-glib/*.gir
/libmm-glib/*.typelib
/src/ModemManager
/src/mm-daemon-enums-types.c
/src/mm-daemon-enums-types.h
/src/mm-port-enums-types.c
/src/mm-port-enums-types.h
/src/mm-helper-enums-types.c
/src/mm-helper-enums-types.h
/src/mm-marshal.[ch]
/src/tests/test-modem-helpers
/src/tests/test-modem-helpers-qmi
/src/tests/test-charsets
/src/tests/test-qcdm-serial-port
/src/tests/test-at-serial-port
/src/tests/test-sms-part-3gpp
/src/tests/test-sms-part-cdma
/src/tests/test-udev-rules
/src/tests/test-error-helpers
/src/tests/test-kernel-device-helpers
/cli/mmcli
/vapi/libmm-glib.vapi
/libqcdm/tests/test-qcdm
/libqcdm/tests/modepref
/libqcdm/tests/ipv6pref
/libqcdm/tests/reset
/data/org.freedesktop.ModemManager1.conf
/data/org.freedesktop.ModemManager1.service
/data/org.freedesktop.ModemManager1.policy
/data/org.freedesktop.ModemManager1.policy.in
/data/ModemManager.service
/data/ModemManager.pc
/data/mm-common.pc
/data/mm-glib.pc
/data/tests/org.freedesktop.ModemManager1.service
/po/Makefile.in.in
/po/POTFILES
/po/stamp-it
/po/ModemManager.pot
/po/Makevars.template
/po/Rules-quot
/po/boldquot.sed
/po/en@boldquot.header
/po/en@quot.header
/po/insert-header.sin
/po/quot.sed
/po/remove-potcdate.sin
/po/remove-potcdate.sed
/po/stamp-po
/po/*.gmo
/docs/reference/api/version.xml
/docs/reference/api/ModemManager.args
/docs/reference/api/ModemManager.hierarchy
/docs/reference/api/ModemManager.interfaces
/docs/reference/api/ModemManager.prerequisites
/docs/reference/api/ModemManager.signals
/docs/reference/api/ModemManager.actions
/docs/reference/api/*.stamp
/docs/reference/api/*.txt
/docs/reference/api/html
/docs/reference/api/tmpl
/docs/reference/api/xml
/docs/reference/api/*.png
/docs/reference/libmm-glib/version.xml
/docs/reference/libmm-glib/libmm-glib.args
/docs/reference/libmm-glib/libmm-glib.hierarchy
/docs/reference/libmm-glib/libmm-glib.interfaces
/docs/reference/libmm-glib/libmm-glib.prerequisites
/docs/reference/libmm-glib/libmm-glib.signals
/docs/reference/libmm-glib/libmm-glib.actions
/docs/reference/libmm-glib/libmm-glib.types
/docs/reference/libmm-glib/*.stamp
/docs/reference/libmm-glib/*.txt
/docs/reference/libmm-glib/html
/docs/reference/libmm-glib/tmpl
/docs/reference/libmm-glib/xml
/m4/gtk-doc.m4
/m4/libtool.m4
/m4/lt*.m4
/m4/codeset.m4
/m4/gettext.m4
/m4/glibc2.m4
/m4/glibc21.m4
/m4/iconv.m4
/m4/intdiv0.m4
/m4/intl.m4
/m4/intldir.m4
/m4/intlmacosx.m4
/m4/intmax.m4
/m4/inttypes-pri.m4
/m4/inttypes_h.m4
/m4/lcmessage.m4
/m4/lib-ld.m4
/m4/lib-link.m4
/m4/lib-prefix.m4
/m4/lock.m4
/m4/longlong.m4
/m4/nls.m4
/m4/po.m4
/m4/printf-posix.m4
/m4/progtest.m4
/m4/size_max.m4
/m4/stdint_h.m4
/m4/uintmax_t.m4
/m4/visibility.m4
/m4/wchar_t.m4
/m4/wint_t.m4
/m4/xsize.m4
/m4/extern-inline.m4
/m4/fcntl-o.m4
/m4/threadlib.m4
/plugins/test-suite.log
/plugins/test-udev-rules
/plugins/test-keyfiles
/plugins/test-modem-helpers-*
/plugins/test-service-*
/plugins/ublox/mm-ublox-enums-types.[ch]
/plugins/telit/mm-telit-enums-types.[ch]
/plugins/huawei/mm-huawei-enums-types.[ch]
/test/lsudev
/test/mmtty
/test/mmrules
/test/mmsmspdu
/test/mmsmsmonitor
/tools/tests/services/org.freedesktop.ModemManager1.service
/tools/tests/test-stub
/tools/tests/test-wrapper.sh
/examples/sms-c/sms-c-sync
/examples/sms-c/sms-c-async
/ModemManager-*-coverage.info
/ModemManager-*-coverage/

View File

@@ -1,56 +0,0 @@
SUBDIRS = \
. \
build-aux \
po \
data \
include \
libqcdm \
libmm-glib \
src \
plugins \
cli \
vapi \
introspection \
tools \
examples \
docs \
$(NULL)
if WITH_TESTS
SUBDIRS += test
endif
ChangeLog:
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log --stat) | 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
AM_DISTCHECK_CONFIGURE_FLAGS = \
--with-udev-base-dir="$$dc_install_base" \
--with-systemdsystemunitdir="$$dc_install_base/$(SYSTEMD_UNIT_DIR)" \
--enable-gtk-doc=yes \
$(NULL)
EXTRA_DIST = \
autogen.sh \
gtester.make \
COPYING.LIB \
$(NULL)
ACLOCAL_AMFLAGS = -I m4
@CODE_COVERAGE_RULES@
if CODE_COVERAGE_ENABLED
clean-local:
-find $(top_builddir) -name "*.gcno" -delete
endif

View File

@@ -1,22 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.9
PKG_NAME=ModemManager
(test -f $srcdir/configure.ac \
&& test -f $srcdir/src/main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
(cd $srcdir;
GTKDOCIZE="true" autoreconf --force --install --verbose
)
if test -z "$NOCONFIGURE"; then
$srcdir/configure --enable-maintainer-mode "$@"
fi

View File

@@ -1,8 +0,0 @@
EXTRA_DIST = \
header-generator.xsl \
mm-enums-types.h.template \
mm-enums-types.c.template \
mm-errors-types.h.template \
mm-errors-types.c.template \
mm-errors-quarks.c.template

View File

@@ -1,63 +0,0 @@
bin_PROGRAMS = mmcli
mmcli_CPPFLAGS = \
$(WARN_CFLAGS) \
$(MMCLI_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
$(NULL)
mmcli_SOURCES = \
mmcli.h \
mmcli.c \
mmcli-common.h mmcli-common.c \
mmcli-output.h mmcli-output.c \
mmcli-manager.c \
mmcli-modem.c \
mmcli-modem-3gpp.c \
mmcli-modem-3gpp-profile-manager.c \
mmcli-modem-3gpp-ussd.c \
mmcli-modem-cdma.c \
mmcli-modem-simple.c \
mmcli-modem-location.c \
mmcli-modem-messaging.c \
mmcli-modem-voice.c \
mmcli-modem-time.c \
mmcli-modem-firmware.c \
mmcli-modem-sar.c \
mmcli-modem-signal.c \
mmcli-modem-oma.c \
mmcli-bearer.c \
mmcli-sim.c \
mmcli-sms.c \
mmcli-call.c \
$(NULL)
mmcli_LDADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
mmcli_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MMCLI_LIBS) \
$(NULL)
if WITH_UDEV
mmcli_CPPFLAGS += $(GUDEV_CFLAGS)
mmcli_LDFLAGS += $(GUDEV_LIBS)
endif
completiondir = $(datadir)/bash-completion/completions
install-data-hook:
$(mkinstalldirs) $(DESTDIR)$(completiondir)
$(INSTALL_DATA) $(srcdir)/mmcli-completion $(DESTDIR)$(completiondir)/mmcli
uninstall-hook:
rm -f $(DESTDIR)$(completiondir)/mmcli
EXTRA_DIST = mmcli-completion

View File

@@ -1,741 +0,0 @@
AC_PREREQ([2.63])
dnl-----------------------------------------------------------------------------
dnl Package and library versioning support
dnl
m4_define([mm_major_version], [1])
m4_define([mm_minor_version], [21])
m4_define([mm_micro_version], [0])
m4_define([mm_version],
[mm_major_version.mm_minor_version.mm_micro_version])
dnl libtool versioning for libmm-glib (-version-info c:r:a)
dnl If the interface is unchanged, but the implementation has changed or
dnl been fixed, then increment r.
dnl Otherwise, increment c and zero r.
dnl If the interface has grown (that is, the new library is compatible
dnl with old code), increment a.
dnl If the interface has changed in an incompatible way (that is,
dnl functions have changed or been removed), then zero a.
m4_define([mm_glib_lt_current], [9])
m4_define([mm_glib_lt_revision], [0])
m4_define([mm_glib_lt_age], [9])
dnl-----------------------------------------------------------------------------
dnl autoconf, automake, libtool initialization
dnl
AC_INIT([ModemManager],
[mm_version],
[https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues],
[ModemManager])
AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
dnl Define system extensions for various things like strcasestr()
AC_USE_SYSTEM_EXTENSIONS
dnl Required programs
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_LN_S
dnl Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])
dnl-----------------------------------------------------------------------------
dnl Compiler warnings
dnl
dnl Make sure autoconf-archive is available
m4_pattern_forbid([^AX_(COMPILER_FLAGS|COMPILER_FLAGS_(CFLAGS|GIR|LDFLAGS))\b],
[Unexpanded AX_ macro found. Please install GNU autoconf-archive])
dnl Detect git or release builds
AX_IS_RELEASE([git-directory])
dnl Function type cast disabled: used throughout the code especially to
dnl cast GAsyncReadyCallbacks with the real object type instead of GObject
DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-cast-function-type"
dnl All message protocol structs are packed, never complain about it
DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed"
dnl Setup compiler checks
AX_COMPILER_FLAGS()
AX_COMPILER_FLAGS_CFLAGS(,,,[${DISABLED_WARNINGS}])
dnl Specify gnu89 mode
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -std=gnu89"
fi
dnl-----------------------------------------------------------------------------
dnl Version definitions
dnl
dnl Version stuff
MM_MAJOR_VERSION=mm_major_version
MM_MINOR_VERSION=mm_minor_version
MM_MICRO_VERSION=mm_micro_version
MM_VERSION=mm_version
AC_SUBST(MM_MAJOR_VERSION)
AC_SUBST(MM_MINOR_VERSION)
AC_SUBST(MM_MICRO_VERSION)
AC_SUBST(MM_VERSION)
dnl libtool version stuff
MM_GLIB_LT_CURRENT=mm_glib_lt_current
MM_GLIB_LT_REVISION=mm_glib_lt_revision
MM_GLIB_LT_AGE=mm_glib_lt_age
AC_SUBST(MM_GLIB_LT_CURRENT)
AC_SUBST(MM_GLIB_LT_REVISION)
AC_SUBST(MM_GLIB_LT_AGE)
dnl-----------------------------------------------------------------------------
dnl Documentation
dnl
GTK_DOC_CHECK(1.0)
dnl-----------------------------------------------------------------------------
dnl i18n
dnl
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
GETTEXT_PACKAGE=ModemManager
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
dnl-----------------------------------------------------------------------------
dnl Build dependencies
dnl
GLIB_MIN_VERSION=2.56.0
GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_DISABLE_DEPRECATION_WARNINGS"
PKG_CHECK_MODULES(MM,
glib-2.0 >= $GLIB_MIN_VERSION
gmodule-2.0
gobject-2.0
gio-2.0
gio-unix-2.0)
MM_CFLAGS="$MM_CFLAGS $GLIB_BUILD_SYMBOLS"
AC_SUBST(MM_CFLAGS)
AC_SUBST(MM_LIBS)
PKG_CHECK_MODULES(LIBMM_GLIB,
glib-2.0 >= $GLIB_MIN_VERSION
gobject-2.0
gio-2.0
gio-unix-2.0)
LIBMM_GLIB_CFLAGS="$LIBMM_GLIB_CFLAGS $GLIB_BUILD_SYMBOLS"
AC_SUBST(LIBMM_GLIB_CFLAGS)
AC_SUBST(LIBMM_GLIB_LIBS)
PKG_CHECK_MODULES(MMCLI,
glib-2.0 >= $GLIB_MIN_VERSION
gobject-2.0
gio-2.0)
MMCLI_CFLAGS="$MMCLI_CFLAGS $GLIB_BUILD_SYMBOLS"
AC_SUBST(MMCLI_CFLAGS)
AC_SUBST(MMCLI_LIBS)
dnl Some required utilities
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_MKENUMS)
GDBUS_CODEGEN=`$PKG_CONFIG --variable=gdbus_codegen gio-2.0`
AC_SUBST(GDBUS_CODEGEN)
dnl xsltproc required in git builds only
AC_CHECK_PROG(XSLTPROC_CHECK,xsltproc,yes)
if test "x$ax_is_release" != "xyes" -a "x$XSLTPROC_CHECK" != "xyes"; then
AC_MSG_ERROR([Please install xsltproc before configuring.])
fi
dnl-----------------------------------------------------------------------------
dnl Testing support
dnl
dnl Code coverage (disabled by default)
AX_CODE_COVERAGE
dnl-----------------------------------------------------------------------------
dnl Introspection and bindings
dnl
dnl GObject Introspection
GOBJECT_INTROSPECTION_CHECK([0.9.6])
dnl Vala bindings
VAPIGEN_CHECK(0.18)
if test "x$enable_vala" = "xyes" -a ! -f "$VAPIGEN_MAKEFILE"; then
AC_MSG_ERROR([Vala bindings enabled but Makefile.vapigen not found. Install vala-devel, or pass --disable-vala])
fi
dnl-----------------------------------------------------------------------------
dnl System paths
dnl
dnl ModemManager configuration directory
pkgsysconfdir="${sysconfdir}/ModemManager"
AC_SUBST(pkgsysconfdir)
dnl DBus system directory
AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is]))
if test -n "$with_dbus_sys_dir" ; then
DBUS_SYS_DIR="$with_dbus_sys_dir"
else
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
dnl udev base directory
AC_ARG_WITH(udev-base-dir, AS_HELP_STRING([--with-udev-base-dir=DIR], [where udev base directory is]))
if test -n "$with_udev_base_dir" ; then
UDEV_BASE_DIR="$with_udev_base_dir"
else
UDEV_BASE_DIR="/lib/udev"
fi
AC_SUBST(UDEV_BASE_DIR)
dnl systemd system unit directory
AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [where systemd service files are]),
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$SYSTEMD_UNIT_DIR" -a "$SYSTEMD_UNIT_DIR" != xno ])
dnl subdir where plugins are built w.r.t abs_top_builddir, just because it's
dnl different to what meson does
PLUGIN_BUILD_SUBDIR="plugins/.libs"
AC_SUBST(PLUGIN_BUILD_SUBDIR)
dnl-----------------------------------------------------------------------------
dnl udev support (enabled by default)
dnl
GUDEV_VERSION=232
AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev], [Build without udev support]), [], [with_udev=yes])
AM_CONDITIONAL(WITH_UDEV, test "x$with_udev" = "xyes")
case $with_udev in
yes)
PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= $GUDEV_VERSION], [have_gudev=yes],[have_gudev=no])
if test "x$have_gudev" = "xno"; then
AC_MSG_ERROR([Couldn't find gudev >= $GUDEV_VERSION. Install it, or otherwise configure using --without-udev to disable udev support.])
else
AC_DEFINE(WITH_UDEV, 1, [Define if you want udev support])
AC_SUBST(GUDEV_CFLAGS)
AC_SUBST(GUDEV_LIBS)
fi
;;
*)
with_udev=no
;;
esac
dnl-----------------------------------------------------------------------------
dnl build with tests (enabled by default)
dnl
AC_ARG_WITH(tests, AS_HELP_STRING([--without-tests], [Build without testcases]), [], [with_tests=yes])
AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
case $with_tests in
yes)
AC_DEFINE(WITH_TESTS, 1, [Define if you want to build all testcases])
;;
*)
with_tests=no
;;
esac
dnl-----------------------------------------------------------------------------
dnl Suspend/resume support
dnl
PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd >= 209],[have_libsystemd=yes],[have_libsystemd=no])
PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 183],[have_libsystemd_login=yes],[have_libsystemd_login=no])
PKG_CHECK_MODULES(LIBELOGIND, [libelogind >= 209], [have_elogind=yes], [have_elogind=no])
AC_ARG_WITH(systemd-suspend-resume,
AS_HELP_STRING([--with-systemd-suspend-resume=no|yes],
[Enable systemd suspend/resume support [[default=auto]]]),,
[with_systemd_suspend_resume=auto])
AC_ARG_WITH(powerd-suspend-resume,
AS_HELP_STRING([--with-powerd-suspend-resume=no|yes],
[Enable powerd suspend/resume support [[default=no]]]),,
[with_powerd_suspend_resume=no])
if test "x$with_systemd_suspend_resume" = "xauto"; then
if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then
with_systemd_suspend_resume=yes
else
with_systemd_suspend_resume=no
fi
fi
case $with_systemd_suspend_resume in
yes)
if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno" && test "x$have_elogind" = "xno"; then
AC_MSG_WARN(libsystemd, libsystemd-login or elogind must be available at runtime for suspend/resume support)
fi
;;
*)
with_systemd_suspend_resume=no
;;
esac
if test "x$with_systemd_suspend_resume" = "xyes" && test "x$with_powerd_suspend_resume" = "xyes"; then
AC_MSG_ERROR(--with_systemd_suspend_resume and --with_powerd_suspend_resume should not be selected at the same time)
fi
if test "x$with_systemd_suspend_resume" = "xyes" || test "x$with_powerd_suspend_resume" = "xyes"; then
AC_DEFINE(WITH_SUSPEND_RESUME, 1, [Define if you have systemd or powerd suspend-resume support])
fi
AM_CONDITIONAL(WITH_SYSTEMD_SUSPEND_RESUME, test "x$with_systemd_suspend_resume" = "xyes")
AM_CONDITIONAL(WITH_POWERD_SUSPEND_RESUME, test "x$with_powerd_suspend_resume" = "xyes")
dnl-----------------------------------------------------------------------------
dnl systemd journal support
dnl
AC_ARG_WITH(systemd-journal,
AS_HELP_STRING([--with-systemd-journal=no|yes|auto],
[Enable systemd journal support [[default=auto]]]),,
[with_systemd_journal=auto])
if test "x$with_systemd_journal" = "xauto"; then
if test "x$have_libsystemd" = "xyes"; then
with_systemd_journal=yes
else
with_systemd_journal=no
fi
fi
case $with_systemd_journal in
yes)
if test "x$have_libsystemd" = "xno"; then
AC_MSG_ERROR(libsystemd development headers are required)
fi
AC_DEFINE(WITH_SYSTEMD_JOURNAL, 1, [Define if you want systemd journal support])
;;
*)
with_systemd_journal=no
;;
esac
AM_CONDITIONAL(WITH_SYSTEMD_JOURNAL, test "x$with_systemd_journal" = "xyes")
dnl-----------------------------------------------------------------------------
dnl PolicyKit
dnl
PKG_CHECK_MODULES(POLKIT, [polkit-gobject-1 >= 0.97], [have_polkit=yes],[have_polkit=no])
AC_ARG_WITH(polkit,
AS_HELP_STRING([--with-polkit=(strict|permissive|no)],
[Enable PolicyKit support [[default=auto]]]),,
[with_polkit=auto])
if test "x$with_polkit" = "xauto"; then
if test "x$have_polkit" = "xno"; then
with_polkit="no"
else
with_polkit="strict"
fi
elif test "x$with_polkit" = "xyes"; then
with_polkit=strict
fi
MM_POLKIT_SERVICE=""
if test "x$with_polkit" != "xno"; then
if test "x$have_polkit" = "xno"; then
AC_MSG_ERROR(PolicyKit development headers are required)
fi
case "x$with_polkit" in
"xpermissive")
MM_DEFAULT_USER_POLICY="yes"
MM_POLKIT_SERVICE="polkit.service"
;;
"xstrict")
MM_DEFAULT_USER_POLICY="auth_self_keep"
MM_POLKIT_SERVICE="polkit.service"
;;
*)
AC_MSG_ERROR([Wrong value for --with-polkit: $with_polkit])
;;
esac
AC_DEFINE(WITH_POLKIT, 1, [Define if you have PolicyKit support])
AC_SUBST(POLKIT_CFLAGS)
AC_SUBST(POLKIT_LIBS)
AC_SUBST(MM_DEFAULT_USER_POLICY)
fi
AC_SUBST(MM_POLKIT_SERVICE)
AM_CONDITIONAL(WITH_POLKIT, [test "x$with_polkit" != "xno"])
dnl-----------------------------------------------------------------------------
dnl AT command via DBus support (disabled by default unless running in --debug)
dnl
dnl It is suggested that this option is only enabled in custom built systems and
dnl only if truly required.
dnl
AC_ARG_WITH(at_command_via_dbus,
AS_HELP_STRING([--with-at-command-via-dbus],
[Build with Modem.Command() interface enabled always]),
[],
[with_at_command_via_dbus=no])
if test "x$with_at_command_via_dbus" = "xyes"; then
AC_DEFINE(WITH_AT_COMMAND_VIA_DBUS, 1, [Define if you want to enable AT commands via DBus])
fi
dnl-----------------------------------------------------------------------------
dnl MBIM support (enabled by default)
dnl
LIBMBIM_VERSION=1.28.0
AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=yes])
AM_CONDITIONAL(WITH_MBIM, test "x$with_mbim" = "xyes")
case $with_mbim in
yes)
PKG_CHECK_MODULES(MBIM, [mbim-glib >= $LIBMBIM_VERSION], [have_mbim=yes],[have_mbim=no])
if test "x$have_mbim" = "xno"; then
AC_MSG_ERROR([Couldn't find libmbim-glib >= $LIBMBIM_VERSION. Install it, or otherwise configure using --without-mbim to disable MBIM support.])
else
AC_DEFINE(WITH_MBIM, 1, [Define if you want MBIM support])
AC_SUBST(MBIM_CFLAGS)
AC_SUBST(MBIM_LIBS)
fi
;;
*)
with_mbim=no
;;
esac
dnl-----------------------------------------------------------------------------
dnl QMI support (enabled by default)
dnl
LIBQMI_VERSION=1.32.0
AC_ARG_WITH(qmi, AS_HELP_STRING([--without-qmi], [Build without QMI support]), [], [with_qmi=yes])
AM_CONDITIONAL(WITH_QMI, test "x$with_qmi" = "xyes")
case $with_qmi in
yes)
PKG_CHECK_MODULES(QMI, [qmi-glib >= $LIBQMI_VERSION], [have_qmi=yes],[have_qmi=no])
if test "x$have_qmi" = "xno"; then
AC_MSG_ERROR([Couldn't find libqmi-glib >= $LIBQMI_VERSION. Install it, or otherwise configure using --without-qmi to disable QMI support.])
else
AC_DEFINE(WITH_QMI, 1, [Define if you want QMI support])
AC_SUBST(QMI_CFLAGS)
AC_SUBST(QMI_LIBS)
fi
;;
*)
with_qmi=no
;;
esac
dnl-----------------------------------------------------------------------------
dnl QRTR support (both as libqrtr-glib and libqmi-glib apis)
dnl
LIBQRTR_VERSION=1.0.0
PKG_CHECK_MODULES(QRTR, [qrtr-glib >= $LIBQRTR_VERSION],[have_qrtr=yes],[have_qrtr=no])
qmi_qrtr_supported=$($PKG_CONFIG --variable=qmi_qrtr_supported qmi-glib)
AC_ARG_WITH(qrtr, AS_HELP_STRING([--without-qrtr], [Build without QRTR support]), [], [with_qrtr=auto])
if test "x$with_qrtr" = "xauto"; then
if test "x$qmi_qrtr_supported" = "x1" && test "x$with_qmi" = "xyes" && test "x$have_qrtr" = "xyes"; then
with_qrtr=yes
else
with_qrtr=no
fi
fi
case $with_qrtr in
yes)
if test "x$with_qmi" = "xno"; then
AC_MSG_ERROR([QRTR support requires QMI enabled. Configure using --with-qmi, or otherwise configure using --without-qrtr to disable QRTR support.])
elif test "x$have_qrtr" = "xno"; then
AC_MSG_ERROR([Couldn't find libqrtr-glib >= $LIBQRTR_VERSION. Install it, or otherwise configure using --without-qrtr to disable QRTR support.])
elif test "x$qmi_qrtr_supported" != "x1"; then
AC_MSG_ERROR([Couldn't find QRTR support in libqmi-glib. Install it, or otherwise configure using --without-qrtr to disable QRTR support.])
else
AC_DEFINE(WITH_QRTR, 1, [Define if you want QRTR support])
AC_SUBST(QRTR_CFLAGS)
AC_SUBST(QRTR_LIBS)
fi
;;
*)
with_qrtr=no
;;
esac
AM_CONDITIONAL(WITH_QRTR, test "x$with_qrtr" = "xyes")
dnl-----------------------------------------------------------------------------
dnl Distribution version string
dnl
AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<mm-dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="")
if ! test x"$ac_distver" = x""; then
AC_DEFINE_UNQUOTED(MM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
fi
dnl-----------------------------------------------------------------------------
dnl Protocol libs
dnl
AM_CONDITIONAL(QCDM_STANDALONE, test "yes" = "no")
dnl-----------------------------------------------------------------------------
dnl Plugins
dnl
dnl By default all plugins are built and installed. If the user wants to build only
dnl some specific plugins, this can be done by disabling all first and then enabling
dnl only the ones required, e.g.:
dnl $ ./configure \
dnl --disable-all-plugins \
dnl --enable-plugin-generic \
dnl --enable-plugin-zte ...
dnl
dnl If the user wants all plugins except for some specific ones, those can be
dnl explicitly disabled, e.g.:
dnl $ ./configure \
dnl --disable-plugin-generic \
dnl --disable-plugin-zte ...
dnl
MM_ENABLE_ALL_PLUGINS
MM_ENABLE_PLUGIN([generic])
MM_ENABLE_PLUGIN([altair-lte])
MM_ENABLE_PLUGIN([anydata])
MM_ENABLE_PLUGIN([broadmobi])
MM_ENABLE_PLUGIN([cinterion])
MM_ENABLE_PLUGIN([dell],
[with_shared_sierra,
with_shared_novatel,
with_shared_xmm,
with_shared_telit,
with_shared_foxconn])
MM_ENABLE_PLUGIN([dlink])
MM_ENABLE_PLUGIN([fibocom],
[with_shared_fibocom,
with_shared_xmm])
MM_ENABLE_PLUGIN([foxconn],
[with_shared_foxconn])
MM_ENABLE_PLUGIN([gosuncn])
MM_ENABLE_PLUGIN([haier])
MM_ENABLE_PLUGIN([huawei])
MM_ENABLE_PLUGIN([intel])
MM_ENABLE_PLUGIN([iridium])
MM_ENABLE_PLUGIN([linktop])
MM_ENABLE_PLUGIN([longcheer])
MM_ENABLE_PLUGIN([mbm])
MM_ENABLE_PLUGIN([motorola])
MM_ENABLE_PLUGIN([mtk])
MM_ENABLE_PLUGIN([nokia])
MM_ENABLE_PLUGIN([nokia-icera],
[with_shared_icera])
MM_ENABLE_PLUGIN([novatel],
[with_shared_novatel])
MM_ENABLE_PLUGIN([novatel-lte])
MM_ENABLE_PLUGIN([option],
[with_shared_option])
MM_ENABLE_PLUGIN([option-hso],
[with_shared_option])
MM_ENABLE_PLUGIN([pantech])
MM_ENABLE_PLUGIN([qcom-soc])
MM_ENABLE_PLUGIN([quectel])
MM_ENABLE_PLUGIN([samsung],
[with_shared_icera])
MM_ENABLE_PLUGIN([sierra-legacy],
[with_shared_icera,
with_shared_sierra])
MM_ENABLE_PLUGIN([sierra],
[with_shared_xmm])
MM_ENABLE_PLUGIN([simtech])
MM_ENABLE_PLUGIN([telit],
[with_shared_telit])
MM_ENABLE_PLUGIN([thuraya])
MM_ENABLE_PLUGIN([tplink])
MM_ENABLE_PLUGIN([ublox])
MM_ENABLE_PLUGIN([via])
MM_ENABLE_PLUGIN([wavecom])
MM_ENABLE_PLUGIN([x22x])
MM_ENABLE_PLUGIN([zte],
[with_shared_icera])
MM_BUILD_SHARED([icera])
MM_BUILD_SHARED([sierra])
MM_BUILD_SHARED([option])
MM_BUILD_SHARED([novatel])
MM_BUILD_SHARED([xmm])
MM_BUILD_SHARED([telit])
MM_BUILD_SHARED([foxconn])
MM_BUILD_SHARED([fibocom])
dnl-----------------------------------------------------------------------------
dnl Output
dnl
AC_CONFIG_FILES([
Makefile
data/Makefile
data/ModemManager.pc
data/mm-glib.pc
data/dispatcher-connection/Makefile
data/dispatcher-fcc-unlock/Makefile
data/tests/Makefile
data/tests/org.freedesktop.ModemManager1.service
include/Makefile
include/ModemManager-version.h
build-aux/Makefile
libqcdm/Makefile
libqcdm/src/Makefile
libqcdm/tests/Makefile
src/Makefile
src/tests/Makefile
plugins/Makefile
test/Makefile
tools/Makefile
tools/tests/Makefile
tools/tests/services/org.freedesktop.ModemManager1.service
introspection/Makefile
introspection/tests/Makefile
po/Makefile.in
docs/Makefile
docs/man/Makefile
docs/reference/Makefile
docs/reference/api/Makefile
docs/reference/api/version.xml
docs/reference/libmm-glib/Makefile
docs/reference/libmm-glib/version.xml
libmm-glib/Makefile
libmm-glib/generated/Makefile
libmm-glib/generated/tests/Makefile
libmm-glib/tests/Makefile
vapi/Makefile
cli/Makefile
examples/Makefile
examples/modem-watcher-python/Makefile
examples/modem-watcher-javascript/Makefile
examples/sms-python/Makefile
examples/network-scan-python/Makefile
examples/sms-c/Makefile
])
AC_OUTPUT
echo "
ModemManager $VERSION
==============================================
Build:
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
warn cflags: ${WARN_CFLAGS}
warn ldflags: ${WARN_LDFLAGS}
maintainer mode: ${USE_MAINTAINER_MODE}
release: ${ax_is_release}
tests: ${with_tests}
System paths:
prefix: ${prefix}
configuration directory: ${pkgsysconfdir}
D-Bus system directory: ${DBUS_SYS_DIR}
udev base directory: ${UDEV_BASE_DIR}
systemd unit directory: ${with_systemdsystemunitdir}
Features:
udev: ${with_udev}
policykit: ${with_polkit}
mbim: ${with_mbim}
qmi: ${with_qmi}
qrtr: ${with_qrtr}
systemd suspend/resume: ${with_systemd_suspend_resume}
powerd suspend/resume: ${with_powerd_suspend_resume}
systemd journal: ${with_systemd_journal}
at command via dbus: ${with_at_command_via_dbus}
Shared utils:
icera: ${with_shared_icera}
sierra: ${with_shared_sierra}
option: ${with_shared_option}
novatel: ${with_shared_novatel}
xmm: ${with_shared_xmm}
telit: ${with_shared_telit}
foxconn: ${with_shared_foxconn}
Plugins:
generic: ${enable_plugin_generic}
altair lte: ${enable_plugin_altair_lte}
anydata: ${enable_plugin_anydata}
broadmobi: ${enable_plugin_broadmobi}
cinterion: ${enable_plugin_cinterion}
dell: ${enable_plugin_dell}
dlink: ${enable_plugin_dlink}
fibocom: ${enable_plugin_fibocom}
foxconn: ${enable_plugin_foxconn}
gosuncn: ${enable_plugin_gosuncn}
haier: ${enable_plugin_haier}
huawei: ${enable_plugin_huawei}
iridium: ${enable_plugin_iridium}
linktop: ${enable_plugin_linktop}
longcheer: ${enable_plugin_longcheer}
mbm: ${enable_plugin_mbm}
motorola: ${enable_plugin_motorola}
mtk: ${enable_plugin_mtk}
nokia: ${enable_plugin_nokia}
nokia icera: ${enable_plugin_nokia_icera}
novatel: ${enable_plugin_novatel}
novatel lte: ${enable_plugin_novatel_lte}
option: ${enable_plugin_option}
option hso: ${enable_plugin_option_hso}
pantech: ${enable_plugin_pantech}
qcom-soc: ${enable_plugin_qcom_soc}
quectel: ${enable_plugin_quectel}
samsung: ${enable_plugin_samsung}
sierra legacy: ${enable_plugin_sierra_legacy}
sierra: ${enable_plugin_sierra}
simtech: ${enable_plugin_simtech}
telit: ${enable_plugin_telit}
thuraya: ${enable_plugin_thuraya}
tplink: ${enable_plugin_tplink}
ublox: ${enable_plugin_ublox}
via: ${enable_plugin_via}
wavecom: ${enable_plugin_wavecom}
x22x: ${enable_plugin_x22x}
zte: ${enable_plugin_zte}
Miscellaneous:
gobject introspection: ${found_introspection}
vala bindings: ${enable_vala}
documentation: ${enable_gtk_doc}
code coverage: ${CODE_COVERAGE_ENABLED}"
if test "x${CODE_COVERAGE_ENABLED}" = "xyes"; then
echo " code coverage cflags: ${CODE_COVERAGE_CFLAGS}"
echo " code coverage ldflags: ${CODE_COVERAGE_LDFLAGS}"
fi
echo ""

View File

@@ -1,115 +0,0 @@
SUBDIRS = \
. \
dispatcher-connection \
dispatcher-fcc-unlock
if WITH_TESTS
SUBDIRS += tests
endif
edit = @sed \
-e 's|@sbindir[@]|$(sbindir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@libexecdir[@]|$(libexecdir)|g' \
-e 's|@MM_POLKIT_SERVICE[@]|$(MM_POLKIT_SERVICE)|g'
# DBus Service file
dbusservicedir = $(DBUS_SYS_DIR)
dbusservice_DATA = org.freedesktop.ModemManager1.conf
dbusservice_file_polkit = org.freedesktop.ModemManager1.conf.polkit
dbusservice_file_nopolkit = org.freedesktop.ModemManager1.conf.nopolkit
if WITH_POLKIT
org.freedesktop.ModemManager1.conf: $(top_srcdir)/data/$(dbusservice_file_polkit)
cp -f $(top_srcdir)/data/$(dbusservice_file_polkit) $(dbusservice_DATA)
else
org.freedesktop.ModemManager1.conf: $(top_srcdir)/data/$(dbusservice_file_nopolkit)
cp -f $(top_srcdir)/data/$(dbusservice_file_nopolkit) $(dbusservice_DATA)
endif
# systemd unit file
systemdsystemunitdir = $(SYSTEMD_UNIT_DIR)
systemdsystemunit_in_files = ModemManager.service.in
if HAVE_SYSTEMD
systemdsystemunit_DATA = ModemManager.service
ModemManager.service: ModemManager.service.in
$(edit) $< >$@
endif
# DBus Activation file
dbusactivationdir = $(datadir)/dbus-1/system-services
dbusactivation_DATA = org.freedesktop.ModemManager1.service
dbusactivation_in_files = org.freedesktop.ModemManager1.service.in
org.freedesktop.ModemManager1.service: org.freedesktop.ModemManager1.service.in
$(edit) $< >$@
# Icon
icondir=${datadir}/icons/hicolor/22x22/apps
icon_DATA = ModemManager.png
# Logos
logos = \
ModemManager-logo-square.svg ModemManager-logo-square.png \
ModemManager-logo-wide.svg ModemManager-logo-wide.png \
ModemManager-logo-wide-text.svg ModemManager-logo-wide-text.png
# Diagrams
diagrams = \
ModemManager-states.png \
ModemManager-interface-initialization-sequence.png \
ModemManager-interface-initialization-sequence-subclassed.png
# Polkit
# build file with translations, which we will include in dist
org.freedesktop.ModemManager1.policy.in: org.freedesktop.ModemManager1.policy.in.in
$(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir)/data $(MSGFMT) --xml -d $(top_srcdir)/po/ -o $@ --template $<
if WITH_POLKIT
# build with requested user policy
org.freedesktop.ModemManager1.policy: org.freedesktop.ModemManager1.policy.in
$(AM_V_GEN) sed -e s,@MM_DEFAULT_USER_POLICY\@,$(MM_DEFAULT_USER_POLICY), $< > $@.tmp && mv $@.tmp $@
polkit_policydir = $(datadir)/polkit-1/actions
polkit_policy_DATA = org.freedesktop.ModemManager1.policy
endif
# Set up pkg-config .pc files for exported libraries
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
ModemManager.pc \
mm-glib.pc
MAINTAINERCLEANFILES = \
org.freedesktop.ModemManager1.policy.in
DISTCLEANFILES = \
org.freedesktop.ModemManager1.policy \
$(dbusactivation_DATA) \
$(dbusservice_DATA)
if HAVE_SYSTEMD
DISTCLEANFILES += $(systemdsystemunit_DATA)
endif
EXTRA_DIST = \
its \
org.freedesktop.ModemManager1.policy.in.in \
org.freedesktop.ModemManager1.policy.in \
$(systemdsystemunit_in_files) \
$(dbusactivation_in_files) \
$(dbusservice_file_polkit) \
$(dbusservice_file_nopolkit) \
$(icon_DATA) \
$(logos) \
$(diagrams)

View File

@@ -1,21 +0,0 @@
# Directory for user-enabled tools
connectionuser = $(pkgsysconfdir)/connection.d
# Directory for package-enabled tools
connectionpackage = $(pkglibdir)/connection.d
# Shipped but disabled FCC unlock tools
connectionavailabledir = $(pkgdatadir)/connection.available.d
connectionavailable_SCRIPTS = \
99-log-event \
$(NULL)
EXTRA_DIST = $(connectionavailable_SCRIPTS)
install-data-hook:
$(MKDIR_P) $(DESTDIR)$(connectionuser); \
$(MKDIR_P) $(DESTDIR)$(connectionpackage); \
cd $(DESTDIR)$(connectionavailabledir); \
chmod go-rwx *; \
$(NULL)

View File

@@ -1,34 +0,0 @@
# Directory for user-enabled tools
fccunlockuser = $(pkgsysconfdir)/fcc-unlock.d
# Directory for package-enabled tools
fccunlockpackage = $(pkglibdir)/fcc-unlock.d
# Shipped but disabled FCC unlock tools
fccunlockavailabledir = $(pkgdatadir)/fcc-unlock.available.d
fccunlockavailable_SCRIPTS = \
105b \
1199 \
1eac \
2c7c \
$(NULL)
EXTRA_DIST = $(fccunlockavailable_SCRIPTS)
install-data-hook:
$(MKDIR_P) $(DESTDIR)$(fccunlockuser); \
$(MKDIR_P) $(DESTDIR)$(fccunlockpackage); \
cd $(DESTDIR)$(fccunlockavailabledir); \
chmod go-rwx *; \
$(LN_S) -f 105b 105b:e0ab; \
$(LN_S) -f 1199 03f0:4e1d; \
$(LN_S) -f 1199 1199:9079; \
$(LN_S) -f 1199 413c:81a3; \
$(LN_S) -f 1199 413c:81a8; \
$(LN_S) -f 1eac 1eac:1001; \
$(LN_S) -f 2c7c 2c7c:030a; \
$(NULL)
uninstall-hook:
cd $(DESTDIR)$(fccunlockavailabledir) && rm -f *:*

View File

@@ -1,2 +0,0 @@
EXTRA_DIST = org.freedesktop.ModemManager1.service.in

View File

@@ -1,14 +0,0 @@
SUBDIRS = reference man
# require gtk-doc when making dist
#
if ENABLE_GTK_DOC
dist-check-gtk-doc:
else
dist-check-gtk-doc:
@echo "*** gtk-doc must be enabled in order to make dist"
@false
endif
dist-hook: dist-check-gtk-doc

View File

@@ -1,3 +0,0 @@
man_MANS = ModemManager.8 mmcli.1
EXTRA_DIST = $(man_MANS)

View File

@@ -1,2 +0,0 @@
SUBDIRS = api libmm-glib

View File

@@ -1,114 +0,0 @@
# Logos
LOGOS_PNG = \
$(top_srcdir)/data/ModemManager-logo-square.png \
$(top_srcdir)/data/ModemManager-logo-wide.png \
$(top_srcdir)/data/ModemManager-logo-wide-text.png
# Diagrams
DIAGRAMS_PNG = \
$(top_srcdir)/data/ModemManager-states.png \
$(top_srcdir)/data/ModemManager-interface-initialization-sequence.png \
$(top_srcdir)/data/ModemManager-interface-initialization-sequence-subclassed.png
# The name of the module.
DOC_MODULE = ModemManager
# The top-level SGML file.
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = --deprecated-guards="MM_DISABLE_DEPRECATED"
# The directory containing the source code.
DOC_SOURCE_DIR = $(top_srcdir)/include
HFILE_GLOB =
CFILE_GLOB =
# Headers to ignore
IGNORE_HFILES = \
ModemManager.h \
ModemManager-names.h \
$(NULL)
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_srcdir) \
-I$(top_builddir) \
$(MM_CFLAGS) \
$(NULL)
GTKDOC_LIBS = \
$(MM_LIBS) \
$(NULL)
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=mm
# Images to copy into HTML directory
HTML_IMAGES = \
$(DIAGRAMS_PNG) \
$(LOGOS_PNG) \
$(NULL)
content_files =
expand_content_files = \
ModemManager-overview.xml \
ModemManager-dbus-reference.xml \
ModemManager-migration-reference.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Time.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Oma.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Signal.xml \
$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Sar.xml \
$(NULL)
extra_files = \
$(NULL)
if ENABLE_GTK_DOC
include $(top_srcdir)/gtk-doc.make
else
EXTRA_DIST =
CLEANFILES =
endif
EXTRA_DIST += \
ModemManager-overview.xml \
ModemManager-dbus-reference.xml \
ModemManager-migration-reference.xml \
version.xml.in \
$(DIAGRAMS) \
$(NULL)
CLEANFILES += \
$(DOC_MODULE)-decl-list.txt \
$(DOC_MODULE)-decl.txt \
$(DOC_MODULE)-overrides.txt \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-undocumented.txt \
$(DOC_MODULE)-overrides.txt \
$(DOC_MODULE)-unused.txt \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals \
*.stamp \
-rf xml html tmpl \
$(NULL)

View File

@@ -1,92 +0,0 @@
# Logos
LOGOS_PNG = \
$(top_srcdir)/data/ModemManager-logo-square.png \
$(top_srcdir)/data/ModemManager-logo-wide.png \
$(top_srcdir)/data/ModemManager-logo-wide-text.png
# The name of the module.
DOC_MODULE = libmm-glib
# The top-level SGML file.
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = --rebuild-types --deprecated-guards="MM_DISABLE_DEPRECATED"
# The directory containing the source code.
DOC_SOURCE_DIR = \
$(top_srcdir)/libmm-glib \
$(top_srcdir)/libmm-glib/generated \
$(top_builddir)/libmm-glib/generated \
$(NULL)
HFILE_GLOB =
CFILE_GLOB =
# Headers to ignore
IGNORE_HFILES = \
mm-helpers.h \
mm-common-helpers.h \
mm-gdbus-test.h \
$(NULL)
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_srcdir) \
-I$(top_builddir) \
$(MM_CFLAGS) \
$(NULL)
GTKDOC_LIBS = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(MM_LIBS) \
$(NULL)
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = \
--output-format=xml \
--sgml-mode \
--name-space=mm \
--ignore-files=mm-gdbus-test.h \
--ignore-files=mm-gdbus-test.c \
$(NULL)
# Images to copy into HTML directory
HTML_IMAGES = \
$(LOGOS_PNG) \
$(NULL)
content_files = \
$(NULL)
if ENABLE_GTK_DOC
include $(top_srcdir)/gtk-doc.make
else
EXTRA_DIST =
CLEANFILES =
endif
EXTRA_DIST += \
version.xml.in \
$(NULL)
CLEANFILES += \
$(DOC_MODULE)-decl-list.txt \
$(DOC_MODULE)-decl.txt \
$(DOC_MODULE)-overrides.txt \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-undocumented.txt \
$(DOC_MODULE)-overrides.txt \
$(DOC_MODULE)-unused.txt \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals \
$(DOC_MODULE).actions \
*.stamp \
-rf xml html tmpl \
$(NULL)

View File

@@ -1,7 +0,0 @@
SUBDIRS = \
modem-watcher-python \
modem-watcher-javascript \
sms-python \
network-scan-python \
sms-c \
$(NULL)

View File

@@ -1,5 +0,0 @@
EXTRA_DIST = \
main.js \
modemWatcher.js \
modem-watcher-javascript

View File

@@ -1,4 +0,0 @@
EXTRA_DIST = \
ModemWatcher.py \
modem-watcher-python

View File

@@ -1,4 +0,0 @@
EXTRA_DIST = \
network-scan-python \
$(NULL)

View File

@@ -1,49 +0,0 @@
noinst_PROGRAMS = sms-c-sync sms-c-async
sms_c_sync_CPPFLAGS = \
$(WARN_CFLAGS) \
$(MMCLI_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
$(NULL)
sms_c_sync_SOURCES = \
sms-c-sync.c \
$(NULL)
sms_c_sync_LDADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
sms_c_sync_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MMCLI_LIBS) \
$(NULL)
sms_c_async_CPPFLAGS = \
$(WARN_CFLAGS) \
$(MMCLI_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
$(NULL)
sms_c_async_SOURCES = \
sms-c-async.c \
$(NULL)
sms_c_async_LDADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
sms_c_async_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MMCLI_LIBS) \
$(NULL)

View File

@@ -1,4 +0,0 @@
EXTRA_DIST = \
sms-python \
$(NULL)

View File

@@ -1,71 +0,0 @@
GTESTER = gtester
GTESTER_REPORT = gtester-report
# initialize variables for unconditional += appending
EXTRA_DIST =
TEST_PROGS =
### testing rules
# test: run all tests in cwd and subdirs
test: test-nonrecursive
@ for subdir in $(SUBDIRS) . ; do \
test "$$subdir" = "." -o "$$subdir" = "po" || \
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
done
# test-nonrecursive: run tests only in cwd
test-nonrecursive: ${TEST_PROGS}
@test -z "${TEST_PROGS}" || G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS}
# test-report: run tests in subdirs and generate report
# perf-report: run tests in subdirs with -m perf and generate report
# full-report: like test-report: with -m perf and -m slow
test-report perf-report full-report: ${TEST_PROGS}
@test -z "${TEST_PROGS}" || { \
case $@ in \
test-report) test_options="-k";; \
perf-report) test_options="-k -m=perf";; \
full-report) test_options="-k -m=perf -m=slow";; \
esac ; \
if test -z "$$GTESTER_LOGDIR" ; then \
${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
elif test -n "${TEST_PROGS}" ; then \
${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
fi ; \
}
@ ignore_logdir=true ; \
if test -z "$$GTESTER_LOGDIR" ; then \
GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
ignore_logdir=false ; \
fi ; \
if test -d "$(top_srcdir)/.git" ; then \
REVISION=`git describe` ; \
else \
REVISION=$(VERSION) ; \
fi ; \
for subdir in $(SUBDIRS) . ; do \
test "$$subdir" = "." -o "$$subdir" = "po" || \
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
done ; \
$$ignore_logdir || { \
echo '<?xml version="1.0"?>' > $@.xml ; \
echo '<report-collection>' >> $@.xml ; \
echo '<info>' >> $@.xml ; \
echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
echo ' <version>$(VERSION)</version>' >> $@.xml ; \
echo " <revision>$$REVISION</revision>" >> $@.xml ; \
echo '</info>' >> $@.xml ; \
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
done ; \
echo >> $@.xml ; \
echo '</report-collection>' >> $@.xml ; \
rm -rf "$$GTESTER_LOGDIR"/ ; \
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
}
.PHONY: test test-report perf-report full-report test-nonrecursive
# run tests in cwd as part of make check
check-local: test-nonrecursive

View File

@@ -1,320 +0,0 @@
# -*- mode: makefile -*-
#
# gtk-doc.make - make rules for gtk-doc
# Copyright (C) 2003 James Henstridge
# 2004-2007 Damon Chaplin
# 2007-2017 Stefan Sauer
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
####################################
# Everything below here is generic #
####################################
if GTK_DOC_USE_LIBTOOL
GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
GTKDOC_RUN = $(LIBTOOL) --mode=execute
else
GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
GTKDOC_RUN =
endif
# We set GPATH here; this gives us semantics for GNU make
# which are more like other make's VPATH, when it comes to
# whether a source that is a target of one rule is then
# searched for in VPATH/GPATH.
#
GPATH = $(srcdir)
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
SETUP_FILES = \
$(content_files) \
$(expand_content_files) \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE)-sections.txt \
$(DOC_MODULE)-overrides.txt
EXTRA_DIST = \
$(HTML_IMAGES) \
$(SETUP_FILES)
DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
html-build.stamp pdf-build.stamp \
sgml.stamp html.stamp pdf.stamp
SCANOBJ_FILES = \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals
REPORT_FILES = \
$(DOC_MODULE)-undocumented.txt \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-unused.txt
gtkdoc-check.test: Makefile
$(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
chmod +x $@
CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test
if GTK_DOC_BUILD_HTML
HTML_BUILD_STAMP=html-build.stamp
else
HTML_BUILD_STAMP=
endif
if GTK_DOC_BUILD_PDF
PDF_BUILD_STAMP=pdf-build.stamp
else
PDF_BUILD_STAMP=
endif
all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
.PHONY: all-gtk-doc
if ENABLE_GTK_DOC
all-local: all-gtk-doc
endif
docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
$(REPORT_FILES): sgml-build.stamp
#### setup ####
GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_@AM_V@)
GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_@AM_DEFAULT_V@)
GTK_DOC_V_SETUP_0=@echo " DOC Preparing build";
setup-build.stamp:
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
if test "x$$files" != "x" ; then \
for file in $$files ; do \
destdir=`dirname $(abs_builddir)/$$file`; \
test -d "$$destdir" || mkdir -p "$$destdir"; \
test -f $(abs_srcdir)/$$file && \
cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
done; \
fi; \
fi
$(AM_V_at)touch setup-build.stamp
#### scan ####
GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_@AM_V@)
GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_@AM_DEFAULT_V@)
GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files";
GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_@AM_V@)
GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@)
GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects";
scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
$(GTK_DOC_V_SCAN)_source_dir='' ; \
for i in $(DOC_SOURCE_DIR) ; do \
_source_dir="$${_source_dir} --source-dir=$$i" ; \
done ; \
gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
$(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
scanobj_options=""; \
gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$$?" = "0"; then \
if test "x$(V)" = "x1"; then \
scanobj_options="--verbose"; \
fi; \
fi; \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
else \
for i in $(SCANOBJ_FILES) ; do \
test -f $$i || touch $$i ; \
done \
fi
$(AM_V_at)touch scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@true
#### xml ####
GTK_DOC_V_XML=$(GTK_DOC_V_XML_@AM_V@)
GTK_DOC_V_XML_=$(GTK_DOC_V_XML_@AM_DEFAULT_V@)
GTK_DOC_V_XML_0=@echo " DOC Building XML";
sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent
$(GTK_DOC_V_XML)_source_dir='' ; \
for i in $(DOC_SOURCE_DIR) ; do \
_source_dir="$${_source_dir} --source-dir=$$i" ; \
done ; \
gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
$(AM_V_at)touch sgml-build.stamp
sgml.stamp: sgml-build.stamp
@true
$(DOC_MAIN_SGML_FILE): sgml-build.stamp
@true
xml/gtkdocentities.ent: Makefile
$(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \
echo "<!ENTITY package \"$(PACKAGE)\">"; \
echo "<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \
echo "<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \
echo "<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \
echo "<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \
echo "<!ENTITY package_url \"$(PACKAGE_URL)\">"; \
echo "<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \
) > $@
#### html ####
GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_@AM_V@)
GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_@AM_DEFAULT_V@)
GTK_DOC_V_HTML_0=@echo " DOC Building HTML";
GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_@AM_V@)
GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_@AM_DEFAULT_V@)
GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references";
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
$(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
mkhtml_options=""; \
gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$$?" = "0"; then \
if test "x$(V)" = "x1"; then \
mkhtml_options="$$mkhtml_options --verbose"; \
fi; \
fi; \
gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
if test "$$?" = "0"; then \
mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
fi; \
cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-@test "x$(HTML_IMAGES)" = "x" || \
for file in $(HTML_IMAGES) ; do \
test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \
test -f $$file && cp $$file $(abs_builddir)/html; \
done;
$(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
$(AM_V_at)touch html-build.stamp
#### pdf ####
GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_@AM_V@)
GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_@AM_DEFAULT_V@)
GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
$(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
mkpdf_options=""; \
gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$$?" = "0"; then \
if test "x$(V)" = "x1"; then \
mkpdf_options="$$mkpdf_options --verbose"; \
fi; \
fi; \
if test "x$(HTML_IMAGES)" != "x"; then \
for img in $(HTML_IMAGES); do \
part=`dirname $$img`; \
echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
if test $$? != 0; then \
mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
fi; \
done; \
fi; \
gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
$(AM_V_at)touch pdf-build.stamp
##############
clean-local:
@rm -f *~ *.bak
@rm -rf .libs
@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
rm -f $(DOC_MODULE).types; \
fi
@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
rm -f $(DOC_MODULE)-sections.txt; \
fi
distclean-local:
@rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
$(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
rm -f $(SETUP_FILES) $(DOC_MODULE).types; \
fi
maintainer-clean-local:
@rm -rf xml html
install-data-local:
@installfiles=`echo $(builddir)/html/*`; \
if test "$$installfiles" = '$(builddir)/html/*'; \
then echo 1>&2 'Nothing to install' ; \
else \
if test -n "$(DOC_MODULE_VERSION)"; then \
installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
else \
installdir="$(DESTDIR)$(TARGET_DIR)"; \
fi; \
$(mkinstalldirs) $${installdir} ; \
for i in $$installfiles; do \
echo ' $(INSTALL_DATA) '$$i ; \
$(INSTALL_DATA) $$i $${installdir}; \
done; \
if test -n "$(DOC_MODULE_VERSION)"; then \
mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
$${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
fi; \
fi
uninstall-local:
@if test -n "$(DOC_MODULE_VERSION)"; then \
installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
else \
installdir="$(DESTDIR)$(TARGET_DIR)"; \
fi; \
rm -rf $${installdir}
#
# Require gtk-doc when making dist
#
if HAVE_GTK_DOC
dist-check-gtkdoc: docs
else
dist-check-gtkdoc:
@echo "*** gtk-doc is needed to run 'make dist'. ***"
@echo "*** gtk-doc was not found when 'configure' ran. ***"
@echo "*** please install gtk-doc and rerun 'configure'. ***"
@false
endif
dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local
@mkdir $(distdir)/html
@cp ./html/* $(distdir)/html
@-cp ./$(DOC_MODULE).pdf $(distdir)/
@-cp ./$(DOC_MODULE).types $(distdir)/
@-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
@cd $(distdir) && rm -f $(DISTCLEANFILES)
@$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
.PHONY : dist-hook-local docs

View File

@@ -1,23 +0,0 @@
XSLTPROC = xsltproc --xinclude --nonet
XMLS = $(wildcard $(top_srcdir)/introspection/*.xml)
includedir = @includedir@/ModemManager
include_HEADERS = \
ModemManager-names.h \
ModemManager-enums.h \
ModemManager-errors.h \
ModemManager-compat.h \
ModemManager-version.h \
ModemManager.h
ModemManager-names.h: $(XMLS) $(top_srcdir)/build-aux/header-generator.xsl
$(AM_V_GEN) $(XSLTPROC) $(top_srcdir)/build-aux/header-generator.xsl $(top_srcdir)/introspection/all.xml > $@
MAINTAINERCLEANFILES = \
ModemManager-names.h
EXTRA_DIST = \
ModemManager-tags.h \
ModemManager-version.h.in

View File

@@ -1,31 +0,0 @@
SUBDIRS = . tests
# DBus Introspection files
xmldir = $(datadir)/dbus-1/interfaces
xml_DATA = \
org.freedesktop.ModemManager1.xml \
org.freedesktop.ModemManager1.Modem.xml \
org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
org.freedesktop.ModemManager1.Modem.Simple.xml \
org.freedesktop.ModemManager1.Sim.xml \
org.freedesktop.ModemManager1.Bearer.xml \
org.freedesktop.ModemManager1.Modem.Location.xml \
org.freedesktop.ModemManager1.Modem.Messaging.xml \
org.freedesktop.ModemManager1.Sms.xml \
org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
org.freedesktop.ModemManager1.Modem.Firmware.xml \
org.freedesktop.ModemManager1.Modem.Oma.xml \
org.freedesktop.ModemManager1.Modem.Signal.xml \
org.freedesktop.ModemManager1.Modem.Time.xml \
org.freedesktop.ModemManager1.Modem.Voice.xml \
org.freedesktop.ModemManager1.Call.xml \
org.freedesktop.ModemManager1.Modem.Sar.xml \
org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
$(NULL)
EXTRA_DIST = \
$(xml_DATA) \
all.xml \
$(NULL)

View File

@@ -1,3 +0,0 @@
# DBus Introspection files
EXTRA_DIST = org.freedesktop.ModemManager1.Test.xml

View File

@@ -1,280 +0,0 @@
SUBDIRS = generated . tests
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
lib_LTLIBRARIES = libmm-glib.la
libmm_glib_la_SOURCES = \
libmm-glib.h \
mm-helpers.h \
mm-helper-types.h \
mm-helper-types.c \
mm-manager.h \
mm-manager.c \
mm-object.h \
mm-object.c \
mm-modem.h \
mm-modem.c \
mm-modem-3gpp.h \
mm-modem-3gpp.c \
mm-modem-3gpp-profile-manager.h \
mm-modem-3gpp-profile-manager.c \
mm-modem-3gpp-ussd.h \
mm-modem-3gpp-ussd.c \
mm-modem-cdma.h \
mm-modem-cdma.c \
mm-modem-simple.h \
mm-modem-simple.c \
mm-modem-location.h \
mm-modem-location.c \
mm-modem-time.h \
mm-modem-time.c \
mm-modem-firmware.h \
mm-modem-firmware.c \
mm-modem-sar.h \
mm-modem-sar.c \
mm-modem-signal.h \
mm-modem-signal.c \
mm-modem-oma.h \
mm-modem-oma.c \
mm-sim.h \
mm-sim.c \
mm-sms.h \
mm-sms.c \
mm-modem-messaging.h \
mm-modem-messaging.c \
mm-modem-voice.h \
mm-modem-voice.c \
mm-call.h \
mm-call.c \
mm-bearer.h \
mm-bearer.c \
mm-common-helpers.h \
mm-common-helpers.c \
mm-simple-status.h \
mm-simple-status.c \
mm-simple-connect-properties.h \
mm-simple-connect-properties.c \
mm-bearer-properties.h \
mm-bearer-properties.c \
mm-sms-properties.h \
mm-sms-properties.c \
mm-call-properties.h \
mm-call-properties.c \
mm-bearer-ip-config.h \
mm-bearer-ip-config.c \
mm-bearer-stats.h \
mm-bearer-stats.c \
mm-location-common.h \
mm-location-3gpp.h \
mm-location-3gpp.c \
mm-location-gps-raw.h \
mm-location-gps-raw.c \
mm-location-gps-nmea.h \
mm-location-gps-nmea.c \
mm-location-cdma-bs.h \
mm-location-cdma-bs.c \
mm-unlock-retries.h \
mm-unlock-retries.c \
mm-network-timezone.h \
mm-network-timezone.c \
mm-firmware-properties.h \
mm-firmware-properties.c \
mm-firmware-update-settings.h \
mm-firmware-update-settings.c \
mm-cdma-manual-activation-properties.h \
mm-cdma-manual-activation-properties.c \
mm-signal.h \
mm-signal.c \
mm-kernel-event-properties.h \
mm-kernel-event-properties.c \
mm-pco.h \
mm-pco.c \
mm-call-audio-format.h \
mm-call-audio-format.c \
mm-sim-preferred-network.h \
mm-sim-preferred-network.c \
mm-3gpp-profile.h \
mm-3gpp-profile.c \
mm-signal-threshold-properties.h \
mm-signal-threshold-properties.c \
mm-nr5g-registration-settings.h \
mm-nr5g-registration-settings.c \
mm-cell-info.h \
mm-cell-info.c \
mm-cell-info-cdma.h \
mm-cell-info-cdma.c \
mm-cell-info-gsm.h \
mm-cell-info-gsm.c \
mm-cell-info-umts.h \
mm-cell-info-umts.c \
mm-cell-info-tdscdma.h \
mm-cell-info-tdscdma.c \
mm-cell-info-lte.h \
mm-cell-info-lte.c \
mm-cell-info-nr5g.h \
mm-cell-info-nr5g.c \
mm-compat.h \
mm-compat.c \
$(NULL)
libmm_glib_la_CPPFLAGS = \
$(LIBMM_GLIB_CFLAGS) \
-I$(srcdir) \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
-DLIBMM_GLIB_COMPILATION \
$(NULL)
libmm_glib_gla_CFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
libmm_glib_la_LIBADD = \
${top_builddir}/libmm-glib/generated/libmm-generated.la \
$(NULL)
libmm_glib_la_LDFLAGS = \
-version-info $(MM_GLIB_LT_CURRENT):$(MM_GLIB_LT_REVISION):$(MM_GLIB_LT_AGE) \
$(WARN_LDFLAGS) \
$(LIBMM_GLIB_LIBS) \
$(NULL)
includedir = @includedir@/libmm-glib
include_HEADERS = \
libmm-glib.h \
mm-helper-types.h \
mm-manager.h \
mm-object.h \
mm-modem.h \
mm-modem-3gpp.h \
mm-modem-3gpp-profile-manager.h \
mm-modem-3gpp-ussd.h \
mm-modem-cdma.h \
mm-modem-messaging.h \
mm-modem-location.h \
mm-modem-time.h \
mm-modem-firmware.h \
mm-modem-sar.h \
mm-modem-signal.h \
mm-modem-oma.h \
mm-modem-simple.h \
mm-sim.h \
mm-sms.h \
mm-modem-voice.h \
mm-call.h \
mm-bearer.h \
mm-simple-status.h \
mm-simple-connect-properties.h \
mm-bearer-properties.h \
mm-sms-properties.h \
mm-call-properties.h \
mm-bearer-ip-config.h \
mm-bearer-stats.h \
mm-location-common.h \
mm-location-3gpp.h \
mm-location-gps-nmea.h \
mm-location-gps-raw.h \
mm-location-cdma-bs.h \
mm-unlock-retries.h \
mm-network-timezone.h \
mm-firmware-properties.h \
mm-firmware-update-settings.h \
mm-cdma-manual-activation-properties.h \
mm-signal.h \
mm-kernel-event-properties.h \
mm-pco.h \
mm-call-audio-format.h \
mm-sim-preferred-network.h \
mm-3gpp-profile.h \
mm-signal-threshold-properties.h \
mm-nr5g-registration-settings.h \
mm-cell-info.h \
mm-cell-info-cdma.h \
mm-cell-info-gsm.h \
mm-cell-info-umts.h \
mm-cell-info-tdscdma.h \
mm-cell-info-lte.h \
mm-cell-info-nr5g.h \
mm-compat.h \
$(NULL)
CLEANFILES =
# Introspection
if HAVE_INTROSPECTION
GENERATED_H = \
mm-enums-types.h \
mm-errors-types.h \
mm-gdbus-manager.h \
mm-gdbus-sim.h \
mm-gdbus-sms.h \
mm-gdbus-call.h \
mm-gdbus-bearer.h \
mm-gdbus-modem.h \
$(NULL)
GENERATED_C = \
mm-enums-types.c \
mm-errors-types.c \
mm-errors-quarks.c \
mm-gdbus-manager.c \
mm-gdbus-sim.c \
mm-gdbus-sms.c \
mm-gdbus-call.c \
mm-gdbus-bearer.c \
mm-gdbus-modem.c \
$(NULL)
PUBLIC_H = \
ModemManager-names.h \
ModemManager-version.h
ModemManager-enums.h \
ModemManager-errors.h \
ModemManager-compat.h \
ModemManager.h \
$(NULL)
INTROSPECTION_GIRS = ModemManager-1.0.gir
INTROSPECTION_SCANNER_ARGS = --warn-all
INTROSPECTION_COMPILER_ARGS =
ModemManager-1.0.gir: libmm-glib.la
ModemManager_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
ModemManager_1_0_gir_CFLAGS = $(libmm_glib_la_CPPFLAGS)
ModemManager_1_0_gir_LIBS = libmm-glib.la
ModemManager_1_0_gir_EXPORT_PACKAGES = libmm-glib
ModemManager_1_0_gir_SCANNERFLAGS = \
$(WARN_SCANNERFLAGS) \
--c-include "libmm-glib.h" \
--identifier-prefix=MM \
--identifier-prefix=Mm \
--symbol-prefix=mm \
$(NULL)
ModemManager_1_0_gir_FILES = \
$(include_HEADERS) \
$(filter-out %.h,$(libmm_glib_la_SOURCES)) \
$(filter %.c,$(libmm_glib_la_SOURCES)) \
$(addprefix generated/,$(GENERATED_H)) \
$(addprefix generated/,$(GENERATED_C)) \
$(addprefix ../include/,$(PUBLIC_H)) \
$(NULL)
girdir = $(datadir)/gir-1.0
nodist_gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
endif # HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)

View File

@@ -1,266 +0,0 @@
SUBDIRS = . tests
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
noinst_LTLIBRARIES = libmm-generated.la
GENERATED_H = \
mm-enums-types.h \
mm-errors-types.h \
mm-gdbus-manager.h \
mm-gdbus-sim.h \
mm-gdbus-sms.h \
mm-gdbus-call.h \
mm-gdbus-bearer.h \
mm-gdbus-modem.h \
$(NULL)
GENERATED_C = \
mm-enums-types.c \
mm-errors-types.c \
mm-errors-quarks.c \
mm-gdbus-manager.c \
mm-gdbus-sim.c \
mm-gdbus-sms.c \
mm-gdbus-call.c \
mm-gdbus-bearer.c \
mm-gdbus-modem.c \
$(NULL)
GENERATED_DOC = \
mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Call.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Voice.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Time.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Oma.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Sar.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Signal.xml \
$(NULL)
BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_DOC)
# Enum types
mm-enums-types.h: Makefile.am $(top_srcdir)/include/ModemManager-enums.h $(top_srcdir)/build-aux/mm-enums-types.h.template
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include <ModemManager.h>\n#ifndef __MM_ENUMS_TYPES_H__\n#define __MM_ENUMS_TYPES_H__\n" \
--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
--ftail "#endif /* __MM_ENUMS_TYPES_H__ */\n" \
$(top_srcdir)/include/ModemManager-enums.h > $@
mm-enums-types.c: Makefile.am $(top_srcdir)/include/ModemManager-enums.h $(top_srcdir)/build-aux/mm-enums-types.c.template mm-enums-types.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"mm-enums-types.h\"\n" \
--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
$(top_srcdir)/include/ModemManager-enums.h > $@
# Error types & quarks
mm-errors-types.h: Makefile.am $(top_srcdir)/include/ModemManager-errors.h $(top_srcdir)/build-aux/mm-errors-types.h.template
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#ifndef __MM_ERRORS_TYPES_H__\n#define __MM_ERRORS_TYPES_H__\n" \
--template $(top_srcdir)/build-aux/mm-errors-types.h.template \
--ftail "#endif /* __MM_ERRORS_TYPES_H__ */\n" \
$(top_srcdir)/include/ModemManager-errors.h > $@
mm-errors-types.c: Makefile.am $(top_srcdir)/include/ModemManager-errors.h $(top_srcdir)/build-aux/mm-errors-types.c.template mm-errors-types.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include <ModemManager.h>\n#include \"mm-errors-types.h\"\n" \
--template $(top_srcdir)/build-aux/mm-errors-types.c.template \
$(top_srcdir)/include/ModemManager-errors.h > $@
mm-errors-quarks.c: Makefile.am $(top_srcdir)/include/ModemManager-errors.h $(top_srcdir)/build-aux/mm-errors-quarks.c.template $(top_builddir)/include/ModemManager-names.h mm-errors-types.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include <ModemManager.h>\n#include \"mm-errors-types.h\"\n" \
--template $(top_srcdir)/build-aux/mm-errors-quarks.c.template \
$(top_srcdir)/include/ModemManager-errors.h > $@
# Manager interface
mm_gdbus_manager_generated = \
mm-gdbus-manager.h \
mm-gdbus-manager.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
$(NULL)
mm_gdbus_manager_deps = \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.xml \
$(NULL)
mm-gdbus-manager.c: $(mm_gdbus_manager_deps)
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-manager \
$< \
$(NULL)
$(filter-out mm-gdbus-manager.c, $(mm_gdbus_manager_generated)): $(mm_gdbus_manager_deps) mm-gdbus-manager.c
@: # nothing to do, generated as a side-effect of the .c
# Modem interfaces
mm_gdbus_modem_generated = \
mm-gdbus-modem.h \
mm-gdbus-modem.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Voice.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Time.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Oma.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Sar.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml \
mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Signal.xml \
$(NULL)
mm_gdbus_modem_deps = \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Messaging.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Voice.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Location.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Time.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Firmware.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Oma.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Sar.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml \
$(NULL)
mm-gdbus-modem.c: $(mm_gdbus_modem_deps)
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-modem \
--c-generate-object-manager \
--annotate "org.freedesktop.ModemManager1.Modem.ModemCdma" org.gtk.GDBus.C.Name ModemCdma \
--annotate "org.freedesktop.ModemManager1.Modem.Modem3gpp" org.gtk.GDBus.C.Name Modem3gpp \
--annotate "org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd" org.gtk.GDBus.C.Name Modem3gppUssd \
--annotate "org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager" org.gtk.GDBus.C.Name Modem3gppProfileManager \
$^ \
$(NULL)
$(filter-out mm-gdbus-modem.c, $(mm_gdbus_modem_generated)): $(mm_gdbus_modem_deps) mm-gdbus-modem.c
@: # nothing to do, generated as a side-effect of the .c
# SIM interface
mm_gdbus_sim_generated = \
mm-gdbus-sim.h \
mm-gdbus-sim.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
$(NULL)
mm_gdbus_sim_deps = \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Sim.xml \
$(NULL)
mm-gdbus-sim.c: $(mm_gdbus_sim_deps)
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-sim \
$< \
$(NULL)
$(filter-out mm-gdbus-sim.c, $(mm_gdbus_sim_generated)): $(mm_gdbus_sim_deps) mm-gdbus-sim.c
@: # nothing to do, generated as a side-effect of the .c
# Bearer interface
mm_gdbus_bearer_generated = \
mm-gdbus-bearer.h \
mm-gdbus-bearer.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
$(NULL)
mm_gdbus_bearer_deps = \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Bearer.xml \
$(NULL)
mm-gdbus-bearer.c: $(mm_gdbus_bearer_deps)
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-bearer \
$< \
$(NULL)
$(filter-out mm-gdbus-bearer.c, $(mm_gdbus_bearer_generated)): $(mm_gdbus_bearer_deps) mm-gdbus-bearer.c
@: # nothing to do, generated as a side-effect of the .c
# SMS interface
mm_gdbus_sms_generated = \
mm-gdbus-sms.h \
mm-gdbus-sms.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
$(NULL)
mm_gdbus_sms_deps = \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Sms.xml \
$(NULL)
mm-gdbus-sms.c: $(mm_gdbus_sms_deps)
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-sms \
--annotate "org.freedesktop.ModemManager1.Sms:Data" org.gtk.GDBus.C.ForceGVariant True \
$< \
$(NULL)
$(filter-out mm-gdbus-sms.c, $(mm_gdbus_sms_generated)): $(mm_gdbus_sms_deps) mm-gdbus-sms.c
@: # nothing to do, generated as a side-effect of the .c
# Call interface
mm_gdbus_call_generated = \
mm-gdbus-call.h \
mm-gdbus-call.c \
mm-gdbus-doc-org.freedesktop.ModemManager1.Call.xml \
$(NULL)
mm_gdbus_call_deps = \
$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Call.xml \
$(NULL)
mm-gdbus-call.c: $(mm_gdbus_call_deps)
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-docbook mm-gdbus-doc \
--generate-c-code mm-gdbus-call \
$< \
$(NULL)
$(filter-out mm-gdbus-call.c, $(mm_gdbus_call_generated)): $(mm_gdbus_call_deps) mm-gdbus-call.c
@: # nothing to do, generated as a side-effect of the .c
nodist_libmm_generated_la_SOURCES = $(GENERATED_H) $(GENERATED_C)
libmm_generated_la_CPPFLAGS = \
$(LIBMM_GLIB_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-Wno-unused-function \
-Wno-float-equal \
-Wno-shadow \
$(NULL)
libmm_generated_la_CFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
libmm_generated_la_LDFLAGS = \
$(WARN_LDFLAGS) \
$(LIBMM_GLIB_LIBS) \
$(NULL)
includedir = @includedir@/libmm-glib
nodist_include_HEADERS = $(GENERATED_H)
CLEANFILES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_DOC)

View File

@@ -1,39 +0,0 @@
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
noinst_LTLIBRARIES = libmm-test-generated.la
GENERATED_H = mm-gdbus-test.h
GENERATED_C = mm-gdbus-test.c
BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C)
# Test interface
mm_gdbus_test_generated = \
mm-gdbus-test.h \
mm-gdbus-test.c
$(mm_gdbus_test_generated): $(top_srcdir)/introspection/tests/org.freedesktop.ModemManager1.Test.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.ModemManager1. \
--c-namespace=MmGdbus \
--generate-c-code mm-gdbus-test \
$< \
$(NULL)
nodist_libmm_test_generated_la_SOURCES = \
$(GENERATED_H) \
$(GENERATED_C)
libmm_test_generated_la_CPPFLAGS = \
$(LIBMM_GLIB_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-Wno-unused-function \
-Wno-float-equal \
-Wno-shadow
libmm_test_generated_la_LIBADD = \
$(LIBMM_GLIB_LIBS)
CLEANFILES = $(GENERATED_H) $(GENERATED_C)

View File

@@ -1,32 +0,0 @@
include $(top_srcdir)/gtester.make
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
LIBMM_GLIB_TESTS_COMMON_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I$(top_builddir)/libmm-glib \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
-DLIBMM_GLIB_COMPILATION
LIBMM_GLIB_TESTS_COMMON_LDADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(MM_LIBS)
noinst_PROGRAMS = \
test-common-helpers \
test-pco
TEST_PROGS += $(noinst_PROGRAMS)
test_common_helpers_SOURCES = test-common-helpers.c
test_common_helpers_CPPFLAGS = $(LIBMM_GLIB_TESTS_COMMON_CPPFLAGS)
test_common_helpers_LDADD = $(LIBMM_GLIB_TESTS_COMMON_LDADD)
test_pco_SOURCES = test-pco.c
test_pco_CPPFLAGS = $(LIBMM_GLIB_TESTS_COMMON_CPPFLAGS)
test_pco_LDADD = $(LIBMM_GLIB_TESTS_COMMON_LDADD)

View File

View File

View File

@@ -1,2 +0,0 @@
SUBDIRS=src tests

View File

View File

View File

@@ -1,22 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# NOTE
# This autogen.sh is only used when building libqcdm separately from ModemManager
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.7
PKG_NAME=libqcdm
(test -f $srcdir/configure.ac \
&& test -f $srcdir/src/com.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
(cd $srcdir;
autoreconf --install --symlink &&
autoreconf &&
./configure --enable-maintainer-mode $@
)

View File

@@ -1,48 +0,0 @@
# NOTE
# This configure.ac is only used when building libqcdm separately from
# ModemManager.
#
AC_PREREQ(2.52)
AC_INIT(libqcdm, 0.1, dcbw@redhat.com, libqcdm)
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
dnl Define _GNU_SOURCE for various things like strcasestr()
AC_GNU_SOURCE
dnl Required programs
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
dnl
dnl Tests
dnl
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build libqcdm tests]))
AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
case $with_tests in
yes)
PKG_CHECK_MODULES(MM, glib-2.0 >= 2.18)
AC_SUBST(MM_CFLAGS)
AC_SUBST(MM_LIBS)
;;
*) ;;
esac
AM_CONDITIONAL(QCDM_STANDALONE, test "yes" = "yes")
AC_CONFIG_FILES([
Makefile
src/Makefile
tests/Makefile
])
AC_OUTPUT

View File

@@ -1,51 +0,0 @@
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(CODE_COVERAGE_LDFLAGS) \
$(NULL)
noinst_LTLIBRARIES = libqcdm.la libqcdm-test.la
libqcdm_la_CPPFLAGS = \
$(MM_CFLAGS)
libqcdm_la_SOURCES = \
dm-commands.h \
nv-items.h \
log-items.h \
com.c \
com.h \
commands.c \
commands.h \
errors.c \
errors.h \
logs.c \
logs.h \
result.c \
result.h \
result-private.h \
utils.c \
utils.h
libqcdm_la_LIBADD = \
$(MM_LIBS)
###########################################
# Test library without symbol versioning
###########################################
libqcdm_test_la_CPPFLAGS = \
$(MM_CFLAGS)
libqcdm_test_la_SOURCES = \
utils.c \
utils.h
libqcdm_test_la_LIBADD = \
$(MM_LIBS)

View File

@@ -1,65 +0,0 @@
include $(top_srcdir)/gtester.make
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(CODE_COVERAGE_LDFLAGS) \
$(NULL)
noinst_PROGRAMS = test-qcdm modepref ipv6pref reset
TEST_PROGS += test-qcdm
test_qcdm_SOURCES = \
test-qcdm-crc.c \
test-qcdm-crc.h \
test-qcdm-escaping.c \
test-qcdm-escaping.h \
test-qcdm-utils.c \
test-qcdm-utils.h \
test-qcdm-com.c \
test-qcdm-com.h \
test-qcdm-result.c \
test-qcdm-result.h \
test-qcdm.c
test_qcdm_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir)/libqcdm/src \
-I$(top_srcdir)/src
test_qcdm_LDADD = $(MM_LIBS)
modepref_SOURCES = modepref.c
modepref_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir)/libqcdm/src \
-I$(top_srcdir)/src
modepref_LDADD = $(MM_LIBS)
ipv6pref_SOURCES = ipv6pref.c
ipv6pref_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir)/libqcdm/src \
-I$(top_srcdir)/src
ipv6pref_LDADD = $(MM_LIBS)
reset_SOURCES = reset.c
reset_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir)/libqcdm/src \
-I$(top_srcdir)/src
reset_LDADD = $(MM_LIBS)
if QCDM_STANDALONE
test_qcdm_LDADD += $(top_builddir)/src/libqcdm.la
modepref_LDADD += $(top_builddir)/src/libqcdm.la
ipv6pref_LDADD += $(top_builddir)/src/libqcdm.la
reset_LDADD += $(top_builddir)/src/libqcdm.la
else
test_qcdm_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
modepref_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
ipv6pref_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
reset_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
endif

View File

@@ -1,46 +0,0 @@
# ============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
# ============================================================================
#
# SYNOPSIS
#
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
# flag. If it does, the flag is added FLAGS-VARIABLE
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. During the check the flag is always added to the
# current language's flags.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: This macro depends on the AX_APPEND_FLAG and
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
# AX_APPEND_LINK_FLAGS.
#
# LICENSE
#
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
done
])dnl AX_APPEND_COMPILE_FLAGS

View File

@@ -1,50 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
#
# DESCRIPTION
#
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
# added in between.
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
# FLAG.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AC_DEFUN([AX_APPEND_FLAG],
[dnl
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
AS_VAR_SET_IF(FLAGS,[
AS_CASE([" AS_VAR_GET(FLAGS) "],
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
[
AS_VAR_APPEND(FLAGS,[" $1"])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
],
[
AS_VAR_SET(FLAGS,[$1])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG

View File

@@ -1,44 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# For every FLAG1, FLAG2 it is checked whether the linker works with the
# flag. If it does, the flag is added FLAGS-VARIABLE
#
# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
# used. During the check the flag is always added to the linker's flags.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
#
# LICENSE
#
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
done
])dnl AX_APPEND_LINK_FLAGS

View File

@@ -1,53 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS

View File

@@ -1,53 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the linker or gives an error.
# (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_LINK_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS

View File

@@ -1,229 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CODE_COVERAGE()
#
# DESCRIPTION
#
# Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
# included in the CFLAGS and LIBS/LDFLAGS variables of every build target
# (program or library) which should be built with code coverage support.
# Also defines CODE_COVERAGE_RULES which should be substituted in your
# Makefile; and $enable_code_coverage which can be used in subsequent
# configure output. CODE_COVERAGE_ENABLED is defined and substituted, and
# corresponds to the value of the --enable-code-coverage option, which
# defaults to being disabled.
#
# Test also for gcov program and create GCOV variable that could be
# substituted.
#
# Note that all optimisation flags in CFLAGS must be disabled when code
# coverage is enabled.
#
# Usage example:
#
# configure.ac:
#
# AX_CODE_COVERAGE
#
# Makefile.am:
#
# @CODE_COVERAGE_RULES@
# my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ...
# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ...
#
# This results in a "check-code-coverage" rule being added to any
# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module
# has been configured with --enable-code-coverage). Running `make
# check-code-coverage` in that directory will run the module's test suite
# (`make check`) and build a code coverage report detailing the code which
# was touched, then print the URI for the report.
#
# This code was derived from Makefile.decl in GLib, originally licenced
# under LGPLv2.1+.
#
# LICENSE
#
# Copyright (c) 2012 Philip Withnall
# Copyright (c) 2012 Xan Lopez
# Copyright (c) 2012 Christian Persch
# Copyright (c) 2012 Paolo Borelli
# Copyright (c) 2012 Dan Winship
# Copyright (c) 2015 Bastien ROUCARIES
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#serial 5
AC_DEFUN([AX_CODE_COVERAGE],[
dnl Check for --enable-code-coverage
AC_REQUIRE([AC_PROG_SED])
# allow to override gcov location
AC_ARG_WITH([gcov],
[AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
[_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
[_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
AC_MSG_CHECKING([whether to build with code coverage support])
AC_ARG_ENABLE([code-coverage],
AS_HELP_STRING([--enable-code-coverage],
[Whether to enable code coverage support]),,
enable_code_coverage=no)
AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
AC_MSG_RESULT($enable_code_coverage)
AS_IF([ test "$enable_code_coverage" = "yes" ], [
# check for gcov
AC_CHECK_TOOL([GCOV],
[$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
[:])
AS_IF([test "X$GCOV" = "X:"],
[AC_MSG_ERROR([gcov is needed to do coverage])])
AC_SUBST([GCOV])
dnl Check if gcc is being used
AS_IF([ test "$GCC" = "no" ], [
AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
])
# List of supported lcov versions.
lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
AC_CHECK_PROG([LCOV], [lcov], [lcov])
AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
AS_IF([ test "$LCOV" ], [
AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [
ax_cv_lcov_version=invalid
lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
for lcov_check_version in $lcov_version_list; do
if test "$lcov_version" = "$lcov_check_version"; then
ax_cv_lcov_version="$lcov_check_version (ok)"
fi
done
])
], [
lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
AC_MSG_ERROR([$lcov_msg])
])
case $ax_cv_lcov_version in
""|invalid[)]
lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
AC_MSG_ERROR([$lcov_msg])
LCOV="exit 0;"
;;
esac
AS_IF([ test -z "$GENHTML" ], [
AC_MSG_ERROR([Could not find genhtml from the lcov package])
])
dnl Build the code coverage flags
CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
CODE_COVERAGE_LDFLAGS="-lgcov"
AC_SUBST([CODE_COVERAGE_CFLAGS])
AC_SUBST([CODE_COVERAGE_LDFLAGS])
])
CODE_COVERAGE_RULES='
# Code coverage
#
# Optional:
# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
# (Default: $(top_builddir))
# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
# by lcov for code coverage. (Default:
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
# reports to be created. (Default:
# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance.
# (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
# (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
# instance. (Default: empty)
# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
#
# The generated report will be titled using the $(PACKAGE_NAME) and
# $(PACKAGE_VERSION). In order to add the current git hash to the title,
# use the git-version-gen script, available online.
# Optional variables
CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
CODE_COVERAGE_GENHTML_OPTIONS ?=
CODE_COVERAGE_IGNORE_PATTERN ?=
code_coverage_quiet = $(code_coverage_quiet_$(V))
code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
code_coverage_quiet_0 = --quiet
# Use recursive makes in order to ignore errors during check
check-code-coverage:
ifeq ($(CODE_COVERAGE_ENABLED),yes)
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
else
@echo "Need to reconfigure with --enable-code-coverage"
endif
# Capture code coverage data
code-coverage-capture: code-coverage-capture-hook
ifeq ($(CODE_COVERAGE_ENABLED),yes)
$(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
$(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
-@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
else
@echo "Need to reconfigure with --enable-code-coverage"
endif
# Hook rule executed before code-coverage-capture, overridable by the user
code-coverage-capture-hook:
ifeq ($(CODE_COVERAGE_ENABLED),yes)
clean: code-coverage-clean
code-coverage-clean:
-$(LCOV) --directory $(top_builddir) -z
-rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
-find . -name "*.gcda" -o -name "*.gcov" -delete
endif
GITIGNOREFILES ?=
GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
DISTCHECK_CONFIGURE_FLAGS ?=
DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
'
AC_SUBST([CODE_COVERAGE_RULES])
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
])

View File

@@ -1,158 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_COMPILER_FLAGS([CFLAGS-VARIABLE], [LDFLAGS-VARIABLE], [IS-RELEASE], [EXTRA-BASE-CFLAGS], [EXTRA-YES-CFLAGS], [UNUSED], [UNUSED], [UNUSED], [EXTRA-BASE-LDFLAGS], [EXTRA-YES-LDFLAGS], [UNUSED], [UNUSED], [UNUSED])
#
# DESCRIPTION
#
# Check for the presence of an --enable-compile-warnings option to
# configure, defaulting to "error" in normal operation, or "yes" if
# IS-RELEASE is equal to "yes". Return the value in the variable
# $ax_enable_compile_warnings.
#
# Depending on the value of --enable-compile-warnings, different compiler
# warnings are checked to see if they work with the current compiler and,
# if so, are appended to CFLAGS-VARIABLE and LDFLAGS-VARIABLE. This
# allows a consistent set of baseline compiler warnings to be used across
# a code base, irrespective of any warnings enabled locally by individual
# developers. By standardising the warnings used by all developers of a
# project, the project can commit to a zero-warnings policy, using -Werror
# to prevent compilation if new warnings are introduced. This makes
# catching bugs which are flagged by warnings a lot easier.
#
# By providing a consistent --enable-compile-warnings argument across all
# projects using this macro, continuous integration systems can easily be
# configured the same for all projects. Automated systems or build
# systems aimed at beginners may want to pass the --disable-Werror
# argument to unconditionally prevent warnings being fatal.
#
# --enable-compile-warnings can take the values:
#
# * no: Base compiler warnings only; not even -Wall.
# * yes: The above, plus a broad range of useful warnings.
# * error: The above, plus -Werror so that all warnings are fatal.
# Use --disable-Werror to override this and disable fatal
# warnings.
#
# The set of base and enabled flags can be augmented using the
# EXTRA-*-CFLAGS and EXTRA-*-LDFLAGS variables, which are tested and
# appended to the output variable if --enable-compile-warnings is not
# "no". Flags should not be disabled using these arguments, as the entire
# point of AX_COMPILER_FLAGS is to enforce a consistent set of useful
# compiler warnings on code, using warnings which have been chosen for low
# false positive rates. If a compiler emits false positives for a
# warning, a #pragma should be used in the code to disable the warning
# locally. See:
#
# https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas
#
# The EXTRA-* variables should only be used to supply extra warning flags,
# and not general purpose compiler flags, as they are controlled by
# configure options such as --disable-Werror.
#
# IS-RELEASE can be used to disable -Werror when making a release, which
# is useful for those hairy moments when you just want to get the release
# done as quickly as possible. Set it to "yes" to disable -Werror. By
# default, it uses the value of $ax_is_release, so if you are using the
# AX_IS_RELEASE macro, there is no need to pass this parameter. For
# example:
#
# AX_IS_RELEASE([git-directory])
# AX_COMPILER_FLAGS()
#
# CFLAGS-VARIABLE defaults to WARN_CFLAGS, and LDFLAGS-VARIABLE defaults
# to WARN_LDFLAGS. Both variables are AC_SUBST-ed by this macro, but must
# be manually added to the CFLAGS and LDFLAGS variables for each target in
# the code base.
#
# If C++ language support is enabled with AC_PROG_CXX, which must occur
# before this macro in configure.ac, warning flags for the C++ compiler
# are AC_SUBST-ed as WARN_CXXFLAGS, and must be manually added to the
# CXXFLAGS variables for each target in the code base. EXTRA-*-CFLAGS can
# be used to augment the base and enabled flags.
#
# Warning flags for g-ir-scanner (from GObject Introspection) are
# AC_SUBST-ed as WARN_SCANNERFLAGS. This variable must be manually added
# to the SCANNERFLAGS variable for each GIR target in the code base. If
# extra g-ir-scanner flags need to be enabled, the AX_COMPILER_FLAGS_GIR
# macro must be invoked manually.
#
# AX_COMPILER_FLAGS may add support for other tools in future, in addition
# to the compiler and linker. No extra EXTRA-* variables will be added
# for those tools, and all extra support will still use the single
# --enable-compile-warnings configure option. For finer grained control
# over the flags for individual tools, use AX_COMPILER_FLAGS_CFLAGS,
# AX_COMPILER_FLAGS_LDFLAGS and AX_COMPILER_FLAGS_* for new tools.
#
# The UNUSED variables date from a previous version of this macro, and are
# automatically appended to the preceding non-UNUSED variable. They should
# be left empty in new uses of the macro.
#
# LICENSE
#
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
# Copyright (c) 2015 David King <amigadave@amigadave.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 14
# _AX_COMPILER_FLAGS_LANG([LANGNAME])
m4_defun([_AX_COMPILER_FLAGS_LANG],
[m4_ifdef([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [],
[m4_define([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [])dnl
AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_]$1[FLAGS])])dnl
])
AC_DEFUN([AX_COMPILER_FLAGS],[
# C support is enabled by default.
_AX_COMPILER_FLAGS_LANG([C])
# Only enable C++ support if AC_PROG_CXX is called. The redefinition of
# AC_PROG_CXX is so that a fatal error is emitted if this macro is called
# before AC_PROG_CXX, which would otherwise cause no C++ warnings to be
# checked.
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AX_COMPILER_FLAGS_LANG([CXX])],
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AX_COMPILER_FLAGS_LANG([CXX])])])
AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_LDFLAGS])
# Default value for IS-RELEASE is $ax_is_release
ax_compiler_flags_is_release=m4_tolower(m4_normalize(ifelse([$3],,
[$ax_is_release],
[$3])))
AC_ARG_ENABLE([compile-warnings],
AS_HELP_STRING([--enable-compile-warnings=@<:@no/yes/error@:>@],
[Enable compiler warnings and errors]),,
[AS_IF([test "$ax_compiler_flags_is_release" = "yes"],
[enable_compile_warnings="yes"],
[enable_compile_warnings="error"])])
AC_ARG_ENABLE([Werror],
AS_HELP_STRING([--disable-Werror],
[Unconditionally make all compiler warnings non-fatal]),,
[enable_Werror=maybe])
# Return the user's chosen warning level
AS_IF([test "$enable_Werror" = "no" -a \
"$enable_compile_warnings" = "error"],[
enable_compile_warnings="yes"
])
ax_enable_compile_warnings=$enable_compile_warnings
AX_COMPILER_FLAGS_CFLAGS([$1],[$ax_compiler_flags_is_release],
[$4],[$5 $6 $7 $8])
m4_ifdef([_AX_COMPILER_FLAGS_LANG_CXX_enabled],
[AX_COMPILER_FLAGS_CXXFLAGS([WARN_CXXFLAGS],
[$ax_compiler_flags_is_release],
[$4],[$5 $6 $7 $8])])
AX_COMPILER_FLAGS_LDFLAGS([$2],[$ax_compiler_flags_is_release],
[$9],[$10 $11 $12 $13])
AX_COMPILER_FLAGS_GIR([WARN_SCANNERFLAGS],[$ax_compiler_flags_is_release])
])dnl AX_COMPILER_FLAGS

View File

@@ -1,161 +0,0 @@
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html
# =============================================================================
#
# SYNOPSIS
#
# AX_COMPILER_FLAGS_CFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
#
# DESCRIPTION
#
# Add warning flags for the C compiler to VARIABLE, which defaults to
# WARN_CFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be
# manually added to the CFLAGS variable for each target in the code base.
#
# This macro depends on the environment set up by AX_COMPILER_FLAGS.
# Specifically, it uses the value of $ax_enable_compile_warnings to decide
# which flags to enable.
#
# LICENSE
#
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
# Copyright (c) 2017, 2018 Reini Urban <rurban@cpan.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 17
AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
AC_REQUIRE([AC_PROG_SED])
AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
# Variable names
m4_define([ax_warn_cflags_variable],
[m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))])
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
[#ifndef __cplusplus
#error "no C++"
#endif]])],
[ax_compiler_cxx=yes;],
[ax_compiler_cxx=no;])
# Always pass -Werror=unknown-warning-option to get Clang to fail on bad
# flags, otherwise they are always appended to the warn_cflags variable, and
# Clang warns on them for every compilation unit.
# If this is passed to GCC, it will explode, so the flag must be enabled
# conditionally.
AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
ax_compiler_flags_test="-Werror=unknown-warning-option"
],[
ax_compiler_flags_test=""
])
# Check that -Wno-suggest-attribute=format is supported
AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[
ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
],[
ax_compiler_no_suggest_attribute_flags=""
])
# Base flags
AX_APPEND_COMPILE_FLAGS([ dnl
-fno-strict-aliasing dnl
$3 dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
AS_IF([test "$ax_enable_compile_warnings" != "no"],[
if test "$ax_compiler_cxx" = "no" ; then
# C-only flags. Warn in C++
AX_APPEND_COMPILE_FLAGS([ dnl
-Wnested-externs dnl
-Wmissing-prototypes dnl
-Wstrict-prototypes dnl
-Wdeclaration-after-statement dnl
-Wimplicit-function-declaration dnl
-Wold-style-definition dnl
-Wjump-misses-init dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
fi
# "yes" flags
AX_APPEND_COMPILE_FLAGS([ dnl
-Wall dnl
-Wextra dnl
-Wundef dnl
-Wwrite-strings dnl
-Wpointer-arith dnl
-Wmissing-declarations dnl
-Wredundant-decls dnl
-Wno-unused-parameter dnl
-Wno-missing-field-initializers dnl
-Wformat=2 dnl
-Wcast-align dnl
-Wformat-nonliteral dnl
-Wformat-security dnl
-Wsign-compare dnl
-Wstrict-aliasing dnl
-Wshadow dnl
-Winline dnl
-Wpacked dnl
-Wmissing-format-attribute dnl
-Wmissing-noreturn dnl
-Winit-self dnl
-Wredundant-decls dnl
-Wmissing-include-dirs dnl
-Wunused-but-set-variable dnl
-Warray-bounds dnl
-Wreturn-type dnl
-Wswitch-enum dnl
-Wswitch-default dnl
-Wduplicated-cond dnl
-Wduplicated-branches dnl
-Wlogical-op dnl
-Wrestrict dnl
-Wnull-dereference dnl
-Wdouble-promotion dnl
$4 dnl
$5 dnl
$6 dnl
$7 dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
])
AS_IF([test "$ax_enable_compile_warnings" = "error"],[
# "error" flags; -Werror has to be appended unconditionally because
# it's not possible to test for
#
# suggest-attribute=format is disabled because it gives too many false
# positives
AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable)
AX_APPEND_COMPILE_FLAGS([ dnl
[$ax_compiler_no_suggest_attribute_flags] dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
])
# In the flags below, when disabling specific flags, always add *both*
# -Wno-foo and -Wno-error=foo. This fixes the situation where (for example)
# we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall,
# which effectively turns that flag back on again as an error.
for flag in $ax_warn_cflags_variable; do
AS_CASE([$flag],
[-Wno-*=*],[],
[-Wno-*],[
AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')],
ax_warn_cflags_variable,
[$ax_compiler_flags_test])
])
done
AC_LANG_POP([C])
# Substitute the variables
AC_SUBST(ax_warn_cflags_variable)
])dnl AX_COMPILER_FLAGS

View File

@@ -1,60 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
#
# DESCRIPTION
#
# Add warning flags for the g-ir-scanner (from GObject Introspection) to
# VARIABLE, which defaults to WARN_SCANNERFLAGS. VARIABLE is AC_SUBST-ed
# by this macro, but must be manually added to the SCANNERFLAGS variable
# for each GIR target in the code base.
#
# This macro depends on the environment set up by AX_COMPILER_FLAGS.
# Specifically, it uses the value of $ax_enable_compile_warnings to decide
# which flags to enable.
#
# LICENSE
#
# Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AC_DEFUN([AX_COMPILER_FLAGS_GIR],[
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
# Variable names
m4_define([ax_warn_scannerflags_variable],
[m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))])
# Base flags
AX_APPEND_FLAG([$3],ax_warn_scannerflags_variable)
AS_IF([test "$ax_enable_compile_warnings" != "no"],[
# "yes" flags
AX_APPEND_FLAG([ dnl
--warn-all dnl
$4 dnl
$5 dnl
$6 dnl
$7 dnl
],ax_warn_scannerflags_variable)
])
AS_IF([test "$ax_enable_compile_warnings" = "error"],[
# "error" flags
AX_APPEND_FLAG([ dnl
--warn-error dnl
],ax_warn_scannerflags_variable)
])
# Substitute the variables
AC_SUBST(ax_warn_scannerflags_variable)
])dnl AX_COMPILER_FLAGS

View File

@@ -1,111 +0,0 @@
# ==============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html
# ==============================================================================
#
# SYNOPSIS
#
# AX_COMPILER_FLAGS_LDFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
#
# DESCRIPTION
#
# Add warning flags for the linker to VARIABLE, which defaults to
# WARN_LDFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be
# manually added to the LDFLAGS variable for each target in the code base.
#
# This macro depends on the environment set up by AX_COMPILER_FLAGS.
# Specifically, it uses the value of $ax_enable_compile_warnings to decide
# which flags to enable.
#
# LICENSE
#
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
# Copyright (c) 2017, 2018 Reini Urban <rurban@cpan.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 9
AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
# Variable names
m4_define([ax_warn_ldflags_variable],
[m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))])
# Always pass -Werror=unknown-warning-option to get Clang to fail on bad
# flags, otherwise they are always appended to the warn_ldflags variable,
# and Clang warns on them for every compilation unit.
# If this is passed to GCC, it will explode, so the flag must be enabled
# conditionally.
AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
ax_compiler_flags_test="-Werror=unknown-warning-option"
],[
ax_compiler_flags_test=""
])
AX_CHECK_LINK_FLAG([-Wl,--as-needed], [
AX_APPEND_LINK_FLAGS([-Wl,--as-needed],
[AM_LDFLAGS],[$ax_compiler_flags_test])
])
AX_CHECK_LINK_FLAG([-Wl,-z,relro], [
AX_APPEND_LINK_FLAGS([-Wl,-z,relro],
[AM_LDFLAGS],[$ax_compiler_flags_test])
])
AX_CHECK_LINK_FLAG([-Wl,-z,now], [
AX_APPEND_LINK_FLAGS([-Wl,-z,now],
[AM_LDFLAGS],[$ax_compiler_flags_test])
])
AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [
AX_APPEND_LINK_FLAGS([-Wl,-z,noexecstack],
[AM_LDFLAGS],[$ax_compiler_flags_test])
])
# textonly, retpolineplt not yet
# macOS and cygwin linker do not have --as-needed
AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [
ax_compiler_flags_as_needed_option="-Wl,--no-as-needed"
], [
ax_compiler_flags_as_needed_option=""
])
# macOS linker speaks with a different accent
ax_compiler_flags_fatal_warnings_option=""
AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [
ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings"
])
AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [
ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings"
])
# Base flags
AX_APPEND_LINK_FLAGS([ dnl
$ax_compiler_flags_as_needed_option dnl
$3 dnl
],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
AS_IF([test "$ax_enable_compile_warnings" != "no"],[
# "yes" flags
AX_APPEND_LINK_FLAGS([$4 $5 $6 $7],
ax_warn_ldflags_variable,
[$ax_compiler_flags_test])
])
AS_IF([test "$ax_enable_compile_warnings" = "error"],[
# "error" flags; -Werror has to be appended unconditionally because
# it's not possible to test for
#
# suggest-attribute=format is disabled because it gives too many false
# positives
AX_APPEND_LINK_FLAGS([ dnl
$ax_compiler_flags_fatal_warnings_option dnl
],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
])
# Substitute the variables
AC_SUBST(ax_warn_ldflags_variable)
])dnl AX_COMPILER_FLAGS

View File

@@ -1,80 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_is_release.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_IS_RELEASE(POLICY)
#
# DESCRIPTION
#
# Determine whether the code is being configured as a release, or from
# git. Set the ax_is_release variable to 'yes' or 'no'.
#
# If building a release version, it is recommended that the configure
# script disable compiler errors and debug features, by conditionalising
# them on the ax_is_release variable. If building from git, these
# features should be enabled.
#
# The POLICY parameter specifies how ax_is_release is determined. It can
# take the following values:
#
# * git-directory: ax_is_release will be 'no' if a '.git' directory exists
# * minor-version: ax_is_release will be 'no' if the minor version number
# in $PACKAGE_VERSION is odd; this assumes
# $PACKAGE_VERSION follows the 'major.minor.micro' scheme
# * micro-version: ax_is_release will be 'no' if the micro version number
# in $PACKAGE_VERSION is odd; this assumes
# $PACKAGE_VERSION follows the 'major.minor.micro' scheme
# * dash-version: ax_is_release will be 'no' if there is a dash '-'
# in $PACKAGE_VERSION, for example 1.2-pre3, 1.2.42-a8b9
# or 2.0-dirty (in particular this is suitable for use
# with git-version-gen)
# * always: ax_is_release will always be 'yes'
# * never: ax_is_release will always be 'no'
#
# Other policies may be added in future.
#
# LICENSE
#
# Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
# Copyright (c) 2016 Collabora Ltd.
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
#serial 7
AC_DEFUN([AX_IS_RELEASE],[
AC_BEFORE([AC_INIT],[$0])
m4_case([$1],
[git-directory],[
# $is_release = (.git directory does not exist)
AS_IF([test -d ${srcdir}/.git],[ax_is_release=no],[ax_is_release=yes])
],
[minor-version],[
# $is_release = ($minor_version is even)
minor_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
AS_IF([test "$(( $minor_version % 2 ))" -ne 0],
[ax_is_release=no],[ax_is_release=yes])
],
[micro-version],[
# $is_release = ($micro_version is even)
micro_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]]*\.[[^.]]*\.\([[^.]]*\).*/\1/'`
AS_IF([test "$(( $micro_version % 2 ))" -ne 0],
[ax_is_release=no],[ax_is_release=yes])
],
[dash-version],[
# $is_release = ($PACKAGE_VERSION has a dash)
AS_CASE([$PACKAGE_VERSION],
[*-*], [ax_is_release=no],
[*], [ax_is_release=yes])
],
[always],[ax_is_release=yes],
[never],[ax_is_release=no],
[
AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version, micro-version, dash-version, always, never.])
])
])

View File

@@ -1,37 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_REQUIRE_DEFINED(MACRO)
#
# DESCRIPTION
#
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
# been defined and thus are available for use. This avoids random issues
# where a macro isn't expanded. Instead the configure script emits a
# non-fatal:
#
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
#
# It's like AC_REQUIRE except it doesn't expand the required macro.
#
# Here's an example:
#
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
#
# LICENSE
#
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 2
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
])dnl AX_REQUIRE_DEFINED

View File

@@ -1,113 +0,0 @@
# -*- mode: autoconf -*-
#
# gtk-doc.m4 - configure macro to check for gtk-doc
# Copyright (C) 2003 James Henstridge
# 2007-2017 Stefan Sauer
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the above copyright owner gives unlimited
# permission to copy, distribute and modify the configure scripts that
# are the output of Autoconf when processing the Macro. You need not
# follow the terms of the GNU General Public License when using or
# distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
# serial 2
dnl Usage:
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
AC_DEFUN([GTK_DOC_CHECK],
[
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
AC_MSG_CHECKING([for gtk-doc])
PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
AC_MSG_RESULT($have_gtk_doc)
if test "$have_gtk_doc" = "no"; then
AC_MSG_WARN([
You will not be able to create source packages with 'make dist'
because $gtk_doc_requires is not found.])
fi
dnl check for tools we added during development
dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
dnl may not be writable by the user. Currently, automake requires that the
dnl test name must end in '.test'.
dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
dnl for overriding the documentation installation directory
AC_ARG_WITH([html-dir],
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
[with_html_dir='${datadir}/gtk-doc/html'])
HTML_DIR="$with_html_dir"
AC_SUBST([HTML_DIR])
dnl enable/disable documentation building
AC_ARG_ENABLE([gtk-doc],
AS_HELP_STRING([--enable-gtk-doc],
[use gtk-doc to build documentation [[default=no]]]),,
[enable_gtk_doc=no])
AC_MSG_CHECKING([whether to build gtk-doc documentation])
AC_MSG_RESULT($enable_gtk_doc)
if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
AC_MSG_ERROR([
You must have $gtk_doc_requires installed to build documentation for
$PACKAGE_NAME. Please install gtk-doc or disable building the
documentation by adding '--disable-gtk-doc' to '[$]0'.])
fi
dnl don't check for glib if we build glib
if test "x$PACKAGE_NAME" != "xglib"; then
dnl don't fail if someone does not have glib
PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
fi
dnl enable/disable output formats
AC_ARG_ENABLE([gtk-doc-html],
AS_HELP_STRING([--enable-gtk-doc-html],
[build documentation in html format [[default=yes]]]),,
[enable_gtk_doc_html=yes])
AC_ARG_ENABLE([gtk-doc-pdf],
AS_HELP_STRING([--enable-gtk-doc-pdf],
[build documentation in pdf format [[default=no]]]),,
[enable_gtk_doc_pdf=no])
if test -z "$GTKDOC_MKPDF"; then
enable_gtk_doc_pdf=no
fi
if test -z "$AM_DEFAULT_VERBOSITY"; then
AM_DEFAULT_VERBOSITY=1
fi
AC_SUBST([AM_DEFAULT_VERBOSITY])
AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
])

View File

@@ -1,142 +0,0 @@
dnl -*- mode: autoconf -*-
dnl Copyright 2009 Johan Dahlin
dnl
dnl This file is free software; the author(s) gives unlimited
dnl permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
# serial 1
dnl This is a copy of AS_AC_EXPAND
dnl
dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND],
[
EXP_VAR=[$1]
FROM_VAR=[$2]
dnl first expand prefix and exec_prefix if necessary
prefix_save=$prefix
exec_prefix_save=$exec_prefix
dnl if no prefix given, then use /usr/local, the default prefix
if test "x$prefix" = "xNONE"; then
prefix="$ac_default_prefix"
fi
dnl if no exec_prefix given, then use prefix
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$prefix
fi
full_var="$FROM_VAR"
dnl loop until it doesn't change anymore
while true; do
new_full_var="`eval echo $full_var`"
if test "x$new_full_var" = "x$full_var"; then break; fi
full_var=$new_full_var
done
dnl clean up
full_var=$new_full_var
AC_SUBST([$1], "$full_var")
dnl restore prefix and exec_prefix
prefix=$prefix_save
exec_prefix=$exec_prefix_save
])
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
[
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
dnl enable/disable introspection
m4_if([$2], [require],
[dnl
enable_introspection=yes
],[dnl
AC_ARG_ENABLE(introspection,
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
[Enable introspection for this build]),,
[enable_introspection=auto])
])dnl
AC_MSG_CHECKING([for gobject-introspection])
dnl presence/version checking
AS_CASE([$enable_introspection],
[no], [dnl
found_introspection="no (disabled, use --enable-introspection to enable)"
],dnl
[yes],[dnl
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
found_introspection=yes,
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
],dnl
[auto],[dnl
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
dnl Canonicalize enable_introspection
enable_introspection=$found_introspection
],dnl
[dnl
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
])dnl
AC_MSG_RESULT([$found_introspection])
dnl expand datadir/libdir so we can pass them to pkg-config
dnl and get paths relative to our target directories
_GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir")
_GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir")
INTROSPECTION_SCANNER=
INTROSPECTION_COMPILER=
INTROSPECTION_GENERATE=
INTROSPECTION_GIRDIR=
INTROSPECTION_TYPELIBDIR=
if test "x$found_introspection" = "xyes"; then
INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0`
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)"
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
fi
AC_SUBST(INTROSPECTION_SCANNER)
AC_SUBST(INTROSPECTION_COMPILER)
AC_SUBST(INTROSPECTION_GENERATE)
AC_SUBST(INTROSPECTION_GIRDIR)
AC_SUBST(INTROSPECTION_TYPELIBDIR)
AC_SUBST(INTROSPECTION_CFLAGS)
AC_SUBST(INTROSPECTION_LIBS)
AC_SUBST(INTROSPECTION_MAKEFILE)
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
])
dnl Usage:
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
[
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
])
dnl Usage:
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
[
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
])

View File

@@ -1,71 +0,0 @@
dnl -*- mode: autoconf -*-
dnl Copyright 2019 Aleksander Morgado
dnl
dnl This file is free software; the author(s) gives unlimited
dnl permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
# serial 1
dnl Usage:
dnl MM_ENABLE_ALL_PLUGINS
AC_DEFUN([MM_ENABLE_ALL_PLUGINS],
[dnl
AC_ARG_ENABLE(all-plugins,
AS_HELP_STRING([--enable-all-plugins],
[Build all plugins [[default=yes]]]),
[],
[enable_all_plugins=yes])
])
dnl Usage:
dnl MM_ENABLE_PLUGIN_FULL([NAME],[DEFAULT],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
AC_DEFUN([MM_ENABLE_PLUGIN_FULL],
[dnl
m4_pushdef([var_enable_plugin], patsubst([enable_plugin_$1], -, _))dnl
m4_pushdef([VAR_ENABLE_PLUGIN], patsubst(translit([enable_plugin_$1], [a-z], [A-Z]), -, _))dnl
AC_ARG_ENABLE(plugin-$1,
AS_HELP_STRING([--enable-plugin-$1], [Build $1 plugin]),
[],
[var_enable_plugin=$2])
if test "x$var_enable_plugin" = "xyes"; then
AC_DEFINE([VAR_ENABLE_PLUGIN], 1, [Define if $1 plugin is enabled])
m4_ifval([$3],[m4_foreach(with_shared,[$3],[dnl
with_shared="yes"
])])dnl
fi
AM_CONDITIONAL(VAR_ENABLE_PLUGIN, [test "x$var_enable_plugin" = "xyes"])
m4_popdef([VAR_ENABLE_PLUGIN])dnl
m4_popdef([var_enable_plugin])dnl
])
dnl Usage:
dnl MM_ENABLE_PLUGIN([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
AC_DEFUN([MM_ENABLE_PLUGIN],
[dnl
MM_ENABLE_PLUGIN_FULL([$1],[$enable_all_plugins],[$2])
])
dnl Usage:
dnl MM_ENABLE_PLUGIN_DISABLED([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
AC_DEFUN([MM_ENABLE_PLUGIN_DISABLED],
[dnl
MM_ENABLE_PLUGIN_FULL([$1],["no"],[$2])
])
dnl Usage:
dnl MM_BUILD_SHARED([NAME])
AC_DEFUN([MM_BUILD_SHARED],
[dnl
m4_pushdef([with_shared], patsubst([with_shared_$1], -, _))dnl
m4_pushdef([WITH_SHARED], patsubst(translit([with_shared_$1], [a-z], [A-Z]), -, _))dnl
AM_CONDITIONAL(WITH_SHARED, test "x$with_shared" = "xyes")
if test "x$with_shared" = "xyes"; then
AC_DEFINE([WITH_SHARED], 1, [Define if $1 utils are built])
else
with_shared="no"
fi
m4_popdef([WITH_SHARED])dnl
m4_popdef([with_shared])dnl
])

View File

@@ -1,101 +0,0 @@
dnl vapigen.m4
dnl
dnl Copyright 2012 Evan Nemerson
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT])
# --------------------------------------
# Check vapigen existence and version
#
# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
AC_DEFUN([VAPIGEN_CHECK],
[
AS_IF([test "x$3" != "xyes"], [
m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [
m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [
AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]])
])
])
])
AC_ARG_ENABLE([vala],
[AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
AS_IF([test "x$4" = "x"], [
enable_vala=auto
], [
enable_vala=$4
])
])
AS_CASE([$enable_vala], [no], [enable_vala=no],
[yes], [
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
AC_MSG_ERROR([Vala bindings require GObject Introspection])
])
], [auto], [
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
enable_vala=no
])
], [
AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
])
AS_IF([test "x$2" = "x"], [
vapigen_pkg_name=vapigen
], [
vapigen_pkg_name=vapigen-$2
])
AS_IF([test "x$1" = "x"], [
vapigen_pkg="$vapigen_pkg_name"
], [
vapigen_pkg="$vapigen_pkg_name >= $1"
])
PKG_PROG_PKG_CONFIG
PKG_CHECK_EXISTS([$vapigen_pkg], [
AS_IF([test "$enable_vala" = "auto"], [
enable_vala=yes
])
], [
AS_CASE([$enable_vala], [yes], [
AC_MSG_ERROR([$vapigen_pkg not found])
], [auto], [
enable_vala=no
])
])
AC_MSG_CHECKING([for vapigen])
AS_CASE([$enable_vala],
[yes], [
VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
AS_IF([test "x$2" = "x"], [
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
], [
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
])
])
AC_MSG_RESULT([$enable_vala])
AC_SUBST([VAPIGEN])
AC_SUBST([VAPIGEN_VAPIDIR])
AC_SUBST([VAPIGEN_MAKEFILE])
AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
])

File diff suppressed because it is too large Load Diff

View File

@@ -1,78 +0,0 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = The ModemManager developers.
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = no
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS =
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no
# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS = --quiet
# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = yes
# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = no

View File

@@ -1,447 +0,0 @@
SUBDIRS = . tests
################################################################################
# common
################################################################################
sbin_PROGRAMS =
noinst_LTLIBRARIES =
EXTRA_DIST =
BUILT_SOURCES =
CLEANFILES =
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(MM_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
$(GUDEV_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libqcdm/src \
-I$(top_srcdir)/libmm-glib \
-I${top_builddir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated/tests \
-I$(srcdir)/kerneldevice \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MM_LIBS) \
$(CODE_COVERAGE_LDFLAGS) \
$(GUDEV_LIBS) \
$(NULL)
if WITH_QRTR
AM_CFLAGS += $(QRTR_CFLAGS)
AM_LDFLAGS += $(QRTR_LIBS)
endif
if WITH_QMI
AM_CFLAGS += $(QMI_CFLAGS)
AM_LDFLAGS += $(QMI_LIBS)
endif
if WITH_MBIM
AM_CFLAGS += $(MBIM_CFLAGS)
AM_LDFLAGS += $(MBIM_LIBS)
endif
if WITH_POLKIT
AM_CFLAGS += $(POLKIT_CFLAGS)
AM_LDFLAGS += $(POLKIT_LIBS)
endif
if WITH_SYSTEMD_JOURNAL
AM_CFLAGS += $(LIBSYSTEMD_CFLAGS)
AM_LDFLAGS += $(LIBSYSTEMD_LIBS)
endif
################################################################################
# generic udev rules
################################################################################
udevrulesdir = $(UDEV_BASE_DIR)/rules.d
udevrules_DATA = \
80-mm-candidate.rules \
$(NULL)
EXTRA_DIST += $(udevrules_DATA)
################################################################################
# helpers library
################################################################################
noinst_LTLIBRARIES += libhelpers.la
HELPER_ENUMS_INPUTS = \
$(srcdir)/mm-sms-part.h \
$(srcdir)/mm-modem-helpers.h \
$(NULL)
HELPER_ENUMS_GENERATED = \
mm-helper-enums-types.h \
mm-helper-enums-types.c \
$(NULL)
mm-helper-enums-types.h: Makefile.am $(HELPER_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"mm-sms-part.h\"\n#include \"mm-modem-helpers.h\"\n#ifndef __MM_HELPER_ENUMS_TYPES_H__\n#define __MM_HELPER_ENUMS_TYPES_H__\n" \
--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
--ftail "#endif /* __MM_HELPER_ENUMS_TYPES_H__ */\n" \
$(HELPER_ENUMS_INPUTS) > $@
mm-helper-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template mm-helper-enums-types.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"mm-helper-enums-types.h\"" \
--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
$(HELPER_ENUMS_INPUTS) > $@
libhelpers_la_SOURCES = \
mm-log-object.h \
mm-log-object.c \
mm-log.c \
mm-log.h \
mm-log-test.h \
mm-error-helpers.c \
mm-error-helpers.h \
mm-modem-helpers.c \
mm-modem-helpers.h \
mm-charsets.c \
mm-charsets.h \
mm-sms-part.h \
mm-sms-part.c \
mm-sms-part-3gpp.h \
mm-sms-part-3gpp.c \
mm-sms-part-cdma.h \
mm-sms-part-cdma.c \
$(NULL)
nodist_libhelpers_la_SOURCES = $(HELPER_ENUMS_GENERATED)
if WITH_QMI
libhelpers_la_SOURCES += \
mm-modem-helpers-qmi.c \
mm-modem-helpers-qmi.h \
$(NULL)
endif
if WITH_MBIM
libhelpers_la_SOURCES += \
mm-modem-helpers-mbim.c \
mm-modem-helpers-mbim.h \
$(NULL)
endif
# Request to build enum types before anything else
BUILT_SOURCES += $(HELPER_ENUMS_GENERATED)
CLEANFILES += $(HELPER_ENUMS_GENERATED)
################################################################################
# kerneldevice library
################################################################################
noinst_LTLIBRARIES += libkerneldevice.la
libkerneldevice_la_CPPFLAGS = \
-DUDEVRULESDIR=\"$(udevrulesdir)\" \
$(NULL)
libkerneldevice_la_SOURCES = \
kerneldevice/mm-kernel-device.h \
kerneldevice/mm-kernel-device.c \
kerneldevice/mm-kernel-device-helpers.h \
kerneldevice/mm-kernel-device-helpers.c \
kerneldevice/mm-kernel-device-generic.h \
kerneldevice/mm-kernel-device-generic.c \
kerneldevice/mm-kernel-device-generic-rules.h \
kerneldevice/mm-kernel-device-generic-rules.c \
$(NULL)
if WITH_QRTR
libkerneldevice_la_SOURCES += \
kerneldevice/mm-kernel-device-qrtr.h \
kerneldevice/mm-kernel-device-qrtr.c \
$(NULL)
endif
if WITH_UDEV
libkerneldevice_la_SOURCES += \
kerneldevice/mm-kernel-device-udev.h \
kerneldevice/mm-kernel-device-udev.c \
$(NULL)
endif
libkerneldevice_la_LIBADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(builddir)/libhelpers.la \
$(NULL)
################################################################################
# ports library
################################################################################
noinst_LTLIBRARIES += libport.la
PORT_ENUMS_INPUTS = \
$(srcdir)/mm-port.h \
$(srcdir)/mm-port-serial-at.h \
$(NULL)
if WITH_QMI
PORT_ENUMS_INPUTS += $(srcdir)/mm-port-qmi.h
endif
PORT_ENUMS_GENERATED = \
mm-port-enums-types.h \
mm-port-enums-types.c \
$(NULL)
mm-port-enums-types.h: Makefile.am $(PORT_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"config.h\"\n#include \"mm-port.h\"\n#include \"mm-port-serial-at.h\"\n#if defined WITH_QMI\n#include \"mm-port-qmi.h\"\n#endif\n#ifndef __MM_PORT_ENUMS_TYPES_H__\n#define __MM_PORT_ENUMS_TYPES_H__\n" \
--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
--ftail "#endif /* __MM_PORT_ENUMS_TYPES_H__ */\n" \
$(PORT_ENUMS_INPUTS) > $@
mm-port-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template mm-port-enums-types.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"mm-port-enums-types.h\"" \
--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
$(PORT_ENUMS_INPUTS) > $@
libport_la_SOURCES = \
mm-port.c \
mm-port.h \
mm-port-net.c \
mm-port-net.h \
mm-port-serial.c \
mm-port-serial.h \
mm-port-serial-at.c \
mm-port-serial-at.h \
mm-port-serial-qcdm.c \
mm-port-serial-qcdm.h \
mm-port-serial-gps.c \
mm-port-serial-gps.h \
mm-serial-parsers.c \
mm-serial-parsers.h \
mm-netlink.h \
mm-netlink.c \
$(NULL)
nodist_libport_la_SOURCES = $(PORT_ENUMS_GENERATED)
if WITH_QMI
libport_la_SOURCES += \
mm-port-qmi.c \
mm-port-qmi.h \
$(NULL)
endif
if WITH_MBIM
libport_la_SOURCES += \
mm-port-mbim.c \
mm-port-mbim.h \
$(NULL)
endif
libport_la_LIBADD = \
$(top_builddir)/libqcdm/src/libqcdm.la \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(builddir)/libkerneldevice.la \
$(NULL)
# Request to build enum types before anything else
BUILT_SOURCES += $(PORT_ENUMS_GENERATED)
CLEANFILES += $(PORT_ENUMS_GENERATED)
################################################################################
# ModemManager daemon
################################################################################
sbin_PROGRAMS += ModemManager
DAEMON_ENUMS_INPUTS = \
$(srcdir)/mm-filter.h \
$(srcdir)/mm-base-bearer.h \
$(srcdir)/mm-port-probe.h \
$(NULL)
DAEMON_ENUMS_GENERATED = \
mm-daemon-enums-types.h \
mm-daemon-enums-types.c \
$(NULL)
mm-daemon-enums-types.h: Makefile.am $(DAEMON_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"mm-filter.h\"\n#include \"mm-base-bearer.h\"\n#include \"mm-port-probe.h\"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n" \
--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
--ftail "#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n" \
$(DAEMON_ENUMS_INPUTS) > $@
mm-daemon-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template mm-daemon-enums-types.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#include \"mm-daemon-enums-types.h\"" \
--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
$(DAEMON_ENUMS_INPUTS) > $@
# Request to build enum types before anything else
BUILT_SOURCES += $(DAEMON_ENUMS_GENERATED)
CLEANFILES += $(DAEMON_ENUMS_GENERATED)
ModemManager_CPPFLAGS = \
-DPLUGINDIR=\"$(pkglibdir)\" \
-DFCCUNLOCKDIRPACKAGE=\"${pkglibdir}/fcc-unlock.d\" \
-DFCCUNLOCKDIRUSER=\"${pkgsysconfdir}/fcc-unlock.d\" \
-DCONNECTIONDIRPACKAGE=\"${pkglibdir}/connection.d\" \
-DCONNECTIONDIRUSER=\"${pkgsysconfdir}/connection.d\" \
-DMM_COMPILATION \
$(NULL)
ModemManager_LDADD = \
$(top_builddir)/libqcdm/src/libqcdm.la \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(top_builddir)/libmm-glib/generated/tests/libmm-test-generated.la \
$(builddir)/libport.la \
$(NULL)
ModemManager_SOURCES = \
main.c \
mm-context.h \
mm-context.c \
mm-utils.h \
mm-log-helpers.h \
mm-log-helpers.c \
mm-private-boxed-types.h \
mm-private-boxed-types.c \
mm-auth-provider.h \
mm-auth-provider.c \
mm-dispatcher.h \
mm-dispatcher.c \
mm-dispatcher-connection.h \
mm-dispatcher-connection.c \
mm-dispatcher-fcc-unlock.h \
mm-dispatcher-fcc-unlock.c \
mm-filter.h \
mm-filter.c \
mm-base-manager.c \
mm-base-manager.h \
mm-device.c \
mm-device.h \
mm-plugin-manager.c \
mm-plugin-manager.h \
mm-base-sim.h \
mm-base-sim.c \
mm-base-bearer.h \
mm-base-bearer.c \
mm-broadband-bearer.h \
mm-broadband-bearer.c \
mm-bearer-list.h \
mm-bearer-list.c \
mm-base-modem-at.h \
mm-base-modem-at.c \
mm-base-modem.h \
mm-base-modem.c \
mm-base-sms.h \
mm-base-sms.c \
mm-base-call.h \
mm-base-call.c \
mm-sms-list.h \
mm-sms-list.c \
mm-call-list.h \
mm-call-list.c \
mm-iface-modem.h \
mm-iface-modem.c \
mm-iface-modem-3gpp.h \
mm-iface-modem-3gpp.c \
mm-iface-modem-3gpp-profile-manager.h \
mm-iface-modem-3gpp-profile-manager.c \
mm-iface-modem-3gpp-ussd.h \
mm-iface-modem-3gpp-ussd.c \
mm-iface-modem-cdma.h \
mm-iface-modem-cdma.c \
mm-iface-modem-simple.h \
mm-iface-modem-simple.c \
mm-iface-modem-location.h \
mm-iface-modem-location.c \
mm-iface-modem-messaging.h \
mm-iface-modem-messaging.c \
mm-iface-modem-voice.h \
mm-iface-modem-voice.c \
mm-iface-modem-time.h \
mm-iface-modem-time.c \
mm-iface-modem-firmware.h \
mm-iface-modem-firmware.c \
mm-iface-modem-sar.h \
mm-iface-modem-sar.c \
mm-iface-modem-signal.h \
mm-iface-modem-signal.c \
mm-iface-modem-oma.h \
mm-iface-modem-oma.c \
mm-broadband-modem.h \
mm-broadband-modem.c \
mm-port-probe.h \
mm-port-probe.c \
mm-port-probe-at.h \
mm-port-probe-at.c \
mm-plugin.c \
mm-plugin.h \
mm-shared.h \
$(NULL)
if WITH_QRTR
ModemManager_SOURCES += \
mm-qrtr-bus-watcher.h \
mm-qrtr-bus-watcher.c \
$(NULL)
endif
nodist_ModemManager_SOURCES = $(DAEMON_ENUMS_GENERATED)
# Additional suspend/resume support via systemd
if WITH_SYSTEMD_SUSPEND_RESUME
ModemManager_SOURCES += \
mm-sleep-monitor.h \
mm-sleep-monitor-systemd.c \
$(NULL)
endif
if WITH_POWERD_SUSPEND_RESUME
ModemManager_SOURCES += \
mm-sleep-monitor.h \
mm-sleep-monitor-powerd.c \
$(NULL)
endif
# Additional QMI support in ModemManager
if WITH_QMI
ModemManager_SOURCES += \
mm-shared-qmi.h \
mm-shared-qmi.c \
mm-sms-qmi.h \
mm-sms-qmi.c \
mm-sim-qmi.h \
mm-sim-qmi.c \
mm-call-qmi.h \
mm-call-qmi.c \
mm-bearer-qmi.h \
mm-bearer-qmi.c \
mm-broadband-modem-qmi.h \
mm-broadband-modem-qmi.c \
$(NULL)
endif
# Additional MBIM support in ModemManager
if WITH_MBIM
ModemManager_SOURCES += \
mm-sms-mbim.h \
mm-sms-mbim.c \
mm-sim-mbim.h \
mm-sim-mbim.c \
mm-bearer-mbim.h \
mm-bearer-mbim.c \
mm-broadband-modem-mbim.h \
mm-broadband-modem-mbim.c \
$(NULL)
endif

View File

@@ -1,68 +0,0 @@
include $(top_srcdir)/gtester.make
################################################################################
# common
################################################################################
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(MM_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libqcdm/src \
-I$(top_srcdir)/libmm-glib \
-I${top_builddir}/libmm-glib/generated \
-I${top_srcdir}/src/ \
-I${top_builddir}/src/ \
-I${top_srcdir}/src/kerneldevice \
-DTESTUDEVRULESDIR=\"${top_srcdir}/src/\" \
$(NULL)
LDADD = \
$(top_builddir)/src/libhelpers.la \
$(top_builddir)/src/libport.la \
$(top_builddir)/src/libkerneldevice.la \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MM_LIBS) \
$(CODE_COVERAGE_LDFLAGS) \
-lutil \
$(NULL)
if WITH_QMI
AM_CFLAGS += $(QMI_CFLAGS)
AM_LDFLAGS += $(QMI_LIBS)
endif
if WITH_MBIM
AM_CFLAGS += $(MBIM_CFLAGS)
AM_LDFLAGS += $(MBIM_LIBS)
endif
################################################################################
# tests
# note: we abuse AM_LDFLAGS to include the libraries being tested
################################################################################
noinst_PROGRAMS = \
test-modem-helpers \
test-charsets \
test-qcdm-serial-port \
test-at-serial-port \
test-sms-part-3gpp \
test-sms-part-cdma \
test-udev-rules \
test-error-helpers \
test-kernel-device-helpers \
$(NULL)
if WITH_QMI
noinst_PROGRAMS += test-modem-helpers-qmi
endif
TEST_PROGS += $(noinst_PROGRAMS)

View File

@@ -1,131 +0,0 @@
noinst_PROGRAMS =
EXTRA_DIST =
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(NULL)
################################################################################
# lsudev
################################################################################
if WITH_UDEV
noinst_PROGRAMS += lsudev
lsudev_SOURCES = lsudev.c
lsudev_CPPFLAGS = $(GUDEV_CFLAGS)
lsudev_LDADD = $(GUDEV_LIBS)
endif
################################################################################
# mmtty
################################################################################
noinst_PROGRAMS += mmtty
mmtty_SOURCES = mmtty.c
mmtty_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/kerneldevice \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I$(top_srcdir)/libmm-glib/generated \
-I$(top_builddir)/libmm-glib/generated
$(NULL)
mmtty_LDADD = \
$(MM_LIBS) \
$(top_builddir)/src/libport.la \
$(NULL)
################################################################################
# mmrules
################################################################################
noinst_PROGRAMS += mmrules
mmrules_SOURCES = mmrules.c
mmrules_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/kerneldevice \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I$(top_srcdir)/libmm-glib/generated \
-I$(top_builddir)/libmm-glib/generated
$(NULL)
mmrules_LDADD = \
$(MM_LIBS) \
$(top_builddir)/src/libkerneldevice.la \
$(NULL)
################################################################################
# mmsmspdu
################################################################################
noinst_PROGRAMS += mmsmspdu
mmsmspdu_SOURCES = mmsmspdu.c
mmsmspdu_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I$(top_srcdir)/libmm-glib/generated \
-I$(top_builddir)/libmm-glib/generated
$(NULL)
mmsmspdu_LDADD = \
$(MM_LIBS) \
$(top_builddir)/src/libhelpers.la \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
################################################################################
# mmsmsmonitor
################################################################################
noinst_PROGRAMS += mmsmsmonitor
mmsmsmonitor_SOURCES = mmsmsmonitor.c
mmsmsmonitor_CPPFLAGS = \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I$(top_srcdir)/libmm-glib/generated \
-I$(top_builddir)/libmm-glib/generated
$(NULL)
mmsmsmonitor_LDADD = \
$(MM_LIBS) \
$(top_builddir)/src/libhelpers.la \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
################################################################################
# mmcli-test-sms
################################################################################
EXTRA_DIST += mmcli-test-sms

View File

@@ -1,3 +0,0 @@
SUBDIRS = . tests
EXTRA_DIST = test-modemmanager-service.py

View File

@@ -1,49 +0,0 @@
include $(top_srcdir)/gtester.make
################################################################################
# common
################################################################################
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
$(NULL)
LDADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MM_LIBS) \
$(MM_LDFLAGS) \
$(NULL)
noinst_PROGRAMS = test-stub
test_stub_CPPFLAGS = \
-DTEST_SERVICES=\""$(abs_top_builddir)/tools/tests/services"\" \
$(NULL)
# only run the test if introspection was enabled
if HAVE_INTROSPECTION
TEST_PROGS += $(noinst_PROGRAMS)
endif
test-wrapper.sh: test-wrapper.sh.in
@sed \
-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
$< >$@
@chmod +x $@
BUILT_SOURCES = test-wrapper.sh
CLEANFILES = test-wrapper.sh
EXTRA_DIST += test-wrapper.sh.in services/org.freedesktop.ModemManager1.service.in

View File

@@ -1,22 +0,0 @@
VAPIGEN_VAPIS = libmm-glib.vapi
if ENABLE_VAPIGEN
include $(VAPIGEN_MAKEFILE)
libmm-glib.vapi: $(top_builddir)/libmm-glib/ModemManager-1.0.gir libmm-glib.deps ModemManager-1.0.metadata
libmm_glib_vapi_METADATADIRS = $(srcdir)
libmm_glib_vapi_FILES = $(top_builddir)/libmm-glib/ModemManager-1.0.gir
libmm_glib_vapi_VAPIDIRS = $(builddir)
libmm_glib_vapi_DEPS = gio-2.0
vapidir = $(datadir)/vala/vapi
vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
endif
CLEANFILES = $(VAPIGEN_VAPIS)
EXTRA_DIST = \
ModemManager-1.0.metadata \
libmm-glib.deps