This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.in
72 lines (55 loc) · 1.59 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
AC_INIT(gkeyfile-sharp, 0.2)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(gkeyfile-sharp, 0.2)
AM_MAINTAINER_MODE
ASSEMBLY_NAME="$PACKAGE"
ASSEMBLY_VERSION="$VERSION"
API_VERSION=1.0.0.0
AC_SUBST(API_VERSION)
MONO_REQUIRED_VERSION=2.0
AC_MSG_CHECKING([whether we're compiling from bzr])
if test -f "$srcdir/.bzr" ; then
from_bzr=yes
else
from_bzr=no
fi
AC_MSG_RESULT($from_bzr)
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)
dnl Find pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
GLIB_REQUIRED_VERSION=2.6
GLIB_SHARP_REQUIRED_VERSION=2.12.9
MONO_REQUIRED_VERSION=2.0
PKG_CHECK_MODULES(GLIB_DEPENDENCY, glib-2.0 >= $GLIB_REQUIRED_VERSION, has_glib=true, has_glib=false)
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
PKG_CHECK_MODULES(GLIB_SHARP, glib-sharp-2.0 >= $GLIB_SHARP_REQUIRED_VERSION)
AC_SUBST(GLIB_SHARP_LIBS)
AC_SUBST(GLIB_SHARP_CFLAGS)
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, gmcs, no)
LIB_PREFIX=.so
LIB_SUFFIX=
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
AC_SUBST(GLIB_DEPENDENCY_CFLAGS)
AC_SUBST(GLIB_DEPENDENCY_LIBS)
dnl Find GAPI
PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 1.9.0)
AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
AC_MSG_ERROR([No gacutil tool found])
fi
AC_SUBST(GACUTIL)
GACUTIL_FLAGS='/package $(ASSEMBLY_NAME) /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib'
AC_SUBST(GACUTIL_FLAGS)
AC_OUTPUT([
Makefile
GKeyFile/gkeyfile-sharp.dll.config
GKeyFile/Makefile
GKeyFile/AssemblyInfo.cs
gkeyfile-sharp.pc
])