File: configure.ac

package info (click to toggle)
notify-sharp 0.4.0~r3032-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, jessie-kfreebsd, sid, stretch
  • size: 824 kB
  • ctags: 458
  • sloc: sh: 3,336; xml: 421; cs: 365; makefile: 85; ansic: 13
file content (94 lines) | stat: -rw-r--r-- 2,445 bytes parent folder | download
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
AC_INIT(src/Global.cs)

AC_CANONICAL_SYSTEM
AC_PREREQ(2.13)

API_VERSION=0.4
VERSION=$API_VERSION.0

AC_SUBST(API_VERSION)
AC_SUBST(VERSION)

AM_INIT_AUTOMAKE(notify-sharp, $VERSION)

AM_MAINTAINER_MODE

AC_PROG_INSTALL

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
AC_SUBST(PKG_CONFIG)

MONO_REQ_VERSION=1.1.13
PKG_CHECK_MODULES(MONO, mono >= $MONO_REQ_VERSION)

AC_PATH_PROG(GMCS, gmcs, no)
if test "x$GMCS" = "xno"; then
	AC_MSG_ERROR([You need to install gmcs])
fi
AC_SUBST(GMCS)

AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno"; then
	AC_MSG_ERROR([You need to install gacutil])
fi
AC_SUBST(GACUTIL)

AC_ARG_ENABLE(docs, AC_HELP_STRING([--disable-docs], 
	[Do not build documentation]), with_docs=no, with_docs=yes)

MONODOC_REQ_VERSION=1.1.18

if test "x$with_docs" = "xyes"; then
	PKG_CHECK_MODULES(MONODOC, monodoc >= $MONODOC_REQ_VERSION,,
		[AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])])
	AC_PATH_PROG(MONODOCER, monodocer, no)
	if test "x$MONODOCER" = "xno"; then
		AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])
	fi
	
	AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
	if test "x$MDASSEMBLER" = "xno"; then
		AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation])
	fi
	
	DOCDIR=`$PKG_CONFIG monodoc --variable=sourcesdir`
	AC_SUBST(DOCDIR)
	AM_CONDITIONAL(BUILD_DOCS, true)
else
	AC_MSG_NOTICE([not building notify-sharp API documentation])
	AM_CONDITIONAL(BUILD_DOCS, false)
fi

GTK_SHARP_REQ_VERSION=2.10.1
PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION)
AC_SUBST(GTK_SHARP_LIBS)

DBUS_SHARP_REQ_VERSION=0.7
DBUS_SHARP_GLIB_REQ_VERSION=0.5
PKG_CHECK_MODULES(DBUS_SHARP, dbus-sharp-2.0 >= $DBUS_SHARP_REQ_VERSION \
                              dbus-sharp-glib-2.0 >= $DBUS_SHARP_GLIB_REQ_VERSION)
AC_SUBST(DBUS_SHARP_LIBS)

required_assemblies="Mono.Posix"

for asm in $required_assemblies; do
	AC_MSG_CHECKING([for $asm.dll])
	if test -n "`$GACUTIL /l $asm.dll | grep ^$asm.dll`"; then
		AC_MSG_RESULT([not found])
		AC_MSG_ERROR([missing required assembly in the GAC: $asm.dll])
	else
		AC_MSG_RESULT([found])
	fi
done

AC_OUTPUT([
Makefile
notify-sharp.pc
src/Makefile
src/AssemblyInfo.cs
docs/Makefile
])