Make it pass distcheck.
[gio-sharp:mainline.git] / configure.ac.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(gio-sharp, @GIO_SHARP_VERSION@, stephane@delcroix.org)
3 AC_CONFIG_AUX_DIR(config)
4 AC_CONFIG_SRCDIR(gio/AssemblyInfo.cs.in)
5
6 AM_INIT_AUTOMAKE
7
8 PACKAGE_VERSION=gio-sharp-2.0
9 AC_SUBST(PACKAGE_VERSION)
10 AC_PATH_PROG(MONO, mono, no)
11 if test "x$MONO" = "xno" ; then
12         using_mono=no
13         MONO=
14         AC_PATH_PROG(CSC, csc.exe)
15 else
16         using_mono=yes
17         AC_PATH_PROG(CSC, gmcs)
18 fi
19 AM_CONDITIONAL(USING_MONO, [test $using_mono = yes])
20 AC_PATH_PROG(GACUTIL, gacutil, no)
21 if test "x$GACUTIL" = "xno" ; then
22         AC_MSG_ERROR([No gacutil tool found. You need to install either the mono or .Net SDK.])
23 fi
24
25 if test $using_mono = yes; then
26         GACUTIL_FLAGS='/package $(PACKAGE_VERSION) /gacdir $(DESTDIR)$(prefix)/lib'
27 fi
28
29 AC_SUBST(GACUTIL)
30 AC_SUBST(GACUTIL_FLAGS)
31
32 PKG_CHECK_MODULES(GLIBSHARP, glib-sharp-2.0 >= 2.12)
33 PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 2.12.0)
34
35 PKG_CHECK_MODULES(GLIB, glib-2.0 >= @GLIB_REQUIRED@)
36
37 CSC_FLAGS="@CSC_FLAGS@"
38
39 if test `uname -s` = "Darwin"; then
40         LIB_PREFIX=
41         LIB_SUFFIX=.dylib
42 else
43         LIB_PREFIX=.so
44         LIB_SUFFIX=
45 fi
46
47 AC_SUBST(CSC_FLAGS)
48 AC_SUBST(LIB_PREFIX)
49 AC_SUBST(LIB_SUFFIX)
50
51 AC_OUTPUT(
52 Makefile 
53 generator/Makefile
54 gio/Makefile
55 gio/AssemblyInfo.cs
56 gio/gio-sharp.dll.config
57 gio/gio-sharp-2.0.pc
58 sources/Makefile
59 )