diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2021-07-27 14:10:17 +0200 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2021-07-27 15:55:09 +0200 |
commit | 9b3caa970b918ab49ff76396459013d1569268b1 (patch) | |
tree | 04aff86004ef5fa8d37126d40163cf5cb21e1800 | |
parent | af15f1cd3c1e586a35c3ff439312b2ae8edbf35e (diff) | |
download | libmbim-9b3caa970b918ab49ff76396459013d1569268b1.tar.gz |
build: Remove autotools
To avoid the burden of maintaining multiple build systems, autotools
support has been removed.
Fixes #18.
41 files changed, 10 insertions, 2886 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec5b51e..c212aad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,11 +12,11 @@ stages: variables: FDO_UPSTREAM_REPO: mobile-broadband/libmbim FDO_DISTRIBUTION_VERSION: '18.04' - FDO_DISTRIBUTION_TAG: '2021-07-22.1' - FDO_DISTRIBUTION_PACKAGES: ca-certificates git gcc autoconf automake libtool - libgirepository1.0-dev libglib2.0-dev autopoint - gtk-doc-tools libglib2.0-doc gobject-introspection - bash-completion valac meson ninja-build + FDO_DISTRIBUTION_TAG: '2021-07-27.1' + FDO_DISTRIBUTION_PACKAGES: ca-certificates git gcc libgirepository1.0-dev + libglib2.0-dev gtk-doc-tools libglib2.0-doc + gobject-introspection bash-completion valac + meson ninja-build build container: extends: @@ -30,7 +30,7 @@ build container: - tags - pushes -build-meson: +build-meson-default: stage: build extends: - .fdo.distribution-image@ubuntu @@ -47,61 +47,9 @@ build-meson: - meson setup _release_build --prefix=/usr --buildtype=release -Dwerror=true - ninja -C _release_build - ninja -C _release_build install + - ninja -C _release_build dist -build-autotools-clean-distclean: - stage: build - extends: - - .fdo.distribution-image@ubuntu - - .common_variables - only: - - master - - merge_requests - - tags - - schedules - script: - - NOCONFIGURE=1 ./autogen.sh - - ./configure --prefix=/usr --disable-gtk-doc --disable-introspection - - make - - make clean - - make - - make distclean - - ./configure --prefix=/usr --disable-gtk-doc --disable-introspection - - make - -build-autotools-vpath: - stage: build - extends: - - .fdo.distribution-image@ubuntu - - .common_variables - only: - - master - - merge_requests - - tags - - schedules - script: - - NOCONFIGURE=1 ./autogen.sh - - mkdir build - - cd build - - ../configure --prefix=/usr --disable-gtk-doc --disable-introspection - - make - -build-autotools-default: - stage: build - extends: - - .fdo.distribution-image@ubuntu - - .common_variables - only: - - merge_requests - - schedules - script: - - NOCONFIGURE=1 ./autogen.sh - - ./configure --prefix=/usr --enable-gtk-doc --enable-introspection - - make - - make check - - make install - - make distcheck - -build-autotools-default-artifacts: +build-meson-default-artifacts: stage: build extends: - .fdo.distribution-image@ubuntu @@ -110,11 +58,11 @@ build-autotools-default-artifacts: - master - tags script: - - !reference [build-autotools-default, script] + - !reference [build-meson-default, script] - sha256sum $CI_PROJECT_NAME-*.tar.xz | awk '{print $1;}' > pkg_hash.txt artifacts: name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG" paths: - - /builds/$CI_PROJECT_ROOT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME-*.tar.xz + - "${CI_PROJECT_DIR}/_release_build/meson-dist/$CI_PROJECT_NAME-*.tar.xz" - /builds/$CI_PROJECT_ROOT_NAMESPACE/$CI_PROJECT_NAME/pkg_hash.txt expire_in: 2 days diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 9da2290..0000000 --- a/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ - -SUBDIRS = . build-aux data src examples utils docs - -ACLOCAL_AMFLAGS = -I m4 - -DISTCHECK_CONFIGURE_FLAGS = \ - --with-udev-base-dir="$$dc_install_base" \ - --enable-gtk-doc - -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 - - -EXTRA_DIST = \ - gtester.make \ - COPYING.LIB diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index fa04aed..0000000 --- a/autogen.sh +++ /dev/null @@ -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=libmbim - -(test -f $srcdir/configure.ac \ - && test -f $srcdir/src/libmbim-glib/libmbim-glib.h) || { - 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 diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am deleted file mode 100644 index b841a55..0000000 --- a/build-aux/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -SUBDIRS = templates mbim-codegen . - -EXTRA_DIST = mbim-mkenums diff --git a/build-aux/mbim-codegen/Makefile.am b/build-aux/mbim-codegen/Makefile.am deleted file mode 100644 index 9dc56aa..0000000 --- a/build-aux/mbim-codegen/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ - -EXTRA_DIST = \ - utils.py \ - Struct.py \ - Message.py \ - ObjectList.py \ - mbim-codegen - -CLEANFILES = *.pyc diff --git a/build-aux/templates/Makefile.am b/build-aux/templates/Makefile.am deleted file mode 100644 index db2fa74..0000000 --- a/build-aux/templates/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ - -EXTRA_DIST = \ - mbim-error-types.h.template \ - mbim-error-types.c.template \ - mbim-error-quarks.c.template \ - mbim-enum-types.h.template \ - mbim-enum-types.c.template diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 5355996..0000000 --- a/configure.ac +++ /dev/null @@ -1,219 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_PREREQ([2.68]) - -dnl The libmbim version number -m4_define([mbim_major_version], [1]) -m4_define([mbim_minor_version], [27]) -m4_define([mbim_micro_version], [0]) -m4_define([mbim_version], - [mbim_major_version.mbim_minor_version.mbim_micro_version]) - -dnl libtool versioning for libmbim-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([mbim_glib_lt_current], [10]) -m4_define([mbim_glib_lt_revision], [0]) -m4_define([mbim_glib_lt_age], [6]) - - -AC_INIT([libmbim], [mbim_version], [libmbim-devel@lists.freedesktop.org]) -AC_CONFIG_SRCDIR([config.h.in]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) - -AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar -Wno-portability]) -AM_MAINTAINER_MODE([enable]) - -dnl Support silent build rules. Disable -dnl by either passing --disable-silent-rules to configure or passing V=1 -dnl to make -AM_SILENT_RULES([yes]) - -dnl Required programs -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_INSTALL - -dnl Initialize libtool -LT_PREREQ([2.2]) -LT_INIT - -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 Version stuff -MBIM_MAJOR_VERSION=mbim_major_version -MBIM_MINOR_VERSION=mbim_minor_version -MBIM_MICRO_VERSION=mbim_micro_version -MBIM_VERSION=mbim_version -AC_SUBST(MBIM_MAJOR_VERSION) -AC_SUBST(MBIM_MINOR_VERSION) -AC_SUBST(MBIM_MICRO_VERSION) -AC_SUBST(MBIM_VERSION) - -dnl libtool version stuff -MBIM_GLIB_LT_CURRENT=mbim_glib_lt_current -MBIM_GLIB_LT_REVISION=mbim_glib_lt_revision -MBIM_GLIB_LT_AGE=mbim_glib_lt_age -AC_SUBST(MBIM_GLIB_LT_CURRENT) -AC_SUBST(MBIM_GLIB_LT_REVISION) -AC_SUBST(MBIM_GLIB_LT_AGE) - -dnl Required dependency versions -GLIB_MIN_VERSION=2.56 - -GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_DISABLE_DEPRECATION_WARNINGS" - -dnl General dependencies for common -PKG_CHECK_MODULES(MBIM_COMMON, - glib-2.0 >= $GLIB_MIN_VERSION) -MBIM_COMMON_CFLAGS="$MBIM_COMMON_CFLAGS $GLIB_BUILD_SYMBOLS" -AC_SUBST(MBIM_COMMON_CFLAGS) -AC_SUBST(MBIM_COMMON_LIBS) - -dnl General dependencies for libmbim-glib -PKG_CHECK_MODULES(LIBMBIM_GLIB, - glib-2.0 >= $GLIB_MIN_VERSION - gobject-2.0 - gio-2.0 - gio-unix-2.0) -LIBMBIM_GLIB_CFLAGS="$LIBMBIM_GLIB_CFLAGS $GLIB_BUILD_SYMBOLS" -AC_SUBST(LIBMBIM_GLIB_CFLAGS) -AC_SUBST(LIBMBIM_GLIB_LIBS) - -dnl General dependencies for mbimcli -PKG_CHECK_MODULES(MBIMCLI, - glib-2.0 >= $GLIB_MIN_VERSION - gobject-2.0 - gio-2.0) -MBIMCLI_CFLAGS="$MBIMCLI_CFLAGS $GLIB_BUILD_SYMBOLS" -AC_SUBST(MBIMCLI_CFLAGS) -AC_SUBST(MBIMCLI_LIBS) - -dnl General dependencies for mbim-proxy -PKG_CHECK_MODULES(MBIMPROXY, - glib-2.0 >= $GLIB_MIN_VERSION - gobject-2.0 - gio-2.0) -MBIMPROXY_CFLAGS="$MBIMPROXY_CFLAGS $GLIB_BUILD_SYMBOLS" -AC_SUBST(MBIMPROXY_CFLAGS) -AC_SUBST(MBIMPROXY_LIBS) - -AM_PATH_PYTHON([], [], [PYTHON=python]) - -dnl Documentation -GTK_DOC_CHECK(1.0) - -dnl GObject Introspection -GOBJECT_INTROSPECTION_CHECK([0.9.6]) - -# MBIM username -MBIM_USERNAME="root" -AC_ARG_ENABLE(mbim-username, - AS_HELP_STRING([--enable-mbim-username=<username>], [user allowed to access MBIM devices])) -if test -n "$enable_mbim_username" ; then - MBIM_USERNAME_ENABLED=yes - AC_DEFINE(MBIM_USERNAME_ENABLED, 1, [Define if we enable MBIM username]) - MBIM_USERNAME="$enable_mbim_username" - AC_SUBST(MBIM_USERNAME) - AC_DEFINE_UNQUOTED(MBIM_USERNAME, "$MBIM_USERNAME", [Define the MBIM username]) -else - MBIM_USERNAME_ENABLED=no -fi - -AM_CONDITIONAL([MBIM_USERNAME_ENABLED], [test "x$MBIM_USERNAME_ENABLED" = "xyes"]) - -# 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 Man page -AC_PATH_PROG(HELP2MAN, help2man, false) -AM_CONDITIONAL(BUILDOPT_MAN, test x$HELP2MAN != xfalse) - -AC_CONFIG_FILES([Makefile - build-aux/Makefile - build-aux/templates/Makefile - build-aux/mbim-codegen/Makefile - data/Makefile - data/pkg-config/Makefile - data/pkg-config/mbim-glib.pc - src/Makefile - src/common/Makefile - src/common/test/Makefile - src/libmbim-glib/Makefile - src/libmbim-glib/mbim-version.h - src/libmbim-glib/generated/Makefile - src/libmbim-glib/test/Makefile - src/mbimcli/Makefile - src/mbim-proxy/Makefile - utils/Makefile - examples/Makefile - examples/simple-tester-python/Makefile - docs/Makefile - docs/reference/Makefile - docs/reference/libmbim-glib/Makefile - docs/reference/libmbim-glib/version.xml - docs/man/Makefile]) - -if test "x$MBIM_USERNAME_ENABLED" = "xyes"; then - AC_CONFIG_FILES([src/mbim-proxy/76-mbim-proxy-device-ownership.rules]) -fi - -AC_OUTPUT - -echo " - libmbim $VERSION - ============================================== - - Build: - compiler: ${CC} - cflags: ${CFLAGS} - ldflags: ${LDFLAGS} - warn cflags: ${WARN_CFLAGS} - warn ldflags: ${WARN_LDFLAGS} - Maintainer mode: ${USE_MAINTAINER_MODE} - Documentation: ${enable_gtk_doc} - gobject introspection: ${found_introspection} - - System paths: - prefix: ${prefix} - udev base directory: ${UDEV_BASE_DIR} - - Features: - MBIM username: ${MBIM_USERNAME_ENABLED} (${MBIM_USERNAME}) -" diff --git a/data/Makefile.am b/data/Makefile.am deleted file mode 100644 index 934b1fe..0000000 --- a/data/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -SUBDIRS = . pkg-config - -EXTRA_DIST = \ - mbim-service-basic-connect.json \ - mbim-service-sms.json \ - mbim-service-ussd.json \ - mbim-service-auth.json \ - mbim-service-phonebook.json \ - mbim-service-stk.json \ - mbim-service-dss.json \ - mbim-service-ms-firmware-id.json \ - mbim-service-ms-host-shutdown.json \ - mbim-service-ms-sar.json \ - mbim-service-proxy-control.json \ - mbim-service-qmi.json \ - mbim-service-atds.json \ - mbim-service-qdu.json \ - mbim-service-ms-uicc-low-level-access.json \ - mbim-service-intel-firmware-update.json \ - mbim-service-ms-basic-connect-extensions.json diff --git a/data/pkg-config/Makefile.am b/data/pkg-config/Makefile.am deleted file mode 100644 index 033081e..0000000 --- a/data/pkg-config/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -# Set up pkg-config .pc files for exported libraries -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = mbim-glib.pc diff --git a/data/pkg-config/mbim-glib.pc.in b/data/pkg-config/mbim-glib.pc.in deleted file mode 100644 index 898375e..0000000 --- a/data/pkg-config/mbim-glib.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: mbim-glib -Description: Library to communicate with MBIM-powered modems -Version: @VERSION@ -Requires: glib-2.0 gobject-2.0 gio-2.0 -Cflags: -I${includedir}/libmbim-glib -Libs: -L${libdir} -lmbim-glib diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index 88a54ad..0000000 --- a/docs/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = reference man diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am deleted file mode 100644 index eccc1a2..0000000 --- a/docs/man/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ - -dist_man_MANS = \ - mbimcli.1 \ - mbim-network.1 - -# List of all source files which affect the output of --help-all -MBIMCLI_SOURCES_WITH_HELP = \ - $(top_srcdir)/src/mbimcli/mbimcli-atds.c \ - $(top_srcdir)/src/mbimcli/mbimcli-basic-connect.c \ - $(top_srcdir)/src/mbimcli/mbimcli-ms-basic-connect-extensions.c \ - $(top_srcdir)/src/mbimcli/mbimcli-dss.c \ - $(top_srcdir)/src/mbimcli/mbimcli-ms-firmware-id.c \ - $(top_srcdir)/src/mbimcli/mbimcli-ms-host-shutdown.c \ - $(top_srcdir)/src/mbimcli/mbimcli-ms-sar.c \ - $(top_srcdir)/src/mbimcli/mbimcli-intel-firmware-update.c \ - $(top_srcdir)/src/mbimcli/mbimcli-phonebook.c \ - $(top_srcdir)/src/mbimcli/mbimcli.c - -# Depend only in the source files, not in the actual program, so that the -# manpage doesn't get rebuilt when building from a tarball -# Also, make sure that the mbimcli.1 file is always generated, even when help2man -# is not available -mbimcli.1: $(MBIMCLI_SOURCES_WITH_HELP) - $(AM_V_GEN) \ - $(HELP2MAN) \ - --output=$@ \ - --name='Control MBIM devices' \ - --help-option='--help-all' \ - --libtool \ - $(top_builddir)/src/mbimcli/mbimcli || \ - touch $@ - -# Depend only in the .in file, not in the actual script, so that the -# manpage doesn't get rebuilt when building from a tarball. -# Make sure that the mbim-network.1 file is always generated, even when help2man -# is not available -mbim-network.1: $(top_srcdir)/utils/mbim-network.in - $(AM_V_GEN) \ - $(HELP2MAN) \ - --output=$@ \ - --name='Simple network management of MBIM devices' \ - $(top_builddir)/utils/mbim-network || \ - touch $@ diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am deleted file mode 100644 index 452e53d..0000000 --- a/docs/reference/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = libmbim-glib diff --git a/docs/reference/libmbim-glib/Makefile.am b/docs/reference/libmbim-glib/Makefile.am deleted file mode 100644 index 9211f53..0000000 --- a/docs/reference/libmbim-glib/Makefile.am +++ /dev/null @@ -1,112 +0,0 @@ - -# The name of the module. -DOC_MODULE = libmbim-glib - -# The top-level SGML file. -DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml - -# Sections file building -ALL_SECTIONS = \ - $(srcdir)/libmbim-glib-common.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-basic-connect.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-sms.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-ussd.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-auth.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-phonebook.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-stk.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-dss.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-ms-firmware-id.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-ms-host-shutdown.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-ms-sar.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-qmi.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-atds.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-qdu.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-intel-firmware-update.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-ms-uicc-low-level-access.sections \ - $(top_builddir)/src/libmbim-glib/generated/mbim-ms-basic-connect-extensions.sections - -$(DOC_MODULE)-sections.mstamp: $(ALL_SECTIONS) - $(AM_V_GEN) \ - rm -f $(DOC_MODULE)-sections.txt && \ - cat $(ALL_SECTIONS) > $(DOC_MODULE)-sections.txt && \ - touch $(DOC_MODULE)-sections.mstamp - -BUILT_SOURCES = $(DOC_MODULE)-sections.mstamp - -# Extra options to supply to gtkdoc-scan -SCAN_OPTIONS = --rebuild-types --deprecated-guards="MBIM_DISABLE_DEPRECATED" - -# The directory containing the source code. -DOC_SOURCE_DIR = \ - $(top_srcdir)/src/libmbim-glib \ - $(top_builddir)/src/libmbim-glib \ - $(top_builddir)/src/libmbim-glib/generated - -# Used for dependencies -HFILE_GLOB = \ - $(top_srcdir)/src/libmbim-glib/*.h \ - $(top_builddir)/src/libmbim-glib/*.h \ - $(top_builddir)/src/libmbim-glib/generated/*.h -CFILE_GLOB = \ - $(top_srcdir)/src/libmbim-glib/*.c \ - $(top_builddir)/src/libmbim-glib/generated/*.c - -# Headers to ignore -IGNORE_HFILES = \ - mbim-message-private.h \ - mbim-helpers.h \ - mbim-net-port-manager.h - -# 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) \ - $(LIBMBIM_GLIB_CFLAGS) - -GTKDOC_LIBS = \ - $(LIBMBIM_GLIB_LIBS) \ - $(top_builddir)/src/libmbim-glib/libmbim-glib.la - -# Extra options to supply to gtkdoc-mkdb -MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=mbim - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) -content_files = version.xml - -expand_content_files = - -extra_files = - -include $(top_srcdir)/gtk-doc.make - - -EXTRA_DIST += \ - libmbim-glib-common.sections \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-sections.mstamp \ - 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 \ - $(DOC_MODULE).actions \ - $(DOC_MODULE).types \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-sections.mstamp \ - *.stamp \ - -rf xml html tmpl \ - $(NULL) diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 601971d..0000000 --- a/examples/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = simple-tester-python diff --git a/examples/simple-tester-python/Makefile.am b/examples/simple-tester-python/Makefile.am deleted file mode 100644 index 81a8b07..0000000 --- a/examples/simple-tester-python/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ - -EXTRA_DIST = simple-tester-python README diff --git a/gtester.make b/gtester.make deleted file mode 100644 index 40348dc..0000000 --- a/gtester.make +++ /dev/null @@ -1,91 +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 - -.PHONY: lcov genlcov lcov-clean -# use recursive makes in order to ignore errors during check -lcov: - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) genlcov - -# we have to massage the lcov.info file slightly to hide the effect of libtool -# placing the objects files in the .libs/ directory separate from the *.c -# we also have to delete tests/.libs/libmoduletestplugin_*.gcda -genlcov: - rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda - $(LTP) --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool - LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --show-details glib-lcov.info - @echo "file://$(abs_top_builddir)/glib-lcov/index.html" - -lcov-clean: - -$(LTP) --directory $(top_builddir) -z - -rm -rf glib-lcov.info glib-lcov - -find -name '*.gcda' -print | xargs rm - -# run tests in cwd as part of make check -check-local: test-nonrecursive diff --git a/gtk-doc.make b/gtk-doc.make deleted file mode 100644 index 913aa4f..0000000 --- a/gtk-doc.make +++ /dev/null @@ -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 diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4 deleted file mode 100644 index 9c85635..0000000 --- a/m4/ax_append_compile_flags.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4 deleted file mode 100644 index dd6d8b6..0000000 --- a/m4/ax_append_flag.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4 deleted file mode 100644 index 99b9fa5..0000000 --- a/m4/ax_append_link_flags.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index bd753b3..0000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 deleted file mode 100644 index 03a30ce..0000000 --- a/m4/ax_check_link_flag.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 deleted file mode 100644 index 2751459..0000000 --- a/m4/ax_code_coverage.m4 +++ /dev/null @@ -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])]) -]) diff --git a/m4/ax_compiler_flags.m4 b/m4/ax_compiler_flags.m4 deleted file mode 100644 index ddb0456..0000000 --- a/m4/ax_compiler_flags.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4 deleted file mode 100644 index 916f918..0000000 --- a/m4/ax_compiler_flags_cflags.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_compiler_flags_gir.m4 b/m4/ax_compiler_flags_gir.m4 deleted file mode 100644 index 5b4924a..0000000 --- a/m4/ax_compiler_flags_gir.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_compiler_flags_ldflags.m4 b/m4/ax_compiler_flags_ldflags.m4 deleted file mode 100644 index 976d119..0000000 --- a/m4/ax_compiler_flags_ldflags.m4 +++ /dev/null @@ -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 diff --git a/m4/ax_is_release.m4 b/m4/ax_is_release.m4 deleted file mode 100644 index 9097ddb..0000000 --- a/m4/ax_is_release.m4 +++ /dev/null @@ -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.]) - ]) -]) diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4 deleted file mode 100644 index 17c3eab..0000000 --- a/m4/ax_require_defined.m4 +++ /dev/null @@ -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 diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 deleted file mode 100644 index 2d12f01..0000000 --- a/m4/gtk-doc.m4 +++ /dev/null @@ -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"]) -]) diff --git a/m4/introspection.m4 b/m4/introspection.m4 deleted file mode 100644 index b0ccd68..0000000 --- a/m4/introspection.m4 +++ /dev/null @@ -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]) -]) diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 068ad31..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ - -SUBDIRS = common libmbim-glib mbimcli mbim-proxy diff --git a/src/common/Makefile.am b/src/common/Makefile.am deleted file mode 100644 index f72ce89..0000000 --- a/src/common/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -SUBDIRS = . test - -# common library, built as a noinst -noinst_LTLIBRARIES = libmbim-common.la - -libmbim_common_la_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(MBIM_COMMON_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(top_srcdir)/src/common \ - $(NULL) - -libmbim_common_la_SOURCES = \ - mbim-common.h \ - mbim-common.c \ - $(NULL) - -libmbim_common_la_LDFLAGS = \ - $(WARN_LDFLAGS) \ - $(MBIM_COMMON_LIBS) \ - $(NULL) diff --git a/src/common/test/Makefile.am b/src/common/test/Makefile.am deleted file mode 100644 index eca63c4..0000000 --- a/src/common/test/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -include $(top_srcdir)/gtester.make - -noinst_PROGRAMS = \ - test-common \ - $(NULL) - -test_common_SOURCES = \ - test-common.c \ - $(NULL) - -test_common_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(MBIM_COMMON_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(top_srcdir)/src/common \ - $(NULL) - -test_common_LDADD = \ - $(top_builddir)/src/common/libmbim-common.la \ - $(MBIM_COMMON_LIBS) \ - $(NULL) - -test_common_LDFLAGS = \ - $(WARN_LDFLAGS) \ - $(MBIM_COMMON_LIBS) \ - $(NULL) - -TEST_PROGS += $(noinst_PROGRAMS) diff --git a/src/libmbim-glib/Makefile.am b/src/libmbim-glib/Makefile.am deleted file mode 100644 index 63b5308..0000000 --- a/src/libmbim-glib/Makefile.am +++ /dev/null @@ -1,112 +0,0 @@ - -SUBDIRS = generated . test - -# Core library, built as a noinst -noinst_LTLIBRARIES = libmbim-glib-core.la -libmbim_glib_core_la_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(LIBMBIM_GLIB_CFLAGS) \ - $(GUDEV_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(top_srcdir)/src/common \ - -I$(top_srcdir)/src/libmbim-glib \ - -I$(top_srcdir)/src/libmbim-glib/generated \ - -I$(top_builddir)/src/libmbim-glib \ - -I$(top_builddir)/src/libmbim-glib/generated \ - -DLIBMBIM_GLIB_COMPILATION \ - -DLIBEXEC_PATH=\""$(libexecdir)"\" \ - -DG_LOG_DOMAIN=\"Mbim\" \ - $(NULL) - -libmbim_glib_core_la_SOURCES = \ - mbim-version.h \ - mbim-errors.h \ - mbim-enums.h \ - mbim-helpers.h mbim-helpers.c \ - mbim-utils.h mbim-utils.c \ - mbim-uuid.h mbim-uuid.c \ - mbim-cid.h mbim-cid.c \ - mbim-message-private.h mbim-message.h mbim-message.c \ - mbim-device.h mbim-device.c \ - mbim-compat.h mbim-compat.c \ - mbim-proxy.h mbim-proxy.c \ - mbim-proxy-helpers.h mbim-proxy-helpers.c \ - mbim-net-port-manager.h mbim-net-port-manager.c \ - $(NULL) - -# Final installable library -lib_LTLIBRARIES = libmbim-glib.la - -libmbim_glib_la_SOURCES = libmbim-glib.h - -libmbim_glib_la_LIBADD = \ - libmbim-glib-core.la \ - ${top_builddir}/src/common/libmbim-common.la \ - ${top_builddir}/src/libmbim-glib/generated/libmbim-glib-generated.la \ - $(NULL) - -libmbim_glib_la_LDFLAGS = \ - $(WARN_LDFLAGS) \ - -version-info $(MBIM_GLIB_LT_CURRENT):$(MBIM_GLIB_LT_REVISION):$(MBIM_GLIB_LT_AGE) \ - -export-symbols-regex '^mbim_.*' \ - $(LIBMBIM_GLIB_LIBS) \ - $(GUDEV_LIBS) \ - $(NULL) - -includedir = @includedir@/libmbim-glib -include_HEADERS = \ - libmbim-glib.h \ - mbim-version.h \ - mbim-errors.h \ - mbim-enums.h \ - mbim-utils.h \ - mbim-uuid.h \ - mbim-cid.h \ - mbim-message.h \ - mbim-device.h \ - mbim-compat.h \ - mbim-proxy.h \ - $(NULL) - -EXTRA_DIST = mbim-version.h.in - -# Introspection - -if HAVE_INTROSPECTION - -INTROSPECTION_GIRS = Mbim-1.0.gir -INTROSPECTION_SCANNER_ARGS = --warn-all -INTROSPECTION_COMPILER_ARGS = - -Mbim-1.0.gir: libmbim-glib.la -Mbim_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0 -Mbim_1_0_gir_CFLAGS = $(libmbim_glib_core_la_CPPFLAGS) -Mbim_1_0_gir_LIBS = libmbim-glib.la -Mbim_1_0_gir_EXPORT_PACKAGES = libmbim-glib -Mbim_1_0_gir_SCANNERFLAGS = \ - $(WARN_SCANNERFLAGS) \ - --c-include "libmbim-glib.h" \ - --identifier-prefix=MBIM \ - --identifier-prefix=Mbim \ - --symbol-prefix=mbim_ \ - $(NULL) -Mbim_1_0_gir_FILES = \ - $(include_HEADERS) \ - $(filter-out %.h,$(libmbim_glib_la_SOURCES)) \ - $(filter %.c,$(libmbim_glib_la_SOURCES)) \ - $(wildcard generated/*.h) \ - $(wildcard generated/*.c) \ - $(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) diff --git a/src/libmbim-glib/generated/Makefile.am b/src/libmbim-glib/generated/Makefile.am deleted file mode 100644 index 49b55ec..0000000 --- a/src/libmbim-glib/generated/Makefile.am +++ /dev/null @@ -1,283 +0,0 @@ -noinst_LTLIBRARIES = libmbim-glib-generated.la - -GENERATED_H = \ - mbim-error-types.h \ - mbim-enum-types.h \ - mbim-basic-connect.h \ - mbim-sms.h \ - mbim-ussd.h \ - mbim-auth.h \ - mbim-phonebook.h \ - mbim-stk.h \ - mbim-dss.h \ - mbim-ms-firmware-id.h \ - mbim-ms-host-shutdown.h \ - mbim-ms-sar.h \ - mbim-proxy-control.h \ - mbim-qmi.h \ - mbim-atds.h \ - mbim-intel-firmware-update.h \ - mbim-qdu.h \ - mbim-ms-basic-connect-extensions.h \ - mbim-ms-uicc-low-level-access.h - -GENERATED_C = \ - mbim-error-types.c \ - mbim-error-quarks.c \ - mbim-enum-types.c \ - mbim-basic-connect.c \ - mbim-sms.c \ - mbim-ussd.c \ - mbim-auth.c \ - mbim-phonebook.c \ - mbim-stk.c \ - mbim-dss.c \ - mbim-ms-firmware-id.c \ - mbim-ms-host-shutdown.c \ - mbim-ms-sar.c \ - mbim-proxy-control.c \ - mbim-qmi.c \ - mbim-atds.c \ - mbim-intel-firmware-update.c \ - mbim-qdu.c \ - mbim-ms-basic-connect-extensions.c \ - mbim-ms-uicc-low-level-access.c - -GENERATED_SECTIONS = \ - mbim-basic-connect.sections \ - mbim-sms.sections \ - mbim-ussd.sections \ - mbim-auth.sections \ - mbim-phonebook.sections \ - mbim-stk.sections \ - mbim-dss.sections \ - mbim-ms-firmware-id.sections \ - mbim-ms-host-shutdown.sections \ - mbim-ms-sar.sections \ - mbim-proxy-control.sections \ - mbim-qmi.sections \ - mbim-atds.sections \ - mbim-intel-firmware-update.sections \ - mbim-qdu.sections \ - mbim-ms-basic-connect-extensions.sections \ - mbim-ms-uicc-low-level-access.sections - -# Error types -mbim-error-types.h: $(top_srcdir)/src/libmbim-glib/mbim-errors.h $(top_srcdir)/build-aux/templates/mbim-error-types.h.template - $(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \ - --fhead "#ifndef __LIBMBIM_GLIB_ERROR_TYPES_H__\n#define __LIBMBIM_GLIB_ERROR_TYPES_H__\n#include \"mbim-errors.h\"\n" \ - --template $(top_srcdir)/build-aux/templates/mbim-error-types.h.template \ - --ftail "#endif /* __LIBMBIM_GLIB_ERROR_TYPES_H__ */\n" \ - $(top_srcdir)/src/libmbim-glib/mbim-errors.h > $@ - -mbim-error-types.c: $(top_srcdir)/src/libmbim-glib/mbim-errors.h mbim-error-types.h $(top_srcdir)/build-aux/templates/mbim-error-types.c.template - $(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \ - --fhead "#include \"mbim-errors.h\"\n#include \"mbim-error-types.h\"\n" \ - --template $(top_srcdir)/build-aux/templates/mbim-error-types.c.template \ - $(top_srcdir)/src/libmbim-glib/mbim-errors.h > $@ - -mbim-error-quarks.c: $(top_srcdir)/src/libmbim-glib/mbim-errors.h mbim-error-types.h $(top_srcdir)/build-aux/templates/mbim-error-quarks.c.template - $(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \ - --fhead "#include \"mbim-errors.h\"\n#include \"mbim-error-types.h\"\n" \ - --template $(top_srcdir)/build-aux/templates/mbim-error-quarks.c.template \ - $(top_srcdir)/src/libmbim-glib/mbim-errors.h > $@ - -# Enum/Flag types -ENUMS = \ - $(top_srcdir)/src/libmbim-glib/mbim-uuid.h \ - $(top_srcdir)/src/libmbim-glib/mbim-cid.h \ - $(top_srcdir)/src/libmbim-glib/mbim-message.h \ - $(top_srcdir)/src/libmbim-glib/mbim-enums.h -mbim-enum-types.h: $(ENUMS) $(top_srcdir)/build-aux/templates/mbim-enum-types.h.template - $(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \ - --fhead "#ifndef __LIBMBIM_GLIB_ENUM_TYPES_H__\n#define __LIBMBIM_GLIB_ENUM_TYPES_H__\n#include \"mbim-uuid.h\"\n#include \"mbim-cid.h\"\n#include \"mbim-message.h\"\n#include \"mbim-enums.h\"\n" \ - --template $(top_srcdir)/build-aux/templates/mbim-enum-types.h.template \ - --ftail "#endif /* __LIBMBIM_GLIB_ENUM_TYPES_H__ */\n" \ - $(ENUMS) > $@ - -mbim-enum-types.c: $(ENUMS) mbim-enum-types.h $(top_srcdir)/build-aux/templates/mbim-enum-types.c.template - $(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \ - --fhead "#include \"mbim-enum-types.h\"\n" \ - --template $(top_srcdir)/build-aux/templates/mbim-enum-types.c.template \ - $(ENUMS) > $@ - -# Basic Connect service -mbim-basic-connect.h mbim-basic-connect.c mbim-basic-connect.sections: $(top_srcdir)/data/mbim-service-basic-connect.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-basic-connect.h && \ - rm -f mbim-basic-connect.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-basic-connect.json \ - --output mbim-basic-connect - -# SMS service -mbim-sms.h mbim-sms.c mbim-sms.sections: $(top_srcdir)/data/mbim-service-sms.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-sms.h && \ - rm -f mbim-sms.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-sms.json \ - --output mbim-sms - -# USSD service -mbim-ussd.h mbim-ussd.c mbim-ussd.sections: $(top_srcdir)/data/mbim-service-ussd.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-ussd.h && \ - rm -f mbim-ussd.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-ussd.json \ - --output mbim-ussd - -# Auth service -mbim-auth.h mbim-auth.c mbim-auth.sections: $(top_srcdir)/data/mbim-service-auth.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-auth.h && \ - rm -f mbim-auth.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-auth.json \ - --output mbim-auth - -# Phonebook service -mbim-phonebook.h mbim-phonebook.c mbim-phonebook.sections: $(top_srcdir)/data/mbim-service-phonebook.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-phonebook.h && \ - rm -f mbim-phonebook.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-phonebook.json \ - --output mbim-phonebook - -# STK service -mbim-stk.h mbim-stk.c mbim-stk.sections: $(top_srcdir)/data/mbim-service-stk.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-stk.h && \ - rm -f mbim-stk.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-stk.json \ - --output mbim-stk - -# DSS service -mbim-dss.h mbim-dss.c mbim-dss.sections: $(top_srcdir)/data/mbim-service-dss.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-dss.h && \ - rm -f mbim-dss.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-dss.json \ - --output mbim-dss - -# Microsoft Firmware ID service -mbim-ms-firmware-id.h mbim-ms-firmware-id.c mbim-ms-firmware-id.sections: $(top_srcdir)/data/mbim-service-ms-firmware-id.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-ms-firmware-id.h && \ - rm -f mbim-ms-firmware-id.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-ms-firmware-id.json \ - --output mbim-ms-firmware-id - -# Microsoft Host Shutdown service -mbim-ms-host-shutdown.h mbim-ms-host-shutdown.c mbim-ms-host-shutdown.sections: $(top_srcdir)/data/mbim-service-ms-host-shutdown.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-ms-host-shutdown.h && \ - rm -f mbim-ms-host-shutdown.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-ms-host-shutdown.json \ - --output mbim-ms-host-shutdown - -# Microsoft SAR service -mbim-ms-sar.h mbim-ms-sar.c mbim-ms-sar.sections: $(top_srcdir)/data/mbim-service-ms-sar.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-ms-sar.h && \ - rm -f mbim-ms-sar.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-ms-sar.json \ - --output mbim-ms-sar - -# Proxy Control service -mbim-proxy-control.h mbim-proxy-control.c mbim-proxy-control.sections: $(top_srcdir)/data/mbim-service-proxy-control.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-proxy-control.h && \ - rm -f mbim-proxy-control.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-proxy-control.json \ - --output mbim-proxy-control - -# QMI-over-MBIM service -mbim-qmi.h mbim-qmi.c mbim-qmi.sections: $(top_srcdir)/data/mbim-service-qmi.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-qmi.h && \ - rm -f mbim-qmi.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-qmi.json \ - --output mbim-qmi - -# ATT Device service -mbim-atds.h mbim-atds.c mbim-atds.sections: $(top_srcdir)/data/mbim-service-atds.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-atds.h && \ - rm -f mbim-atds.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-atds.json \ - --output mbim-atds - -# Intel Firmware Update Service -mbim-intel-firmware-update.h mbim-intel-firmware-update.c mbim-intel-firmware-update.sections: $(top_srcdir)/data/mbim-service-intel-firmware-update.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-intel-firmware-update.h && \ - rm -f mbim-intel-firmware-update.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-intel-firmware-update.json \ - --output mbim-intel-firmware-update - -# QDU Service -mbim-qdu.h mbim-qdu.c mbim-qdu.sections: $(top_srcdir)/data/mbim-service-qdu.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-qdu.h && \ - rm -f mbim-qdu.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-qdu.json \ - --output mbim-qdu - -# Microsoft Basic Connect Extensions service -mbim-ms-basic-connect-extensions.h mbim-ms-basic-connect-extensions.c mbim-ms-basic-connect-extensions.sections: $(top_srcdir)/data/mbim-service-ms-basic-connect-extensions.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-ms-basic-connect-extensions.h && \ - rm -f mbim-ms-basic-connect-extensions.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-ms-basic-connect-extensions.json \ - --output mbim-ms-basic-connect-extensions - -# Microsoft UICC Low Level Access service for eSIM -mbim-ms-uicc-low-level-access.h mbim-ms-uicc-low-level-access.c mbim-ms-uicc-low-level-access.sections: $(top_srcdir)/data/mbim-service-ms-uicc-low-level-access.json $(top_srcdir)/build-aux/mbim-codegen/*.py $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen - $(AM_V_GEN) \ - rm -f mbim-ms-uicc-low-level-access.h && \ - rm -f mbim-ms-uicc-low-level-access.c && \ - $(PYTHON) $(top_srcdir)/build-aux/mbim-codegen/mbim-codegen \ - --input $(top_srcdir)/data/mbim-service-ms-uicc-low-level-access.json \ - --output mbim-ms-uicc-low-level-access - -BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C) - -nodist_libmbim_glib_generated_la_SOURCES = \ - $(GENERATED_H) \ - $(GENERATED_C) \ - $(NULL) - -libmbim_glib_generated_la_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(LIBMBIM_GLIB_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src/libmbim-glib \ - -I$(top_builddir)/src/libmbim-glib \ - -DLIBMBIM_GLIB_COMPILATION \ - -DG_LOG_DOMAIN=\"Mbim\" \ - -Wno-unused-function \ - $(NULL) - -libmbim_glib_generated_la_LDFLAGS = \ - $(WARN_LDFLAGS) \ - $(LIBMBIM_GLIB_LIBS) \ - $(NULL) - -includedir = @includedir@/libmbim-glib -nodist_include_HEADERS = $(GENERATED_H) - -CLEANFILES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_SECTIONS) diff --git a/src/libmbim-glib/test/Makefile.am b/src/libmbim-glib/test/Makefile.am deleted file mode 100644 index 17f44d8..0000000 --- a/src/libmbim-glib/test/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -include $(top_srcdir)/gtester.make - -AM_CFLAGS = \ - $(WARN_CFLAGS) \ - $(LIBMBIM_GLIB_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src/common \ - -I$(top_srcdir)/src/libmbim-glib \ - -I$(top_builddir)/src/libmbim-glib \ - -I$(top_builddir)/src/libmbim-glib/generated \ - -DLIBMBIM_GLIB_COMPILATION \ - $(NULL) - -AM_LDFLAGS = \ - $(WARN_LDFLAGS) \ - $(LIBMBIM_GLIB_LIBS) \ - $(NULL) - -noinst_PROGRAMS = \ - test-uuid \ - test-cid \ - test-message \ - test-fragment \ - test-message-parser \ - test-message-builder \ - test-proxy-helpers \ - $(NULL) - -COMMON_LIBS_ADD = \ - $(top_builddir)/src/common/libmbim-common.la \ - $(top_builddir)/src/libmbim-glib/libmbim-glib-core.la \ - $(top_builddir)/src/libmbim-glib/generated/libmbim-glib-generated.la \ - $(NULL) - -test_uuid_SOURCES = test-uuid.c -test_uuid_LDADD = ${COMMON_LIBS_ADD} - -test_cid_SOURCES = test-cid.c -test_cid_LDADD = ${COMMON_LIBS_ADD} - -test_message_SOURCES = test-message.c -test_message_LDADD = ${COMMON_LIBS_ADD} - -test_fragment_SOURCES = test-fragment.c -test_fragment_LDADD = $(COMMON_LIBS_ADD) - -test_message_parser_SOURCES = test-message-parser.c -test_message_parser_LDADD = $(COMMON_LIBS_ADD) - -test_message_builder_SOURCES = test-message-builder.c -test_message_builder_LDADD = $(COMMON_LIBS_ADD) - -test_proxy_helpers_SOURCES = test-proxy-helpers.c -test_proxy_helpers_LDADD = $(COMMON_LIBS_ADD) - -TEST_PROGS += $(noinst_PROGRAMS) diff --git a/src/mbim-proxy/Makefile.am b/src/mbim-proxy/Makefile.am deleted file mode 100644 index 5291072..0000000 --- a/src/mbim-proxy/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ - -libexec_PROGRAMS = mbim-proxy - -mbim_proxy_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(MBIMPROXY_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src/libmbim-glib \ - -I$(top_srcdir)/src/libmbim-glib/generated \ - -I$(top_builddir)/src/libmbim-glib \ - -I$(top_builddir)/src/libmbim-glib/generated \ - $(NULL) - -mbim_proxy_SOURCES = mbim-proxy.c - -mbim_proxy_LDADD = \ - $(top_builddir)/src/libmbim-glib/libmbim-glib.la \ - $(NULL) - -mbim_proxy_LDFLAGS = \ - $(WARN_LDFLAGS) \ - $(MBIMPROXY_LIBS) \ - $(NULL) - -#Install udev rules only if configured with --enable-mbim-username -if MBIM_USERNAME_ENABLED -udevrulesdir = $(UDEV_BASE_DIR)/rules.d -udevrules_DATA = 76-mbim-proxy-device-ownership.rules -endif - -EXTRA_DIST = 76-mbim-proxy-device-ownership.rules.in diff --git a/src/mbimcli/Makefile.am b/src/mbimcli/Makefile.am deleted file mode 100644 index fa3d345..0000000 --- a/src/mbimcli/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ - -bin_PROGRAMS = mbimcli - -mbimcli_CPPFLAGS = \ - $(WARN_CFLAGS) \ - $(MBIMCLI_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src/common \ - -I$(top_srcdir)/src/libmbim-glib \ - -I$(top_builddir)/src/libmbim-glib \ - -I$(top_srcdir)/src/libmbim-glib/generated \ - -I$(top_builddir)/src/libmbim-glib/generated \ - $(NULL) - -mbimcli_SOURCES = \ - mbimcli.h mbimcli.c \ - mbimcli-helpers.h mbimcli-helpers.c \ - mbimcli-basic-connect.c \ - mbimcli-phonebook.c \ - mbimcli-dss.c \ - mbimcli-ms-firmware-id.c \ - mbimcli-ms-host-shutdown.c \ - mbimcli-ms-sar.c \ - mbimcli-atds.c \ - mbimcli-intel-firmware-update.c \ - mbimcli-ms-basic-connect-extensions.c \ - mbimcli-link-management.c \ - $(NULL) - -mbimcli_LDADD = \ - $(top_builddir)/src/common/libmbim-common.la \ - $(top_builddir)/src/libmbim-glib/libmbim-glib.la \ - $(NULL) - -mbimcli_LDFLAGS = \ - $(WARN_LDFLAGS) \ - $(MBIMCLI_LIBS) \ - $(NULL) - -completiondir = $(datadir)/bash-completion/completions - -install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(completiondir) - $(INSTALL_DATA) $(srcdir)/mbimcli-completion $(DESTDIR)$(completiondir)/mbimcli - -uninstall-hook: - rm -f $(DESTDIR)$(completiondir)/mbimcli - -EXTRA_DIST = mbimcli-completion diff --git a/utils/Makefile.am b/utils/Makefile.am deleted file mode 100644 index 7d43362..0000000 --- a/utils/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -bin_SCRIPTS = mbim-network - -mbim-network: mbim-network.in - $(AM_V_GEN) sed -e s,@VERSION\@,$(VERSION), $< > $@.tmp && mv $@.tmp $@ - @chmod a+x $@ - -EXTRA_DIST = mbim-network.in - -CLEANFILES = mbim-network |