From 7f0e74f470d5bb4e50e1bbf689c41cc2e9e3a381 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 4 Dec 2010 14:51:48 +0100 Subject: [PATCH] Build system: Add bindings/csharp/ to the build system. Change-Id: If5a91974d7f6c50b420a52ff8c3eebc7d76475bf --- bindings/Makefile.am | 4 ++++ bindings/csharp/Makefile.am | 14 ++++++++++++++ configure.in | 6 +++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 bindings/csharp/Makefile.am diff --git a/bindings/Makefile.am b/bindings/Makefile.am index f39e9bbb..1e52e9b3 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -1,5 +1,9 @@ SUBDIRS = +if BUILD_WITH_CSC +SUBDIRS += csharp +endif + if BUILD_WITH_JAVA SUBDIRS += java endif diff --git a/bindings/csharp/Makefile.am b/bindings/csharp/Makefile.am new file mode 100644 index 00000000..4682a247 --- /dev/null +++ b/bindings/csharp/Makefile.am @@ -0,0 +1,14 @@ +#EXTRA_DIST = ... + +collectd.dll: collectd.cs + $(CSC) -target:library -out:$@ $< + +all-local: collectd.dll + +install-exec-local: collectd.dll + mkdir -p "$(DESTDIR)$(pkgdatadir)/csharp" + $(INSTALL) -m 644 collectd.dll \ + "$(DESTDIR)$(pkgdatadir)/csharp" + +clean-local: + rm -f collectd.dll diff --git a/configure.in b/configure.in index 2f194711..c0ffbd37 100644 --- a/configure.in +++ b/configure.in @@ -48,6 +48,9 @@ AC_PROG_LEX AC_PROG_YACC PKG_PROG_PKG_CONFIG +AC_CHECK_PROGS([CSC], csc mono-csc, [no]) +AM_CONDITIONAL(BUILD_WITH_CSC, test "x$CSC" != "no") + AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no]) AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes") @@ -5096,7 +5099,7 @@ AC_SUBST(LCC_VERSION_STRING) AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h) -AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile) +AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/csharp/Makefile bindings/java/Makefile) if test "x$with_librrd" = "xyes" \ && test "x$librrd_threadsafe" != "xyes" @@ -5166,6 +5169,7 @@ Configuration: libxmms . . . . . . . $with_libxmms libyajl . . . . . . . $with_libyajl libevent . . . . . . $with_libevent + csc . . . . . . . . . $CSC protobuf-c . . . . . $have_protoc_c oracle . . . . . . . $with_oracle python . . . . . . . $with_python -- 2.11.0