[folks] Bug 629666 — libfolks should not hard autodetect libxml
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Bug 629666 — libfolks should not hard autodetect libxml
- Date: Sat, 18 Sep 2010 15:50:00 +0000 (UTC)
commit 7b37bbfcca7c619a321617d8e007d98886e915a3
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Sep 14 17:25:03 2010 +0100
Bug 629666 â?? libfolks should not hard autodetect libxml
Add an --enable-import-tool configure option which requires libxml2 when
passed, doesn't require it when --disable-import-tool is passed, and builds
the tool if possible (but doesn't require libxml2) when nothing's passed.
Closes: bgo#629666
configure.ac | 15 ++++++++++++---
tools/Makefile.am | 2 +-
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index daa886b..f56a847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,8 +124,17 @@ AC_SUBST([BACKEND_DIR])
# Tools
# -----------------------------------------------------------
-PKG_CHECK_MODULES(LIBXML, libxml-2.0, [have_libxml=yes], [have_libxml=no])
-AM_CONDITIONAL([HAVE_LIBXML], [test "$have_libxml" = "yes"])
+AC_ARG_ENABLE([import-tool],
+ AS_HELP_STRING([--enable-import-tool],
+ [Enable building the meta-contact import tool]),
+ [enable_import_tool=$enableval with_import_tool=$enableval],
+ [enable_import_tool=maybe with_import_tool=no])
+AS_IF([test "$enable_import_tool" != "no"],
+ [PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
+ [with_import_tool=yes], [with_import_tool=no])])
+AS_IF([test "$enable_import_tool" = "yes" -a "$with_import_tool" = "no"],
+ [AC_MSG_ERROR([Import tool explicitly enabled, but libxml2 not found])])
+AM_CONDITIONAL([ENABLE_IMPORT_TOOL], [test "$with_import_tool" = "yes"])
# -----------------------------------------------------------
# Documentation
@@ -227,7 +236,7 @@ Configure summary:
Bugreporting URL............: ${PACKAGE_BUGREPORT}
Documentation...............: ${enable_docs}
Tests.......................: ${have_tp_glib_for_tests}
- Import tool.................: ${have_libxml}
+ Import tool.................: ${with_import_tool}
"
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 5c38564..a538a99 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,4 +1,4 @@
-if HAVE_LIBXML
+if ENABLE_IMPORT_TOOL
bin_PROGRAMS = folks-import
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]