* Use pkgconfig to locate the Boehm GC (as suggested by Ludo), if

--enable-gc is given.
This commit is contained in:
Eelco Dolstra 2010-10-29 14:00:47 +00:00
parent 14fbf85380
commit 3d71c8013e
2 changed files with 10 additions and 10 deletions

View file

@ -251,16 +251,16 @@ AC_SUBST(bzip2_bin_test)
# Whether to use the Boehm garbage collector. # Whether to use the Boehm garbage collector.
AC_ARG_WITH(boehm-gc, AC_HELP_STRING([--with-boehm-gc=PATH], AC_ARG_ENABLE(gc, AC_HELP_STRING([--enable-gc],
[prefix of the Boehm GC package to enable garbage collection in the Nix expression evaluator]), [enable garbage collection in the Nix expression evaluator (requires Boehm GC)]),
boehmgc=$withval, boehmgc=) gc=$enableval, gc=)
if test -n "$boehmgc"; then if test -n "$gc"; then
PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
boehmgc_lib="-L$boehmgc/lib -lgc" 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.]) AC_DEFINE(HAVE_BOEHMGC, 1, [Whether to use the Boehm garbage collector.])
fi fi
AC_SUBST(boehmgc_lib) AC_SUBST(boehmgc_lib)
AC_SUBST(boehmgc_include)
AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state], AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],

View file

@ -19,7 +19,7 @@ let
buildInputs = buildInputs =
[ curl bison24 flex2535 perl libxml2 libxslt w3m bzip2 [ curl bison24 flex2535 perl libxml2 libxslt w3m bzip2
tetex dblatex nukeReferences tetex dblatex nukeReferences pkgconfig
]; ];
configureFlags = '' configureFlags = ''
@ -67,12 +67,12 @@ let
name = "nix"; name = "nix";
src = tarball; src = tarball;
buildInputs = [ curl perl bzip2 openssl ]; buildInputs = [ curl perl bzip2 openssl pkgconfig boehmgc ];
configureFlags = '' configureFlags = ''
--disable-init-state --disable-init-state
--with-bzip2=${bzip2} --with-bzip2=${bzip2}
--with-boehm-gc=${boehmgc} --enable-gc
''; '';
}; };