File: configure.in

package info (click to toggle)
gtksourceview 1.8.5-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,736 kB
  • ctags: 2,387
  • sloc: ansic: 20,349; sh: 8,925; xml: 4,031; makefile: 240
file content (162 lines) | stat: -rw-r--r-- 4,298 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
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
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.53)

# Initialization and versioning
AC_INIT(gtksourceview, 1.8.5, http://bugzilla.gnome.org/enter_bug.cgi?product=gtksourceview)
AC_CONFIG_SRCDIR([gtksourceview/gtksourcebuffer.h])
AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")

AM_MAINTAINER_MODE

# Check for programs
AC_PROG_CC
AC_PROG_INSTALL
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])

# Check for headers and functions
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
AC_CHECK_FUNCS([memset])

# Dependencies
GTK_REQUIRED_VERSION=2.8.0
GNOME_VFS_REQUIRED_VERSION=2.2.0
LIBXML_REQUIRED_VERSION=2.5.0
GNOME_PRINT_REQUIRED_VERSION=2.8.0

AC_SUBST(GTK_REQUIRED_VERSION)
AC_SUBST(GNOME_VFS_REQUIRED_VERSION)
AC_SUBST(LIBXML_REQUIRED_VERSION)
AC_SUBST(GNOME_PRINT_REQUIRED_VERSION)

# Pull glib-genmarshal & co.
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)

# Environment
GNOME_COMMON_INIT
if test x$MAINT = x; then
    GNOME_COMPILE_WARNINGS(error)
    DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
else
    GNOME_COMPILE_WARNINGS(maximum)
    DEPRECATED_FLAGS=""
fi
AC_SUBST(DEPRECATED_FLAGS)

PKG_CHECK_MODULES(DEP,
	gtk+-2.0 >= $GTK_REQUIRED_VERSION
	libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
AC_SUBST(DEP_CFLAGS)
AC_SUBST(DEP_LIBS)

# Check for gnomeprint support
AC_ARG_ENABLE(gnomeprint, AC_HELP_STRING([--disable-gnomeprint],
		 [disable gnomeprint support. Do this only if you are using gtksourceview in a custom application.]),
[case "${enableval}" in
  yes) enable_gnomeprint=true ;;
  no)  enable_gnomeprint=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --enable-gnomeprint) ;;
esac],
[enable_gnomeprint=true]) dnl default

msg_gnomeprint=no
AM_CONDITIONAL(HAVE_GNOMEPRINT, false)

if test "$enable_gnomeprint" = "true"; then
	PKG_CHECK_MODULES(GNOMEPRINT,
			libgnomeprint-2.2 >= $GNOME_PRINT_REQUIRED_VERSION,
			[AM_CONDITIONAL(HAVE_GNOMEPRINT, true)
			 AC_DEFINE(HAVE_GNOMEPRINT, [], [using gnomeprint])
			 msg_gnomeprint=yes],
			[AM_CONDITIONAL(HAVE_GNOMEPRINT, false)])
	AC_SUBST(GNOMEPRINT_CFLAGS)
	AC_SUBST(GNOMEPRINT_LIBS)
fi

# Check for GNU regex functions
AH_TEMPLATE(NATIVE_GNU_REGEX, [Define if the C library implements the GNU regular expressions API])
BUILD_GNU_REGEX=false
AC_CHECK_FUNCS([re_compile_pattern re_compile_fastmap re_search re_match], [
	AC_DEFINE(NATIVE_GNU_REGEX)
], [
	BUILD_GNU_REGEX=true
])
AM_CONDITIONAL(BUILD_GNU_REGEX,$BUILD_GNU_REGEX)

# Do we build optional tests? (they require gnome-vfs and gnomeprintui support)
AC_ARG_ENABLE(build_tests,AC_HELP_STRING([--disable-build-tests],
					     [disable building of the test programs]),
[case "${enableval}" in
  yes) build_tests=true ;;
  no)  build_tests=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --disable-build-tests) ;;
esac],
[build_tests=true])

# disable tests if gnomeprint is not enabled
if test x$msg_gnomeprint != xyes; then
  build_tests=false
fi

msg_tests=no
AM_CONDITIONAL(BUILD_TESTS, false)

if test x$build_tests = xtrue; then
	PKG_CHECK_MODULES(TESTS,
			libgnomeprintui-2.2 >= $GNOME_PRINT_REQUIRED_VERSION
			gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION,
			[AM_CONDITIONAL(BUILD_TESTS, true)
			 AC_DEFINE(BUILD_TESTS, [], [build test suite])
			 msg_tests=yes],
			[AM_CONDITIONAL(BUILD_TESTS, false)])
	AC_SUBST(TESTS_CFLAGS)
	AC_SUBST(TESTS_LIBS)
fi

# I18N stuff
GETTEXT_PACKAGE=gtksourceview-1.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])

AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR)

# gtk-doc
GTK_DOC_CHECK([1.0])

# Output files
AC_CONFIG_FILES([
gtksourceview-1.0.pc
Makefile
gtksourceview-zip
po/Makefile.in
gtksourceview/Makefile
gtksourceview/gnu-regex/Makefile
gtksourceview/language-specs/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/version.xml
tests/Makefile
])

AC_OUTPUT


echo "

Configuration:

	Source code location:	${srcdir}
	Compiler:		${CC}
	gnome-print support:	$msg_gnomeprint
	build tests:		$msg_tests
"