Author: eelco
Date: Fri Oct 29 14:00:47 2010
New Revision: 24525
URL: https://svn.nixos.org/websvn/nix/?rev=24525&sc=1

Log:
* Use pkgconfig to locate the Boehm GC (as suggested by Ludo), if
  --enable-gc is given.

Modified:
   nix/branches/gc/configure.ac
   nix/branches/gc/release.nix

Modified: nix/branches/gc/configure.ac
==============================================================================
--- nix/branches/gc/configure.ac        Fri Oct 29 13:11:50 2010        (r24524)
+++ nix/branches/gc/configure.ac        Fri Oct 29 14:00:47 2010        (r24525)
@@ -251,17 +251,17 @@
 
 
 # Whether to use the Boehm garbage collector.
-AC_ARG_WITH(boehm-gc, AC_HELP_STRING([--with-boehm-gc=PATH],
-  [prefix of the Boehm GC package to enable garbage collection in the Nix 
expression evaluator]),
-  boehmgc=$withval, boehmgc=)
-if test -n "$boehmgc"; then
+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])
   boehmgc_lib="-L$boehmgc/lib -lgc"
-  CXXFLAGS="-I$boehmgc/include $CXXFLAGS"
+  CXXFLAGS="$BDW_GC_CFLAGS $CXXFLAGS"
   AC_DEFINE(HAVE_BOEHMGC, 1, [Whether to use the Boehm garbage collector.])
 fi
 AC_SUBST(boehmgc_lib)
-AC_SUBST(boehmgc_include)
-  
+
 
 AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],
   [do not initialise DB etc. in `make install']),

Modified: nix/branches/gc/release.nix
==============================================================================
--- nix/branches/gc/release.nix Fri Oct 29 13:11:50 2010        (r24524)
+++ nix/branches/gc/release.nix Fri Oct 29 14:00:47 2010        (r24525)
@@ -19,7 +19,7 @@
 
         buildInputs =
           [ curl bison24 flex2535 perl libxml2 libxslt w3m bzip2
-            tetex dblatex nukeReferences
+            tetex dblatex nukeReferences pkgconfig
           ];
 
         configureFlags = ''
@@ -67,12 +67,12 @@
         name = "nix";
         src = tarball;
 
-        buildInputs = [ curl perl bzip2 openssl ];
+        buildInputs = [ curl perl bzip2 openssl pkgconfig boehmgc ];
 
         configureFlags = ''
           --disable-init-state
           --with-bzip2=${bzip2}
-          --with-boehm-gc=${boehmgc}
+          --enable-gc
         '';
       };
 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to