File: configure.ac

package info (click to toggle)
galago-sharp 0.5.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,560 kB
  • ctags: 64
  • sloc: sh: 8,160; cs: 364; makefile: 198
file content (189 lines) | stat: -rw-r--r-- 5,093 bytes parent folder | download | duplicates (2)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
dnl Process this file with autoconf to create configure.

dnl ################################################################
dnl # Initialize autoconf
dnl ################################################################
AC_INIT(galago-sharp, 0.5.0, chipx86@chipx86.com)
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR(config.h.in)
AC_COPYRIGHT([Copyright 2004-2006 Christian Hammond])


dnl ################################################################
dnl # Version information
dnl ################################################################
GALAGO_SHARP_MAJOR_VERSION=0
GALAGO_SHARP_MINOR_VERSION=5
GALAGO_SHARP_MICRO_VERSION=0
GALAGO_SHARP_DEVEL_VERSION=0

GALAGO_SHARP_VERSION=$GALAGO_SHARP_MAJOR_VERSION.$GALAGO_SHARP_MINOR_VERSION.$GALAGO_SHARP_MICRO_VERSION

if test "x$GALAGO_SHARP_DEVEL_VERSION" != "x0"; then
	GALAGO_SHARP_VERSION=$GALAGO_SHARP_VERSION.$GALAGO_SHARP_DEVEL_VERSION
fi

AC_DEFINE_UNQUOTED(GALAGO_SHARP_MAJOR_VERSION, $GALAGO_SHARP_MAJOR_VERSION,
	[galago-sharp major version.])
AC_DEFINE_UNQUOTED(GALAGO_SHARP_MINOR_VERSION, $GALAGO_SHARP_MINOR_VERSION,
	[galago-sharp minor version.])
AC_DEFINE_UNQUOTED(GALAGO_SHARP_MICRO_VERSION, $GALAGO_SHARP_MICRO_VERSION,
	[galago-sharp micro version.])
AC_DEFINE_UNQUOTED(GALAGO_SHARP_VERSION, "$GALAGO_SHARP_VERSION",
	[galago-sharp version.])

API_VERSION=1.0.0.0
AC_SUBST(API_VERSION)

dnl ################################################################
dnl # Initialize automake
dnl ################################################################
VERSION=$GALAGO_SHARP_VERSION
PACKAGE=galago-sharp

AM_INIT_AUTOMAKE($PACKAGE, $VERSION)

dnl ################################################################
dnl # Specify a header configuration file
dnl ################################################################
AM_CONFIG_HEADER(config.h)

dnl ################################################################
dnl # Check for some standard stuff.
dnl ################################################################
AC_PROG_CC
#AC_ARG_PROGRAM
AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_PROG_INSTALL

AC_C_CONST
AC_TYPE_SIZE_T
AC_EXEEXT

AM_PROG_LIBTOOL


dnl ################################################################
dnl # Look for Mono or .NET
dnl ################################################################
MONO_REQUIRED_VERSION=1.0
PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)

if test "x$has_mono" = "xtrue"; then
	AC_PATH_PROG(RUNTIME, mono, no)
	AC_PATH_PROG(CSC, mcs, no)

	GACUTIL_FLAGS='/package $(PACKAGE) /gacdir $(libdir) /root $(DESTDIR)$(libdir)'

	GENERATED_SOURCES=generated/*.cs

	if test `uname -s` = "Darwin"; then
		LIB_PREFIX=
		LIB_SUFFIX=.dylib
	else
		LIB_PREFIX=.so
		LIB_SUFFIX=
	fi

	AC_PATH_PROG(GAPI_FIXUP, gapi2-fixup, no)
	AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no)
else
	AC_PATH_PROG(CSC, csc.exe, no)

	GENERATED_SOURCES=generated\\*.cs

	GACUTIL_FLAGS=

	if test "x$CSC" = "xno"; then
		AC_MSG_ERROR([You need to install either Mono or .NET])
	else
		RUNTIME=
		LIB_PREFIX=
		LIB_SUFFIX=.dylib
	fi
fi

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])
fi

dnl Check for the NUnit testing framework
have_nunit="yes"
AC_PATH_PROG(NUNIT, nunit-console)
AC_PATH_PROG(XSLTPROC, xsltproc)
if test "x$NUNIT" = "x" -o "x$XSLTPROC" = "x"; then
	AC_MSG_WARN([Can't find NUnit and xsltproc. You will not be able to run unit tests])
	have_nunit="no"
fi
AM_CONDITIONAL(HAVE_NUNIT, test "$have_nunit" = "yes")

AC_SUBST(RUNTIME)
AC_SUBST(CSC)
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
AC_SUBST(GACUTIL)
AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(GENERATED_SOURCES)

GLIB_SHARP_MIN_VERSION="1.0"
AC_SUBST(GLIB_SHARP_MIN_VERSION)

PKG_CHECK_MODULES(GLIB_SHARP, glib-sharp-2.0 >= $GLIB_SHARP_MIN_VERSION)
AC_SUBST(GLIB_SHARP_CFLAGS)
AC_SUBST(GLIB_SHARP_LIBS)

PKG_CHECK_MODULES(GALAGO, libgalago >= 0.5.0)
AC_SUBST(GALAGO_CFLAGS)
AC_SUBST(GALAGO_LIBS)


dnl ################################################################
dnl # Check if we want to use a tarball or svn for updates
dnl ################################################################
AC_ARG_WITH([galago-svn], AC_HELP_STRING([--with-galago-svn],
                                         [Build against libgalago SVN]),
[
	use_libgalago_svn=yes
],[
	if test "x$GALAGO_SHARP_DEVEL_VERSION" != "x0"; then
		use_libgalago_svn=yes;
	else
		use_libgalago_svn=no;
	fi
])

AM_CONDITIONAL(USE_LIBGALAGO_SVN, test "x$use_libgalago_svn" = "xyes",
               [Define if using libgalago SVN.])


dnl ################################################################
dnl # Output the Makefiles
dnl ################################################################
AC_CONFIG_FILES([
galago-sharp.pc
galago-sharp.spec
Makefile
galago/Makefile
galago/AssemblyInfo.cs
sources/Makefile
sources/galago-sharp-sources.xml
tests/Makefile
])

AC_OUTPUT

echo
echo $PACKAGE v$VERSION

echo
echo "Now type make to compile"
echo "Then su to root and type: make install"
echo