diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-22T19·30+0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-22T19·30+0000 |
commit | 6b5f89f2cf954cae1623a6cd3a8f7eb78e19e85b (patch) | |
tree | 8edf557234e200d60daa9d472668ed89156d1877 | |
parent | 754c05ed6c3b88f8180ae8686e030b5b02b23d43 (diff) |
Drop the dependency on Automake
-rw-r--r-- | Makefile.config.in | 2 | ||||
-rw-r--r-- | Makefile.lib | 13 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/libstore/Makefile.new | 2 | ||||
-rw-r--r-- | src/libstore/globals.cc | 2 | ||||
-rw-r--r-- | src/libutil/Makefile.new | 4 |
6 files changed, 18 insertions, 17 deletions
diff --git a/Makefile.config.in b/Makefile.config.in index e5a6f4c68d8b..45fb74c91184 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -2,6 +2,8 @@ CC = @CC@ CFLAGS = @CFLAGS@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ bindir = @bindir@ diff --git a/Makefile.lib b/Makefile.lib index f2eea7ac81d2..6c59c759695e 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -1,6 +1,13 @@ default: all +# Include Autoconf variables. +Makefile.config: Makefile.config.in + ./config.status + +include Makefile.config + + # Include all sub-Makefiles. define include_sub_makefile = d := $$(patsubst %/, %, $$(dir $(1))) @@ -10,12 +17,6 @@ endef $(foreach mf, $(SUBS), $(eval $(call include_sub_makefile, $(mf)))) -# Include Autoconf variables. -Makefile.config: Makefile.config.in - ./config.status - -include Makefile.config - clean_list := dist_files := diff --git a/configure.ac b/configure.ac index c64766a2d244..5ecf2d952959 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,6 @@ AC_INIT(nix, m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX])) AC_CONFIG_SRCDIR(README) AC_CONFIG_AUX_DIR(config) -AM_INIT_AUTOMAKE([dist-bzip2 foreign]) - -AC_DEFINE_UNQUOTED(NIX_VERSION, ["$VERSION"], [Nix version.]) AC_PROG_SED @@ -252,8 +249,8 @@ AC_DEFINE_UNQUOTED(OPENSSL_PATH, ["$openssl_prog"], [Path of the OpenSSL binary] PKG_CHECK_MODULES([OPENSSL], [libcrypto], [AC_DEFINE([HAVE_OPENSSL], [1], [Whether to use OpenSSL.]) CXXFLAGS="$OPENSSL_CFLAGS $CXXFLAGS" - have_openssl=1], [true]) -AM_CONDITIONAL(HAVE_OPENSSL, test "$have_openssl" = 1) + have_openssl=1], [have_openssl=]) +AC_SUBST(HAVE_OPENSSL, [$have_openssl]) # Look for libbz2, a required dependency. @@ -319,7 +316,6 @@ if test "$enable_shared" = no; then # Perl bindings require shared libraries. perlbindings=no fi -AM_CONDITIONAL(PERL_BINDINGS, test "$perlbindings" = "yes") AC_SUBST(perlbindings) AC_MSG_RESULT($perlbindings) @@ -327,7 +323,7 @@ AC_MSG_RESULT($perlbindings) 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) -AM_CONDITIONAL(INIT_STATE, test "$init_state" = "yes") +#AM_CONDITIONAL(INIT_STATE, test "$init_state" = "yes") # Setuid installations. @@ -361,7 +357,7 @@ fi AC_SUBST(tarFlags) -AM_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile src/Makefile src/boost/Makefile diff --git a/src/libstore/Makefile.new b/src/libstore/Makefile.new index 2eb34b7b4252..0a384e0b1d44 100644 --- a/src/libstore/Makefile.new +++ b/src/libstore/Makefile.new @@ -16,4 +16,4 @@ libstore_CXXFLAGS = \ -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \ -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \ -DNIX_BIN_DIR=\"$(bindir)\" \ - -DNIX_VERSION=\"$(PACKAGE_VERSION)\" + -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 1ecc629cb55f..68add1982f43 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -212,7 +212,7 @@ Settings::SettingsMap Settings::getOverrides() } -const string nixVersion = NIX_VERSION; +const string nixVersion = PACKAGE_VERSION; } diff --git a/src/libutil/Makefile.new b/src/libutil/Makefile.new index 88d43f0aeb62..7871a4ddb8c8 100644 --- a/src/libutil/Makefile.new +++ b/src/libutil/Makefile.new @@ -4,7 +4,9 @@ libutil_DIR := $(d) libutil_SOURCES = util.cc hash.cc serialise.cc archive.cc xml-writer.cc affinity.cc -ifneq ($(HAVE_OPENSSL), 1) +ifeq ($(HAVE_OPENSSL), 1) +libutil_LDFLAGS = $(OPENSSL_LIBS) +else libutil_SOURCES += md5.c sha1.c sha256.c endif |