From 74f4e5781e0f259a22b8e1e125973262600abed7 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 2 Jun 2017 17:23:03 +0200 Subject: trans: Conditionally build the random translator. Only build the random translator if we find a suitable version of libgcrypt. This helps to reduce the build dependencies to bootstrap the Hurd. * aclocal.m4: Include 'libgcrypt.m4'. * config.make.in (HAVE_LIBGCRYPT): New variable. * configure.ac: Check for a suitable libgcrypt. * m4/libgcrypt.m4: New file. * trans/Makefile: Conditionally build the random translator. --- trans/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'trans') diff --git a/trans/Makefile b/trans/Makefile index a10fa8b9..f02ddf7b 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -21,7 +21,7 @@ makemode := servers targets = symlink firmlink ifsock magic null fifo new-fifo fwd crash \ password hello hello-mt streamio fakeroot proxy-defpager remap \ - mtab random + mtab SRCS = ifsock.c symlink.c magic.c null.c fifo.c new-fifo.c fwd.c \ crash.c firmlink.c password.c hello.c hello-mt.c streamio.c \ fakeroot.c proxy-defpager.c remap.c mtab.c @@ -53,7 +53,17 @@ device_reply-MIGSFLAGS=\ # libports. Disable the default payload to port conversion. fsys-MIGSFLAGS = "-DHURD_DEFAULT_PAYLOAD_TO_PORT=1" -random-LDLIBS = -lgcrypt +# If we have a configured tree, include the configuration so that we +# can conditionally build translators. +ifneq (,$(wildcard ../config.make)) + include ../config.make +endif + +ifeq ($(HAVE_LIBGCRYPT),yes) + targets += random + random-LDLIBS = -lgcrypt + random: startup_notifyServer.o mach_debugUser.o ../libtrivfs/libtrivfs.a +endif include ../Makeconf @@ -66,11 +76,10 @@ password: passwordServer.o proxy-defpager: default_pagerServer.o default_pagerUser.o streamio: device_replyServer.o symlink: fsysServer.o -random: startup_notifyServer.o mach_debugUser.o fakeroot: ../libnetfs/libnetfs.a fifo new-fifo: ../libpipe/libpipe.a -crash fifo firmlink hello hello-mt ifsock magic mtab new-fifo null password proxy-defpager remap streamio random: ../libtrivfs/libtrivfs.a +crash fifo firmlink hello hello-mt ifsock magic mtab new-fifo null password proxy-defpager remap streamio: ../libtrivfs/libtrivfs.a $(targets): ../libfshelp/libfshelp.a \ ../libihash/libihash.a \ ../libiohelp/libiohelp.a \ -- cgit v1.2.3