[Nix-dev] [PATCH 2/2] Do not require pkg-config to be installed.

Giulio Eulisse Giulio.Eulisse at cern.ch
Wed Mar 16 23:08:44 CET 2011


---
 configure.ac |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
-------------- next part --------------
diff --git a/configure.ac b/configure.ac
index 11382ab..cd3072d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,12 +266,15 @@ AC_SUBST(sqlite_bin)
 # Whether to use the Boehm garbage collector.
 AC_ARG_ENABLE(gc, AC_HELP_STRING([--enable-gc],
   [enable garbage collection in the Nix expression evaluator (requires Boehm GC)]),
-  gc=$enableval, gc=)
-if test -n "$gc"; then
-  PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
-  CXXFLAGS="$BDW_GC_CFLAGS $CXXFLAGS"
+  [ gc=yes])
+if test "$gc" = yes; then
+  CXXFLAGS="`pkg-config --cflags bdw-gc` $CXXFLAGS"
+  BDW_GC_LIBS="`pkg-config --libs bdw-gc`"
   AC_DEFINE(HAVE_BOEHMGC, 1, [Whether to use the Boehm garbage collector.])
+else
+  BDW_GC_LIBS=""
 fi
+AC_SUBST(BDW_GC_LIBS)
 
 
 AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],


More information about the nix-dev mailing list