diff --git a/configure.ac b/configure.ac index 8afcb9bc5e..b9685f013d 100644 --- a/configure.ac +++ b/configure.ac @@ -42,12 +42,13 @@ else LIB_SUFFIX=.dll fi fi - +AM_CONDITIONAL(USE_MONO_COMPILER, test "x$has_mono" = "xtrue") + CS="C#" if test "x$CSC" = "xno" ; then AC_MSG_ERROR([No $CS compiler found]) fi - + AC_PATH_PROG(GACUTIL, gacutil, no) if test "x$GACUTIL" = "xno" ; then AC_MSG_ERROR([No gacutil tool found]) diff --git a/generator/Makefile.am b/generator/Makefile.am index 64cfd3056d..d70fd55c63 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -64,5 +64,5 @@ EXTRA_DIST = \ $(dist_sources) gst-gapi_codegen.exe: $(build_sources) - $(CSC) /debug /out:gst-gapi_codegen.exe $(OFF_T_FLAGS) $(references) $(build_sources) + $(CSC) -debug -out:gst-gapi_codegen.exe $(OFF_T_FLAGS) $(references) $(build_sources) diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index e65a01a042..20eb9a7783 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -71,6 +71,11 @@ overrides = \ override/NavigationAdapter.cs build_sources = $(addprefix $(srcdir)/, $(sources)) +if USE_MONO_COMPILER +csc_build_sources = $(build_sources) +else +csc_build_sources = $(subst /,\\,$(build_sources)) +endif customs = \ Bin.custom \ @@ -135,5 +140,5 @@ $(KEYFILE): $(top_srcdir)/gstreamer-sharp.snk cp $(top_srcdir)/gstreamer-sharp.snk . $(ASSEMBLY): $(build_sources) generated-stamp $(KEYFILE) - $(CSC) /nowarn:0612 /debug /unsafe /out:$(ASSEMBLY) /target:library $(references) $(build_sources) $(GENERATED_SOURCES) + $(CSC) -nowarn:0612 -debug -unsafe -out:$(ASSEMBLY) -target:library $(references) $(csc_build_sources) $(GENERATED_SOURCES) diff --git a/samples/Makefile.am b/samples/Makefile.am index c272a25ded..e24ce21112 100644 --- a/samples/Makefile.am +++ b/samples/Makefile.am @@ -1,10 +1,13 @@ -TARGETS = playbin-player.exe decodebin-transcoder.exe helloworld.exe typefind.exe metadata.exe gtk-video-player.exe +if USE_MONO_COMPILER +MCS_TARGETS = gtk-video-player.exe +endif +TARGETS = playbin-player.exe decodebin-transcoder.exe helloworld.exe typefind.exe metadata.exe $(MCS_TARGETS) DEBUGS = $(addsuffix .mdb, $(TARGETS)) all: $(TARGETS) link assemblies=$(top_builddir)/gstreamer-sharp/gstreamer-sharp.dll -references=$(addprefix /r:, $(assemblies)) +references=$(addprefix -r:, $(assemblies)) playbin-player.exe: $(srcdir)/PlayBinPlayer.cs $(assemblies) $(CSC) -out:$@ $(GLIBSHARP_LIBS) $(references) $(srcdir)/PlayBinPlayer.cs