From 7b37bbfcca7c619a321617d8e007d98886e915a3 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 14 Sep 2010 17:25:03 +0100 Subject: [PATCH] =?utf8?q?Bug=20629666=20=E2=80=94=20libfolks=20should=20n?= =?utf8?q?ot=20hard=20autodetect=20libxml?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 -- 2.7.4