aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-02-05 08:38:23 +0100
committerGuido Günther <agx@sigxcpu.org>2014-02-05 08:38:23 +0100
commitdc645b92b9a7db3076ae34986ac219d01677d124 (patch)
tree963a5d6ad150a88a2a8ab6d994d79d539e19383a /configure.ac
parent87bd9deec22af69bb27226254803ac5c63b18d78 (diff)
Imported Upstream version 0.4+git.20100624t180933.6e79d15upstream/0.4+git.20100624t180933.6e79d15
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac95
1 files changed, 64 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac
index aae718e..b763d7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,11 @@
AC_PREREQ(2.52)
-AC_INIT(ModemManager, 0.3, dcbw@redhat.com, ModemManager)
+AC_INIT(ModemManager, 0.4, dcbw@redhat.com, ModemManager)
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
AM_MAINTAINER_MODE
+AC_CONFIG_MACRO_DIR([m4])
+
AC_CONFIG_HEADERS(config.h)
dnl Required programs
@@ -12,6 +14,18 @@ AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
+dnl Define _GNU_SOURCE for various things like strcasestr()
+AC_GNU_SOURCE
+
+dnl
+dnl translation support
+dnl
+GETTEXT_PACKAGE=ModemManager
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
+IT_PROG_INTLTOOL([0.35.0])
+AM_GLIB_GNU_GETTEXT
+
PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.75 glib-2.0 >= 2.18 gmodule-2.0 gobject-2.0)
PKG_CHECK_MODULES(GUDEV, gudev-1.0)
@@ -39,6 +53,22 @@ AC_SUBST(UDEV_BASE_DIR)
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
+# PolicyKit
+AC_ARG_WITH(polkit, AS_HELP_STRING([--with-polkit], [Build with PolicyKit support]))
+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)
+ AC_DEFINE(WITH_POLKIT, 1, [Define if you want to use PolicyKit])
+ AC_SUBST(POLKIT_CFLAGS)
+ AC_SUBST(POLKIT_LIBS)
+ ;;
+ *)
+ with_polkit=no
+ ;;
+esac
+
# 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")
@@ -54,39 +84,10 @@ AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [pat
if test -n "$with_pppd_plugin_dir" ; then
PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
else
- PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.4"
+ PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5"
fi
AC_SUBST(PPPD_PLUGIN_DIR)
-AC_ARG_ENABLE(more-warnings,
-AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]), set_more_warnings="$enableval",set_more_warnings=yes)
-AC_MSG_CHECKING(for more warnings, including -Werror)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- AC_MSG_RESULT(yes)
- CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
-
- for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \
- -Wdeclaration-after-statement -Wstrict-prototypes \
- -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
- -fno-strict-aliasing; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no)
- if test $has_option = no; then
- CFLAGS="$SAVE_CFLAGS"
- fi
- AC_MSG_RESULT($has_option)
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
-fi
-
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
@@ -110,14 +111,42 @@ case $with_tests in
;;
esac
+NM_COMPILER_WARNINGS
+
+
+dnl
+dnl dbus-glib >= 0.86 is required for Location API support
+dnl
+with_location_api=no
+PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.86, with_location_api="yes", with_location_api="no")
+if test x"$with_location_api" = xyes; then
+ AC_DEFINE(LOCATION_API, 1, [Define if you have dbus-glib 0.86 or higher])
+else
+ AC_MSG_WARN([dbus-glib >= 0.86 is required for Location API support])
+fi
+AM_CONDITIONAL(WITH_LOCATION_API, test "x$with_location_api" = "xyes")
+
+dnl
+dnl Distribution version string
+dnl
+AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<mm-dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="")
+if ! test x"$ac_distver" = x""; then
+ AC_DEFINE_UNQUOTED(MM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
+fi
+
AC_CONFIG_FILES([
Makefile
marshallers/Makefile
+libqcdm/Makefile
+libqcdm/src/Makefile
+libqcdm/tests/Makefile
src/Makefile
src/tests/Makefile
plugins/Makefile
test/Makefile
introspection/Makefile
+po/Makefile.in
+policy/Makefile
])
AC_OUTPUT
@@ -130,4 +159,8 @@ echo Building documentation: ${with_docs}
echo
echo Building PPP-enabled tests: ${have_pppd_headers}
echo
+echo Building with PolicyKit support: ${with_polkit}
+echo
+echo Building with Location API support: ${with_location_api}
+echo