aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-04-27 13:00:51 -0500
committerDan Williams <dcbw@redhat.com>2011-04-27 13:00:51 -0500
commit0299cf51c4cf587f79771fe219c6154bf0d0139e (patch)
treeef36f66a7a1bc85c4fdcb6c7f08fafaf6ed1916e
parentdc89c0a42d826fc3302b3d790d5161945ff7078f (diff)
build: don't require intltool unless --with-polkit=yes
-rwxr-xr-xautogen.sh14
-rw-r--r--configure.ac11
2 files changed, 16 insertions, 9 deletions
diff --git a/autogen.sh b/autogen.sh
index 62614d94..4164dd65 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -13,9 +13,19 @@ PKG_NAME=ModemManager
exit 1
}
+polkit="false"
+args=""
+while (( "$#" )); do
+ if [ "$1" == "--with-polkit=yes" ]; then
+ polkit="true"
+ fi
+ args="$args $1"
+ shift
+done
+
(cd $srcdir;
autoreconf --install --symlink &&
- intltoolize --force &&
+ ((eval "$polkit" && intltoolize --force) || true) &&
autoreconf &&
- ./configure --enable-maintainer-mode $@
+ ./configure --enable-maintainer-mode $args
)
diff --git a/configure.ac b/configure.ac
index 436461f3..4f7dabd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,14 +21,9 @@ dnl Initialize libtool
LT_PREREQ([2.2])
LT_INIT
-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.86 glib-2.0 >= 2.18 gmodule-2.0 gobject-2.0)
@@ -71,6 +66,10 @@ case $with_polkit in
# 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()])
+
+ # translation support for policy files
+ IT_PROG_INTLTOOL([0.35.0])
+ AM_GLIB_GNU_GETTEXT
;;
*)
with_polkit=no
@@ -163,6 +162,4 @@ 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