Check for libreadline
This commit is contained in:
		
							parent
							
								
									a1a5e63e14
								
							
						
					
					
						commit
						73bba12d8b
					
				
					 7 changed files with 22 additions and 5 deletions
				
			
		|  | @ -5,6 +5,7 @@ CXX = @CXX@ | |||
| CXXFLAGS = @CXXFLAGS@ | ||||
| ENABLE_S3 = @ENABLE_S3@ | ||||
| HAVE_SODIUM = @HAVE_SODIUM@ | ||||
| HAVE_READLINE = @HAVE_READLINE@ | ||||
| LIBCURL_LIBS = @LIBCURL_LIBS@ | ||||
| OPENSSL_LIBS = @OPENSSL_LIBS@ | ||||
| PACKAGE_NAME = @PACKAGE_NAME@ | ||||
|  |  | |||
|  | @ -196,6 +196,14 @@ if test "$gc" = yes; then | |||
| 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], | ||||
|   [do not initialise DB etc. in `make install']), | ||||
|   init_state=$enableval, init_state=yes) | ||||
|  |  | |||
|  | @ -20,9 +20,11 @@ Requires: curl | |||
| Requires: bzip2 | ||||
| Requires: gzip | ||||
| Requires: xz | ||||
| Requires: readline | ||||
| BuildRequires: bzip2-devel | ||||
| BuildRequires: sqlite-devel | ||||
| BuildRequires: libcurl-devel | ||||
| BuildRequires: readline-devel | ||||
| 
 | ||||
| # Hack to make that shitty RPM scanning hack shut up. | ||||
| Provides: perl(Nix::SSH) | ||||
|  |  | |||
|  | @ -299,7 +299,7 @@ let | |||
|       src = jobs.tarball; | ||||
|       diskImage = (diskImageFun vmTools.diskImageFuns) | ||||
|         { 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; }; | ||||
|       memSize = 1024; | ||||
|       meta.schedulingPriority = 50; | ||||
|  | @ -321,14 +321,14 @@ let | |||
|       src = jobs.tarball; | ||||
|       diskImage = (diskImageFun vmTools.diskImageFuns) | ||||
|         { 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; }; | ||||
|       memSize = 1024; | ||||
|       meta.schedulingPriority = 50; | ||||
|       postInstall = "make installcheck"; | ||||
|       configureFlags = "--sysconfdir=/etc"; | ||||
|       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; | ||||
|       debMaintainer = "Eelco Dolstra <eelco.dolstra@logicblox.com>"; | ||||
|       doInstallCheck = true; | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ with import <nixpkgs> {}; | |||
|   shellHook = | ||||
|     '' | ||||
|       export prefix=$(pwd)/inst | ||||
|       configureFlags+=" --prefix=prefix" | ||||
|       configureFlags+=" --prefix=$prefix" | ||||
|       PKG_CONFIG_PATH=$prefix/lib/pkgconfig:$PKG_CONFIG_PATH | ||||
|       PATH=$prefix/bin:$PATH | ||||
|     ''; | ||||
|  |  | |||
|  | @ -6,6 +6,8 @@ nix_SOURCES := $(wildcard $(d)/*.cc) | |||
| 
 | ||||
| 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)) | ||||
|  |  | |||
|  | @ -1,3 +1,5 @@ | |||
| #if HAVE_LIBREADLINE | ||||
| 
 | ||||
| #include <iostream> | ||||
| #include <cstdlib> | ||||
| 
 | ||||
|  | @ -726,3 +728,5 @@ struct CmdRepl : StoreCommand | |||
| static RegisterCommand r1(make_ref<CmdRepl>()); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue