]> arthur.barton.de Git - netatalk.git/blobdiff - libevent/test/Makefile.am
Merge 2-2
[netatalk.git] / libevent / test / Makefile.am
index b867501f016750c69cf09e6f261c6ce65768a70e..5904b64498257dede61cf2aa216e9d8ef143d078 100644 (file)
@@ -1,8 +1,14 @@
+# test/Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
 AUTOMAKE_OPTIONS = foreign
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -I$(top_srcdir)/include -I../include -DTINYTEST_LOCAL
 
-EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c test.sh
+EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c rpcgen_wrapper.sh test.sh
 
 noinst_PROGRAMS = test-init test-eof test-weof test-time \
        bench bench_cascade bench_http bench_httpclient test-ratelim \
@@ -13,7 +19,7 @@ endif
 EXTRA_PROGRAMS = regress
 noinst_HEADERS = tinytest.h tinytest_macros.h regress.h tinytest_local.h
 
-TESTS = $(top_srcdir)/test/test.sh
+TESTS = $(top_srcdir)/test/test.sh
 
 BUILT_SOURCES =
 if BUILD_REGRESS
@@ -59,7 +65,7 @@ regress_LDFLAGS = $(PTHREAD_CFLAGS)
 
 if OPENSSL
 regress_SOURCES += regress_ssl.c
-regress_LDADD += ../libevent_openssl.la
+regress_LDADD += ../libevent_openssl.la -lssl -lcrypto ${OPENSSL_LIBADD}
 endif
 
 bench_SOURCES = bench.c
@@ -71,8 +77,19 @@ bench_http_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent.la
 bench_httpclient_SOURCES = bench_httpclient.c
 bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent_core.la
 
-regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py
-       $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed"
+regress.gen.c regress.gen.h: rpcgen-attempted
+
+rpcgen-attempted: $(srcdir)/regress.rpc $(srcdir)/../event_rpcgen.py $(srcdir)/rpcgen_wrapper.sh
+       date -u > $@
+       if $(srcdir)/rpcgen_wrapper.sh $(srcdir); then \
+          echo "rpcgen okay"; \
+       else \
+          echo "No Python installed; stubbing out RPC test." >&2; \
+          echo " "> regress.gen.c; \
+          echo "#define NO_PYTHON_EXISTS" > regress.gen.h; \
+       fi
+
+CLEANFILES = rpcgen-attempted
 
 DISTCLEANFILES = *~