summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-02 17:23:03 +0200
committerJustus Winter <justus@gnupg.org>2017-06-04 19:03:25 +0200
commit74f4e5781e0f259a22b8e1e125973262600abed7 (patch)
tree5838e8459e3a4521279f643a22fb38a60887ac83 /trans
parent29ff193d27436e52d8112903c882ebe52f071d88 (diff)
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.
Diffstat (limited to 'trans')
-rw-r--r--trans/Makefile17
1 files changed, 13 insertions, 4 deletions
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 \