diff options
author | Owen Fraser-Green <owen@discobabe.net> | 2004-05-15 19:31:12 +0000 |
---|---|---|
committer | Owen Fraser-Green <owen@discobabe.net> | 2004-05-15 19:31:12 +0000 |
commit | 8bc62a2864e5e5897cc961bd1055b35e3c8d0b94 (patch) | |
tree | dc46c6701cd95ddbe53a83922f0c8a52f67416ff | |
parent | a3942cbc6fd2b9ee1f892ae0d71e42483cd751c2 (diff) |
Various mono related changes to facilitate GAC support.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.in | 71 | ||||
-rw-r--r-- | dbus-sharp.pc.in | 2 | ||||
-rw-r--r-- | mono/AssemblyInfo.cs.in | 6 | ||||
-rw-r--r-- | mono/Makefile.am | 36 | ||||
-rw-r--r-- | mono/dbus-sharp.dll.config.in | 4 | ||||
-rw-r--r-- | mono/dbus-sharp.snk | bin | 0 -> 596 bytes | |||
-rw-r--r-- | mono/example/Makefile.am | 4 |
9 files changed, 104 insertions, 34 deletions
@@ -1,6 +1,17 @@ 2004-05-15 Owen Fraser-Green <owen@discobabe.net> - * mono/Makefile.am: Added SUBDIR for docs + * mono/dbus-sharp.dll.config.in: Added for GAC + * mono/dbus-sharp.snk: Added for GAC + * mono/Assembly.cs.in: Added for GAC + * mono/Makefile.am: Changes for GAC installation + * configure.in: Added refs for dbus-sharp.dll.config.in and + Assembly.cs.in. More fixes for mono testing + * mono/example/Makefile.am: Changed var to CSC + * Makefile.am: Changed flag name to DBUS_USE_CSC + +2004-05-15 Owen Fraser-Green <owen@discobabe.net> + + * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order * mono/doc/*: Added documentation framework * configure.in: Added monodoc check * README: Added description of mono configure flags diff --git a/Makefile.am b/Makefile.am index aa6f0ecd..5548794e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ if DBUS_USE_GCJ GCJ_SUBDIR=gcj endif -if DBUS_USE_MCS +if DBUS_USE_CSC MONO_SUBDIR=mono MONO_PC=dbus-sharp.pc endif diff --git a/configure.in b/configure.in index 887ef1c9..2fe7d181 100644 --- a/configure.in +++ b/configure.in @@ -185,32 +185,64 @@ AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes) AM_PROG_LIBTOOL #### Look for mono -AC_CHECK_TOOL(MCS, mcs) -if test -z "$MCS" ; then - have_mcs=no +MONO_REQUIRED_VERSION=0.91 +AC_SUBST(MONO_REQUIRED_VERSION) +PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, have_mono=true, have_mono=false) + +if test "x$have_mono" = "xtrue"; then +if test `uname -s` = "Darwin"; then + AC_PATH_PROG(RUNTIME, mint, no) + AC_PATH_PROG(CSC, mcs, no) + LIB_PREFIX= + LIB_SUFFIX=.dylib else - have_mcs=yes - if test "x${MCSFLAGS-unset}" = xunset; then - MCSFLAGS="" ### put default MCSFLAGS here - fi - AC_SUBST(MCSFLAGS) + AC_PATH_PROG(RUNTIME, mono, no) + AC_PATH_PROG(CSC, mcs, no) + LIB_PREFIX=.so + LIB_SUFFIX= fi - -if test x$enable_mono = xauto ; then - if test x$have_mcs = xno ; then - enable_mono=no - else - enable_mono=yes - fi +else +AC_PATH_PROG(CSC, csc.exe, no) +RUNTIME= +LIB_PREFIX= +LIB_SUFFIX=.dylib fi if test x$enable_mono = xyes; then if test x$have_mcs = xno ; then AC_MSG_ERROR([Building Mono bindings explicitly required, but mcs compiler not found]) fi + + ### Test for GACUTIL + AC_PATH_PROG(GACUTIL, gacutil, no) + if test "x$GACUTIL" = "xno" ; then + AC_MSG_ERROR([No gacutil tool found]) + fi + + AC_SUBST(GACUTIL) fi -AM_CONDITIONAL(DBUS_USE_MCS, test x$enable_mono = xyes) +if test x$enable_mono = xauto ; then + if test x$CSC = xno ; then + enable_mono=no + else + ### Test for GACUTIL + AC_PATH_PROG(GACUTIL, gacutil, no) + if test "x$GACUTIL" = "xno" ; then + enable_mono=no + else + enable_mono=yes + fi + fi +fi + +AC_SUBST(RUNTIME) +AC_SUBST(CSC) +AC_SUBST(GACUTIL) +AC_SUBST(LIB_PREFIX) +AC_SUBST(LIB_SUFFIX) + +AM_CONDITIONAL(DBUS_USE_CSC, test x$enable_mono = xyes) #### Look for monodoc MONODOC_REQUIRED_VERSION=0.15 @@ -1059,6 +1091,8 @@ gcj/org/Makefile gcj/org/freedesktop/Makefile gcj/org/freedesktop/dbus/Makefile mono/Makefile +mono/AssemblyInfo.cs +mono/dbus-sharp.dll.config mono/example/Makefile mono/doc/Makefile bus/Makefile @@ -1111,12 +1145,11 @@ fi if test x$enable_mono = xyes ; then echo \ -" mcs: ${MCS} - mcsflags: ${MCSFLAGS} +" csc: ${CSC} " else echo \ -" mcs: (not enabled) +" csc: (not enabled) " fi diff --git a/dbus-sharp.pc.in b/dbus-sharp.pc.in index d46eaf73..9e00d21b 100644 --- a/dbus-sharp.pc.in +++ b/dbus-sharp.pc.in @@ -5,4 +5,4 @@ libdir=@libdir@ Name: DBus# Description: DBus# - D-BUS .NET Bindings Version: @VERSION@ -Libs: -lib:${libdir} -r:dbus-sharp -r:glib-sharp +Libs: -lib:${libdir}/mono/dbus-sharp -r:dbus-sharp -r:glib-sharp diff --git a/mono/AssemblyInfo.cs.in b/mono/AssemblyInfo.cs.in new file mode 100644 index 00000000..6241b8c7 --- /dev/null +++ b/mono/AssemblyInfo.cs.in @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly:AssemblyVersion("@VERSION@")] +[assembly:AssemblyDelaySign(false)] +[assembly:AssemblyKeyFile("dbus-sharp.snk")] diff --git a/mono/Makefile.am b/mono/Makefile.am index 498d5367..4b61816b 100644 --- a/mono/Makefile.am +++ b/mono/Makefile.am @@ -1,9 +1,10 @@ DESTDIR= -SUBDIRS=doc +SUBDIRS=. doc example -DLLS=dbus-sharp.dll +TARGET=$(ASSEMBLY) NOINST_EXES=test-dbus-sharp.exe +ASSEMBLY_NAME=dbus-sharp DBUS_SHARP_FILES= \ Arguments.cs \ @@ -43,20 +44,35 @@ DBUS_SHARP_FILES= \ TEST_DBUS_SHARP_FILES=Test.cs -all: $(DLLS) +ASSEMBLY=$(ASSEMBLY_NAME).dll + +DISTCLEANFILES=AssemblyInfo.cs $(ASSEMBLY).config + +all-am: $(TARGET) dbus-sharp.dll: $(DBUS_SHARP_FILES) - $(MCS) $(MCSFLAGS) --unsafe --target library -o dbus-sharp.dll $(DBUS_SHARP_FILES) + $(CSC) --unsafe --target library -o dbus-sharp.dll $(DBUS_SHARP_FILES) AssemblyInfo.cs test-dbus-sharp.exe: $(TEST_DBUS_SHARP_FILES) - $(MCS) $(MCSFLAGS) --unsafe --target exe -L . -r dbus-sharp.dll -r gtk-sharp.dll -o test-dbus-sharp.exe $(TEST_DBUS_SHARP_FILES) + $(CSC) --unsafe --target exe -L . -r dbus-sharp.dll -r gtk-sharp.dll -o test-dbus-sharp.exe $(TEST_DBUS_SHARP_FILES) clean: - rm -f $(DLLS) $(NOINST_EXES) + rm -f $(TARGET) $(NOINST_EXES) -install: all - ../mkinstalldirs $(DESTDIR)$(prefix)/lib && \ - cp $(DLLS) $(DESTDIR)$(prefix)/lib || exit 1 +install-data-local: + @if test -n '$(TARGET)'; then \ + echo "$(GACUTIL) /i $(ASSEMBLY) /f /package dbus-sharp /root $(DESTDIR)$(libdir)"; \ + $(GACUTIL) /i $(ASSEMBLY) /f /package dbus-sharp /root $(DESTDIR)$(libdir) || exit 1; \ + fi -EXTRA_DIST=$(DBUS_SHARP_FILES) +uninstall-local: + @if test -n '$(TARGET)'; then \ + echo "$(GACUTIL) /u $(ASSEMBLY_NAME) /package dbus-sharp /root $(DESTDIR)$(libdir)"; \ + $(GACUTIL) /u $(ASSEMBLY_NAME) /package dbus-sharp /root $(DESTDIR)$(libdir) || exit 1; \ + fi +EXTRA_DIST= \ + $(DBUS_SHARP_FILES) \ + AssemblyInfo.cs.in \ + $(ASSEMBLY).config.in \ + dbus-sharp.snk diff --git a/mono/dbus-sharp.dll.config.in b/mono/dbus-sharp.dll.config.in new file mode 100644 index 00000000..d40afcda --- /dev/null +++ b/mono/dbus-sharp.dll.config.in @@ -0,0 +1,4 @@ +<configuration> + <dllmap dll="dbus-1" target="libdbus-1@LIB_PREFIX@.0@LIB_SUFFIX@"/> + <dllmap dll="dbus-glib-1" target="libdbus-glib-1@LIB_PREFIX@.0@LIB_SUFFIX@"/> +</configuration> diff --git a/mono/dbus-sharp.snk b/mono/dbus-sharp.snk Binary files differnew file mode 100644 index 00000000..b28b3935 --- /dev/null +++ b/mono/dbus-sharp.snk diff --git a/mono/example/Makefile.am b/mono/example/Makefile.am index 2355bf31..e7fd9b6a 100644 --- a/mono/example/Makefile.am +++ b/mono/example/Makefile.am @@ -5,10 +5,10 @@ NOINST_EXES=echo-server.exe echo-client.exe all: $(NOINST_EXES) echo-server.exe: EchoServer.cs Echoer.cs - $(MCS) $(MCSFLAGS) --unsafe --target exe -L .. -r dbus-sharp.dll -r gtk-sharp -o echo-server.exe EchoServer.cs Echoer.cs + $(CSC) --target exe -L .. -r:../dbus-sharp.dll -r gtk-sharp -o echo-server.exe EchoServer.cs Echoer.cs echo-client.exe: EchoClient.cs Echoer.cs - $(MCS) $(MCSFLAGS) --unsafe --target exe -L .. -r dbus-sharp.dll -o echo-client.exe EchoClient.cs Echoer.cs + $(CSC) --target exe -L .. -r:../dbus-sharp.dll -o echo-client.exe EchoClient.cs Echoer.cs clean: rm -f $(NOINST_EXES) |