build: Add option for disabling provisioning support
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 10 Jan 2012 15:27:26 +0000 (07:27 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 10 Jan 2012 15:27:26 +0000 (07:27 -0800)
configure.ac

index 4115e34..3bffbb9 100644 (file)
@@ -197,14 +197,21 @@ AC_SUBST(BLUEZ_CFLAGS)
 AC_SUBST(BLUEZ_LIBS)
 AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
 
-AC_MSG_CHECKING([for mobile-broadband-provider-info])
-PKG_CHECK_EXISTS(mobile-broadband-provider-info,
-       _PKG_CONFIG(PROVIDER_DATABASE, [variable=database],
+AC_ARG_ENABLE(provision, AC_HELP_STRING([--disable-provision],
+                               [disable provisioning suport]),
+                                       [enable_provision=${enableval}])
+if (test "${enable_provision}" != "no"); then
+       AC_MSG_CHECKING([for mobile-broadband-provider-info])
+       PKG_CHECK_EXISTS(mobile-broadband-provider-info,
+               _PKG_CONFIG(PROVIDER_DATABASE, [variable=database],
                                        [mobile-broadband-provider-info])
-       AC_DEFINE_UNQUOTED(PROVIDER_DATABASE, "$pkg_cv_PROVIDER_DATABASE",
+               AC_DEFINE_UNQUOTED(PROVIDER_DATABASE,
+                                       "$pkg_cv_PROVIDER_DATABASE",
                                        [Mobile provider database])
-       AC_MSG_RESULT([yes]),
-       AC_MSG_RESULT([no]))
+               AC_MSG_RESULT([yes]),
+               AC_MSG_ERROR(Mobile broadband provider database is required))
+fi
+AM_CONDITIONAL(PROVISION, test "${enable_provision}" != "no")
 
 AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
                        [don't install configuration and data files]),