forked from lix-project/lix
Drop the dependency on Automake
This commit is contained in:
parent
754c05ed6c
commit
6b5f89f2cf
|
@ -2,6 +2,8 @@ CC = @CC@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
CXXFLAGS = @CXXFLAGS@
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
HAVE_OPENSSL = @HAVE_OPENSSL@
|
||||||
|
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
|
|
13
Makefile.lib
13
Makefile.lib
|
@ -1,6 +1,13 @@
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
|
|
||||||
|
# Include Autoconf variables.
|
||||||
|
Makefile.config: Makefile.config.in
|
||||||
|
./config.status
|
||||||
|
|
||||||
|
include Makefile.config
|
||||||
|
|
||||||
|
|
||||||
# Include all sub-Makefiles.
|
# Include all sub-Makefiles.
|
||||||
define include_sub_makefile =
|
define include_sub_makefile =
|
||||||
d := $$(patsubst %/, %, $$(dir $(1)))
|
d := $$(patsubst %/, %, $$(dir $(1)))
|
||||||
|
@ -10,12 +17,6 @@ endef
|
||||||
$(foreach mf, $(SUBS), $(eval $(call include_sub_makefile, $(mf))))
|
$(foreach mf, $(SUBS), $(eval $(call include_sub_makefile, $(mf))))
|
||||||
|
|
||||||
|
|
||||||
# Include Autoconf variables.
|
|
||||||
Makefile.config: Makefile.config.in
|
|
||||||
./config.status
|
|
||||||
|
|
||||||
include Makefile.config
|
|
||||||
|
|
||||||
clean_list :=
|
clean_list :=
|
||||||
dist_files :=
|
dist_files :=
|
||||||
|
|
||||||
|
|
12
configure.ac
12
configure.ac
|
@ -1,9 +1,6 @@
|
||||||
AC_INIT(nix, m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX]))
|
AC_INIT(nix, m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX]))
|
||||||
AC_CONFIG_SRCDIR(README)
|
AC_CONFIG_SRCDIR(README)
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(NIX_VERSION, ["$VERSION"], [Nix version.])
|
|
||||||
|
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
|
|
||||||
|
@ -252,8 +249,8 @@ AC_DEFINE_UNQUOTED(OPENSSL_PATH, ["$openssl_prog"], [Path of the OpenSSL binary]
|
||||||
PKG_CHECK_MODULES([OPENSSL], [libcrypto],
|
PKG_CHECK_MODULES([OPENSSL], [libcrypto],
|
||||||
[AC_DEFINE([HAVE_OPENSSL], [1], [Whether to use OpenSSL.])
|
[AC_DEFINE([HAVE_OPENSSL], [1], [Whether to use OpenSSL.])
|
||||||
CXXFLAGS="$OPENSSL_CFLAGS $CXXFLAGS"
|
CXXFLAGS="$OPENSSL_CFLAGS $CXXFLAGS"
|
||||||
have_openssl=1], [true])
|
have_openssl=1], [have_openssl=])
|
||||||
AM_CONDITIONAL(HAVE_OPENSSL, test "$have_openssl" = 1)
|
AC_SUBST(HAVE_OPENSSL, [$have_openssl])
|
||||||
|
|
||||||
|
|
||||||
# Look for libbz2, a required dependency.
|
# Look for libbz2, a required dependency.
|
||||||
|
@ -319,7 +316,6 @@ if test "$enable_shared" = no; then
|
||||||
# Perl bindings require shared libraries.
|
# Perl bindings require shared libraries.
|
||||||
perlbindings=no
|
perlbindings=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(PERL_BINDINGS, test "$perlbindings" = "yes")
|
|
||||||
AC_SUBST(perlbindings)
|
AC_SUBST(perlbindings)
|
||||||
AC_MSG_RESULT($perlbindings)
|
AC_MSG_RESULT($perlbindings)
|
||||||
|
|
||||||
|
@ -327,7 +323,7 @@ AC_MSG_RESULT($perlbindings)
|
||||||
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)
|
||||||
AM_CONDITIONAL(INIT_STATE, test "$init_state" = "yes")
|
#AM_CONDITIONAL(INIT_STATE, test "$init_state" = "yes")
|
||||||
|
|
||||||
|
|
||||||
# Setuid installations.
|
# Setuid installations.
|
||||||
|
@ -361,7 +357,7 @@ fi
|
||||||
AC_SUBST(tarFlags)
|
AC_SUBST(tarFlags)
|
||||||
|
|
||||||
|
|
||||||
AM_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/boost/Makefile
|
src/boost/Makefile
|
||||||
|
|
|
@ -16,4 +16,4 @@ libstore_CXXFLAGS = \
|
||||||
-DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
|
-DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
|
||||||
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
|
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
|
||||||
-DNIX_BIN_DIR=\"$(bindir)\" \
|
-DNIX_BIN_DIR=\"$(bindir)\" \
|
||||||
-DNIX_VERSION=\"$(PACKAGE_VERSION)\"
|
-DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
|
||||||
|
|
|
@ -212,7 +212,7 @@ Settings::SettingsMap Settings::getOverrides()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const string nixVersion = NIX_VERSION;
|
const string nixVersion = PACKAGE_VERSION;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,9 @@ libutil_DIR := $(d)
|
||||||
|
|
||||||
libutil_SOURCES = util.cc hash.cc serialise.cc archive.cc xml-writer.cc affinity.cc
|
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
|
libutil_SOURCES += md5.c sha1.c sha256.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue