]> mj.ucw.cz Git - moe.git/commitdiff
Use new Configure module to configure crypto libs.
authorMartin Mares <mj@ucw.cz>
Sat, 7 Jun 2008 21:17:15 +0000 (23:17 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 7 Jun 2008 21:17:15 +0000 (23:17 +0200)
configure
submit/Makefile

index da5ad74b797dd16b3564601aa6f952cc32ed7d0a..d8c25e2236a61b16f48bc2ca11eda68a6c9db644 100755 (executable)
--- a/configure
+++ b/configure
@@ -32,5 +32,13 @@ if (Get("CONFIG_SUBMIT") || Get("CONFIG_MOP")) {
        Set("CONFIG_UCW_LIBS" => 1);
 }
 
+if (Get("CONFIG_SUBMIT")) {
+       # Submit server needs crypto libraries
+       if (!TrivConfig("libgnutls", script => "libgnutls-config") ||
+           !TrivConfig("libgcrypt", script => "libgcrypt-config")) {
+               Fail "The libgnutls and libgcrypt libraries are required to build the submit server.";
+       }
+}
+
 Finish();
 Log "\nConfigured, run `make' to build everything.\n";
index 9e7e0a6f8cc8a9bac374271a9cd170f8d07c4dcc..c7971f37198aa5386de40e98b73c08bb086cc10f 100644 (file)
@@ -1,9 +1,8 @@
 # Makefile for MO-Eval submitter
 # (c) 2008 Martin Mares <mj@ucw.cz>
 
-TLSCF:=$(shell libgnutls-config --cflags)
-TLSLF:=$(shell libgnutls-config --libs)
-GCRCF:=$(shell libgcrypt-config --cflags)
+SUBCF=$(CFLAGS_LIBGCRYPT) $(CFLAGS_LIBGNUTLS)
+SUBLF=$(LIBS_LIBGCRYPT) $(LIBS_LIBGNUTLS)
 
 DIRS+=submit
 SDIR=$(o)/submit
@@ -15,16 +14,16 @@ PROGS+=$(addprefix $(SDIR)/,submitd privkey connect)
 $(SHERLOCK_PERL_MODS): PERL_MODULE_DIR=MO
 
 $(SDIR)/submitd: $(addprefix $(SDIR)/,submitd.o commands.o tasks.o) $(LIBUCW) $(LIBSH)
-$(SDIR)/submitd: CFLAGS+=$(TLSCF) $(GCRCF)
-$(SDIR)/submitd: LIBS+=$(TLSLF)
+$(SDIR)/submitd: CFLAGS+=$(SUBCF)
+$(SDIR)/submitd: LIBS+=$(SUBLF)
 
 $(SDIR)/connect: $(SDIR)/connect.o $(LIBUCW)
-$(SDIR)/connect: CFLAGS+=$(TLSCF) $(GCRCF)
-$(SDIR)/connect: LIBS+=$(TLSLF)
+$(SDIR)/connect: CFLAGS+=$(SUBCF)
+$(SDIR)/connect: LIBS+=$(SUBLF)
 
 $(SDIR)/privkey: $(SDIR)/privkey.o $(LIBUCW)
-$(SDIR)/privkey: CFLAGS+=$(TLSCF) $(GCRCF)
-$(SDIR)/privkey: LIBS+=$(TLSLF)
+$(SDIR)/privkey: CFLAGS+=$(SUBCF)
+$(SDIR)/privkey: LIBS+=$(SUBLF)
 
 CONFIGS+=submitd
 run/cf/submitd: $(SDIR)/submitd.cf