diff options
author | Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> | 2013-06-11 10:35:42 -0400 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-02-05 08:38:35 +0100 |
commit | ff30c94ae57db55d37453d4dd28d9eef2cfc5685 (patch) | |
tree | c04f1f7e3de8b1c0a4a08cd46c04be04611bbca1 /configure.ac | |
parent | 995105da294e1a7ea6cf6f640455dd9b73b08f49 (diff) | |
parent | 13ed135b9ae78c692dc359976eb8b54d0a3629b8 (diff) |
Imported Debian patch 0.7.991-1debian/0.7.991-1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 203 |
1 files changed, 154 insertions, 49 deletions
diff --git a/configure.ac b/configure.ac index d842422..f3d82ac 100644 --- a/configure.ac +++ b/configure.ac @@ -1,17 +1,9 @@ AC_PREREQ([2.60]) -dnl The MM version number -m4_define([mm_major_version], [0]) -m4_define([mm_minor_version], [5]) -m4_define([mm_micro_version], [2]) -m4_define([mm_nano_version], [0]) -m4_define([mm_version], - [mm_major_version.mm_minor_version.mm_micro_version.mm_nano_version]) - -AC_INIT([ModemManager],[mm_version],[dcbw@redhat.com],[ModemManager]) +AC_INIT([ModemManager],[0.7.991],[dcbw@redhat.com],[ModemManager]) AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2 -Wno-portability]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AM_MAINTAINER_MODE +AM_MAINTAINER_MODE([enable]) AC_CONFIG_MACRO_DIR([m4]) @@ -30,23 +22,58 @@ LT_PREREQ([2.2]) LT_INIT dnl +dnl Documentation +dnl +GTK_DOC_CHECK(1.0) + +dnl dnl translation support dnl +IT_PROG_INTLTOOL([0.40.0]) + +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.17]) + GETTEXT_PACKAGE=ModemManager AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) -IT_PROG_INTLTOOL([0.35.0]) -PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.86 glib-2.0 >= 2.18 gmodule-2.0 gobject-2.0) +PKG_CHECK_MODULES(MM, + glib-2.0 >= 2.32 + gmodule-2.0 + gobject-2.0 + gio-2.0 + gio-unix-2.0) AC_SUBST(MM_CFLAGS) AC_SUBST(MM_LIBS) -PKG_CHECK_MODULES(GUDEV, gudev-1.0) +PKG_CHECK_MODULES(LIBMM_GLIB, + glib-2.0 >= 2.32 + gobject-2.0 + gio-2.0 + gio-unix-2.0) +AC_SUBST(LIBMM_GLIB_CFLAGS) +AC_SUBST(LIBMM_GLIB_LIBS) + +PKG_CHECK_MODULES(MMCLI, + glib-2.0 >= 2.32 + gobject-2.0 + gio-2.0) +AC_SUBST(MMCLI_CFLAGS) +AC_SUBST(LIBMM_LIBS) + +PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 147) AC_SUBST(GUDEV_CFLAGS) AC_SUBST(GUDEV_LIBS) -AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is])) +# Some required utilities +GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` +AC_SUBST(GLIB_GENMARSHAL) +GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` +AC_SUBST(GLIB_MKENUMS) +# DBus system directory +AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is])) if test -n "$with_dbus_sys_dir" ; then DBUS_SYS_DIR="$with_dbus_sys_dir" else @@ -54,8 +81,8 @@ else fi AC_SUBST(DBUS_SYS_DIR) +# 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 @@ -63,8 +90,13 @@ else fi AC_SUBST(UDEV_BASE_DIR) -GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` -AC_SUBST(GLIB_GENMARSHAL) +# systemd system unit directory +AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [where systemd service files are]), + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +if test "x$with_systemdsystemunitdir" != xno; then + AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir]) +fi +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$SYSTEMD_UNIT_DIR" -a "$SYSTEMD_UNIT_DIR" != xno ]) # PolicyKit AC_ARG_WITH(polkit, AS_HELP_STRING([--with-polkit], [Build with PolicyKit support])) @@ -72,15 +104,11 @@ AM_CONDITIONAL(WITH_POLKIT, test "x$with_polkit" = "xyes") case $with_polkit in yes) with_polkit=yes - PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.95) + PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.97) AC_DEFINE(WITH_POLKIT, 1, [Define if you want to use PolicyKit]) AC_SUBST(POLKIT_CFLAGS) AC_SUBST(POLKIT_LIBS) - # Check for polkit_authority_get_sync() - AC_CHECK_LIB([polkit-gobject-1], [polkit_authority_get_sync], ac_have_pk_auth_get_sync="1", ac_have_pk_auth_get_sync="0") - AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORITY_GET_SYNC, $ac_have_pk_auth_get_sync, [Define if you have a polkit with polkit_authority_get_sync()]) - AM_GLIB_GNU_GETTEXT ;; *) @@ -88,12 +116,6 @@ case $with_polkit in ;; esac -dnl -dnl Checks for new dbus-glib property access function -dnl -AC_CHECK_LIB([dbus-glib-1], [dbus_glib_global_set_disable_legacy_property_access], ac_have_dg_prop="1", ac_have_dg_prop="0") -AC_DEFINE_UNQUOTED(HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS, $ac_have_dg_prop, [Define if you have a dbus-glib with dbus_glib_global_set_disable_legacy_property_access()]) - # PPPD AC_CHECK_HEADERS(pppd/pppd.h, have_pppd_headers="yes", have_pppd_headers="no") AM_CONDITIONAL(HAVE_PPPD_H, test "x$have_pppd_headers" = "xyes") @@ -113,14 +135,6 @@ else fi AC_SUBST(PPPD_PLUGIN_DIR) -AC_ARG_WITH(docs, AC_HELP_STRING([--with-docs], [Build ModemManager documentation])) -AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes") -case $with_docs in - yes) ;; - *) - with_docs=no - ;; -esac dnl dnl Tests @@ -136,6 +150,70 @@ case $with_tests in ;; esac +dnl +dnl MBIM support (auto by default) +dnl +AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=auto]) +if (test "${with_mbim}" != "no"); then + PKG_CHECK_MODULES(MBIM, + [mbim-glib >= 1.0.0], + [have_libmbim_glib=yes], + [have_libmbim_glib=no]) + AC_SUBST(MBIM_CFLAGS) + AC_SUBST(MBIM_LIBS) + + if (test "${have_libmbim_glib}" = "no"); then + if (test "${with_mbim}" = "yes"); then + AC_MSG_ERROR([Couldn't find libmbim-glib]) + else + with_mbim="no" + fi + else + with_mbim="yes" + fi +fi + +if (test "${with_mbim}" = "yes"); then + AC_DEFINE(WITH_MBIM, 1, [Define if you want MBIM support]) +fi +AM_CONDITIONAL(WITH_MBIM, test "${with_mbim}" = "yes") + +dnl +dnl QMI support (enabled by default) +dnl +AC_ARG_WITH(qmi, AS_HELP_STRING([--without-qmi], [Build without QMI support]), [], [with_qmi=yes]) +AM_CONDITIONAL(WITH_QMI, test "x$with_qmi" = "xyes") +case $with_qmi in + yes) + PKG_CHECK_MODULES(QMI, qmi-glib) + AC_DEFINE(WITH_QMI, 1, [Define if you want QMI support]) + AC_SUBST(QMI_CFLAGS) + AC_SUBST(QMI_LIBS) + ;; + *) + with_qmi=no + ;; +esac + +dnl +dnl Newest QMI commands +dnl +AC_ARG_WITH(newest_qmi_commands, AS_HELP_STRING([--with-newest-qmi-commands], [Try to avoid deprecated QMI commands])) +AM_CONDITIONAL(WITH_NEWEST_QMI_COMMANDS, test "x$with_newest_qmi_commands" = "xyes") +case $with_newest_qmi_commands in + yes) + if test "x$with_qmi" = "xno" ; then + AC_ERROR([Cannot enable newest QMI commands if QMI support is disabled]) + fi + + AC_DEFINE(WITH_NEWEST_QMI_COMMANDS, 1, [Define if we enable new QMI commands support]) + with_newest_qmi_commands=yes + ;; + *) + with_newest_qmi_commands=no + ;; +esac + NM_COMPILER_WARNINGS @@ -149,32 +227,59 @@ fi # Not building protocol libs standalone AM_CONDITIONAL(QCDM_STANDALONE, test "yes" = "no") +AM_CONDITIONAL(WMC_STANDALONE, test "yes" = "no") AC_CONFIG_FILES([ Makefile -marshallers/Makefile +data/Makefile +data/ModemManager.pc +data/mm-glib.pc +data/org.freedesktop.ModemManager1.policy +include/Makefile +build-aux/Makefile libqcdm/Makefile libqcdm/src/Makefile libqcdm/tests/Makefile +libwmc/Makefile +libwmc/src/Makefile +libwmc/tests/Makefile src/Makefile src/tests/Makefile plugins/Makefile +uml290/Makefile test/Makefile introspection/Makefile po/Makefile.in -policy/Makefile +docs/Makefile +docs/man/Makefile +docs/reference/Makefile +docs/reference/api/Makefile +docs/reference/api/version.xml +docs/reference/libmm-glib/Makefile +docs/reference/libmm-glib/version.xml +libmm-glib/Makefile +libmm-glib/generated/Makefile +libmm-glib/tests/Makefile +cli/Makefile ]) AC_OUTPUT -echo -echo Building with D-Bus system directory: ${DBUS_SYS_DIR} -echo -echo Building with udev base directory: ${UDEV_BASE_DIR} -echo -echo Building documentation: ${with_docs} -echo -echo Building PPP-enabled tests: ${have_pppd_headers} -echo -echo Building with PolicyKit support: ${with_polkit} -echo +echo " + ModemManager $VERSION + ============================================== + + compiler: ${CC} + cflags: ${CFLAGS} + Maintainer mode: ${USE_MAINTAINER_MODE} + + D-Bus system directory: ${DBUS_SYS_DIR} + udev base directory: ${UDEV_BASE_DIR} + systemd unit directory: ${with_systemdsystemunitdir} + PPP-enabled tests: ${have_pppd_headers} + PolicyKit support: ${with_polkit} + Documentation: ${enable_gtk_doc} + MBIM support: ${with_mbim} + QMI support: ${with_qmi} + Newest QMI commands: ${with_newest_qmi_commands} +" |