forked from lix-project/lix
Check for libreadline
This commit is contained in:
parent
a1a5e63e14
commit
73bba12d8b
|
@ -5,6 +5,7 @@ CXX = @CXX@
|
||||||
CXXFLAGS = @CXXFLAGS@
|
CXXFLAGS = @CXXFLAGS@
|
||||||
ENABLE_S3 = @ENABLE_S3@
|
ENABLE_S3 = @ENABLE_S3@
|
||||||
HAVE_SODIUM = @HAVE_SODIUM@
|
HAVE_SODIUM = @HAVE_SODIUM@
|
||||||
|
HAVE_READLINE = @HAVE_READLINE@
|
||||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
|
|
@ -196,6 +196,14 @@ if test "$gc" = yes; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check for readline, needed by "nix repl".
|
||||||
|
AX_LIB_READLINE
|
||||||
|
if test "$ax_cv_lib_readline" != "no"; then
|
||||||
|
have_readline=1
|
||||||
|
fi
|
||||||
|
AC_SUBST(HAVE_READLINE, [$have_readline])
|
||||||
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],
|
AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state],
|
||||||
[do not initialise DB etc. in `make install']),
|
[do not initialise DB etc. in `make install']),
|
||||||
init_state=$enableval, init_state=yes)
|
init_state=$enableval, init_state=yes)
|
||||||
|
|
|
@ -20,9 +20,11 @@ Requires: curl
|
||||||
Requires: bzip2
|
Requires: bzip2
|
||||||
Requires: gzip
|
Requires: gzip
|
||||||
Requires: xz
|
Requires: xz
|
||||||
|
Requires: readline
|
||||||
BuildRequires: bzip2-devel
|
BuildRequires: bzip2-devel
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
|
BuildRequires: readline-devel
|
||||||
|
|
||||||
# Hack to make that shitty RPM scanning hack shut up.
|
# Hack to make that shitty RPM scanning hack shut up.
|
||||||
Provides: perl(Nix::SSH)
|
Provides: perl(Nix::SSH)
|
||||||
|
|
|
@ -299,7 +299,7 @@ let
|
||||||
src = jobs.tarball;
|
src = jobs.tarball;
|
||||||
diskImage = (diskImageFun vmTools.diskImageFuns)
|
diskImage = (diskImageFun vmTools.diskImageFuns)
|
||||||
{ extraPackages =
|
{ extraPackages =
|
||||||
[ "sqlite" "sqlite-devel" "bzip2-devel" "emacs" "libcurl-devel" "openssl-devel" "xz-devel" ]
|
[ "sqlite" "sqlite-devel" "bzip2-devel" "emacs" "libcurl-devel" "openssl-devel" "xz-devel" "readline-devel" ]
|
||||||
++ extraPackages; };
|
++ extraPackages; };
|
||||||
memSize = 1024;
|
memSize = 1024;
|
||||||
meta.schedulingPriority = 50;
|
meta.schedulingPriority = 50;
|
||||||
|
@ -321,14 +321,14 @@ let
|
||||||
src = jobs.tarball;
|
src = jobs.tarball;
|
||||||
diskImage = (diskImageFun vmTools.diskImageFuns)
|
diskImage = (diskImageFun vmTools.diskImageFuns)
|
||||||
{ extraPackages =
|
{ extraPackages =
|
||||||
[ "libsqlite3-dev" "libbz2-dev" "libcurl-dev" "libcurl3-nss" "libssl-dev" "liblzma-dev" ]
|
[ "libsqlite3-dev" "libbz2-dev" "libcurl-dev" "libcurl3-nss" "libssl-dev" "liblzma-dev" "libreadline-dev" ]
|
||||||
++ extraPackages; };
|
++ extraPackages; };
|
||||||
memSize = 1024;
|
memSize = 1024;
|
||||||
meta.schedulingPriority = 50;
|
meta.schedulingPriority = 50;
|
||||||
postInstall = "make installcheck";
|
postInstall = "make installcheck";
|
||||||
configureFlags = "--sysconfdir=/etc";
|
configureFlags = "--sysconfdir=/etc";
|
||||||
debRequires =
|
debRequires =
|
||||||
[ "curl" "libsqlite3-0" "libbz2-1.0" "bzip2" "xz-utils" "libssl1.0.0" "liblzma5" ]
|
[ "curl" "libsqlite3-0" "libbz2-1.0" "bzip2" "xz-utils" "libssl1.0.0" "liblzma5" "libreadline6" ]
|
||||||
++ extraDebPackages;
|
++ extraDebPackages;
|
||||||
debMaintainer = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
|
debMaintainer = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
|
|
@ -35,7 +35,7 @@ with import <nixpkgs> {};
|
||||||
shellHook =
|
shellHook =
|
||||||
''
|
''
|
||||||
export prefix=$(pwd)/inst
|
export prefix=$(pwd)/inst
|
||||||
configureFlags+=" --prefix=prefix"
|
configureFlags+=" --prefix=$prefix"
|
||||||
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:$PKG_CONFIG_PATH
|
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
PATH=$prefix/bin:$PATH
|
PATH=$prefix/bin:$PATH
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -6,6 +6,8 @@ nix_SOURCES := $(wildcard $(d)/*.cc)
|
||||||
|
|
||||||
nix_LIBS = libexpr libmain libstore libutil libformat
|
nix_LIBS = libexpr libmain libstore libutil libformat
|
||||||
|
|
||||||
nix_LDFLAGS = -lreadline
|
ifeq ($(HAVE_READLINE), 1)
|
||||||
|
nix_LDFLAGS += -lreadline
|
||||||
|
endif
|
||||||
|
|
||||||
$(eval $(call install-symlink, nix, $(bindir)/nix-hash))
|
$(eval $(call install-symlink, nix, $(bindir)/nix-hash))
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#if HAVE_LIBREADLINE
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
@ -726,3 +728,5 @@ struct CmdRepl : StoreCommand
|
||||||
static RegisterCommand r1(make_ref<CmdRepl>());
|
static RegisterCommand r1(make_ref<CmdRepl>());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue