diff options
author | Hans Ulrich Niedermann <gp@n-dimensional.de> | 2006-05-16 02:12:53 +0000 |
---|---|---|
committer | Hans Ulrich Niedermann <gp@n-dimensional.de> | 2006-05-16 02:12:53 +0000 |
commit | 45b5137b437e20ab1d476eaab5b1d66cf148a4ca (patch) | |
tree | 4e9e5ba724b296cc0490f6a246a94976aa660619 | |
parent | f65ec59b400aac572af59da373dc5eaaa60691bc (diff) | |
download | libgphoto2-45b5137b437e20ab1d476eaab5b1d66cf148a4ca.tar.gz |
build C# (csharp) bindings if mono is installed
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8798 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | bindings/Makefile.am | 1 | ||||
-rw-r--r-- | bindings/csharp/Makefile.am | 4 | ||||
-rw-r--r-- | configure.in | 31 |
4 files changed, 35 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 903cb260f..499a1e3f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,7 @@ bin_SCRIPTS = gphoto2-config EXTRA_DIST = HACKING MAINTAINERS makefile.os2 os2mak.inc TESTERS CHANGES # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS() -SUBDIRS = @subdirs@ libgphoto2 camlibs tests po packaging doc +SUBDIRS = @subdirs@ libgphoto2 camlibs tests po bindings packaging doc doc_DATA = AUTHORS COPYING README CHANGES NEWS diff --git a/bindings/Makefile.am b/bindings/Makefile.am new file mode 100644 index 000000000..034ce41fa --- /dev/null +++ b/bindings/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = @BINDING_SUBDIRS@ diff --git a/bindings/csharp/Makefile.am b/bindings/csharp/Makefile.am index 07e64a1ac..e939fcb39 100644 --- a/bindings/csharp/Makefile.am +++ b/bindings/csharp/Makefile.am @@ -1,4 +1,4 @@ -CSC = mcs --unsafe -g +MCSFLAGS = --unsafe -g LIBGPHOTO2_SHARP_CSFILES = \ $(srcdir)/AssemblyInfo.cs \ @@ -22,7 +22,7 @@ libgphoto2sharplib_DATA = \ libgphoto2-sharp.dll: $(LIBGPHOTO2_SHARP_CSFILES) - $(CSC) -o $@ /target:library $(LIBGPHOTO2_SHARP_CSFILES) + $(MCS) $(MCSFLAGS) -o $@ /target:library $(LIBGPHOTO2_SHARP_CSFILES) all: libgphoto2-sharp.dll diff --git a/configure.in b/configure.in index e71f8b63e..4b0c78ade 100644 --- a/configure.in +++ b/configure.in @@ -68,6 +68,35 @@ dnl SED is supposed to be set in AC_LIBTOOL_SETUP, but the dnl sequence seems to get mixed up. SED=${SED-sed} +GP_PKG_CONFIG + +dnl Check for Mono and Mono C# compiler from f-spot + +dnl --- Check for mono and mcs +dnl --- FIXME: What about when mono and mcs are not found? + +AC_PATH_PROG([MONO], [mono]) +AC_PATH_PROG([MCS], [mcs]) +AC_SUBST([MONO]) +AC_SUBST([MCS]) + +dnl -- Check for mono pc file + +AC_MSG_CHECKING([for mono.pc]) +if test -z `$PKG_CONFIG --variable=prefix mono`; then + build_binding_csharp="no" + AC_MSG_RESULT([missing the mono.pc file, usually found in the mono-devel package]) +else + build_binding_csharp="yes" + bindings="${bindings}${bindings+ }csharp" + AC_MSG_RESULT([found]) +fi + +AM_CONDITIONAL([HAVE_MONO], [test "x${build_binding_csharp}" = "xyes"]) +GP_CONFIG_MSG([Bindings], [${bindings}]) + +AC_SUBST([BINDING_SUBDIRS], [${bindings}]) + dnl check for/set up libtool and libltdl dnl AC_DISABLE_STATIC dnl AC_DISABLE_SHARED @@ -493,6 +522,8 @@ packaging/rpm/package.spec doc/Makefile doc/Doxyfile doc/api/Makefile +bindings/Makefile +bindings/csharp/Makefile ]) AC_OUTPUT |