source: trunk/third/gtksourceview/configure.in @ 20969

Revision 20969, 3.4 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20968, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3AC_PREREQ(2.53)
4
5# Initialization and versioning
6AC_INIT(gtksourceview, 1.1.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gtksourceview)
7AC_CONFIG_SRCDIR([gtksourceview/gtksourcebuffer.h])
8AM_CONFIG_HEADER(config.h)
9
10AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
11
12dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
13AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
14
15AM_MAINTAINER_MODE
16
17# Check for programs
18AC_PROG_CC
19AC_PROG_INSTALL
20AM_DISABLE_STATIC
21AM_PROG_LIBTOOL
22AC_PROG_INTLTOOL(0.30)
23
24# Check for headers and functions
25AC_HEADER_STDC
26AC_CHECK_HEADERS([stdlib.h string.h])
27AC_CHECK_FUNCS([memset])
28
29# Dependencies
30GTK_REQUIRED_VERSION=2.2.4
31GTK24_REQUIRED_VERSION=2.4.0
32GNOME_VFS_REQUIRED_VERSION=2.2.0
33LIBXML_REQUIRED_VERSION=2.5.0
34GNOME_PRINT_REQUIRED_VERSION=2.7.0
35
36AC_SUBST(GTK_REQUIRED_VERSION)
37AC_SUBST(GNOME_VFS_REQUIRED_VERSION)
38AC_SUBST(LIBXML_REQUIRED_VERSION)
39AC_SUBST(GNOME_PRINT_REQUIRED_VERSION)
40
41# Pull glib-genmarshal & co.
42AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
43AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
44
45# Environment
46GNOME_COMMON_INIT
47if test x$MAINT = x; then
48    GNOME_COMPILE_WARNINGS(error)
49    DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
50else
51    GNOME_COMPILE_WARNINGS(maximum)
52    DEPRECATED_FLAGS=""
53fi
54AC_SUBST(DEPRECATED_FLAGS)
55
56PKG_CHECK_MODULES(DEP,
57        gtk+-2.0 >= $GTK_REQUIRED_VERSION
58        libxml-2.0 >= $LIBXML_REQUIRED_VERSION
59        libgnomeprint-2.2 >= $GNOME_PRINT_REQUIRED_VERSION)
60AC_SUBST(DEP_CFLAGS)
61AC_SUBST(DEP_LIBS)
62
63# Check for GNU regex functions
64AH_TEMPLATE(NATIVE_GNU_REGEX, [Define if the C library implements the GNU regular expressions API])
65BUILD_GNU_REGEX=false
66AC_CHECK_FUNCS([re_compile_pattern re_compile_fastmap re_search re_match], [
67        AC_DEFINE(NATIVE_GNU_REGEX)
68], [
69        BUILD_GNU_REGEX=true
70])
71AM_CONDITIONAL(BUILD_GNU_REGEX,$BUILD_GNU_REGEX)
72
73# Do we build optional tests? (they require gnome-vfs)
74AC_ARG_ENABLE(build_tests,AC_HELP_STRING([--disable-build-tests],
75                                             [disable building of the test programs]),
76[case "${enableval}" in
77  yes) build_tests=true ;;
78  no)  build_tests=false ;;
79  *) AC_MSG_ERROR(bad value ${enableval} for --disable-build-tests) ;;
80esac],[build_tests=true])
81
82# Check for Gtk 2.4; we need that to build the tests, so disable tests if not found
83PKG_CHECK_MODULES(GTK24, gtk+-2.0 >= $GTK24_REQUIRED_VERSION,
84                         [], [build_tests=false])
85
86AM_CONDITIONAL(BUILD_TESTS, [test x$build_tests = xtrue])
87
88if test x$build_tests = xtrue; then
89        PKG_CHECK_MODULES(TESTS,
90                gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION
91                libgnomeprintui-2.2 >= $GNOME_PRINT_REQUIRED_VERSION)
92        AC_SUBST(TESTS_CFLAGS)
93        AC_SUBST(TESTS_LIBS)
94fi
95
96# I18N stuff
97ALL_LINGUAS="az ar be bg bn ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gu he hi hr hu id it ja ko lt mk mn ml ms nl no pa pl pt pt_BR ru sk sq sr sr@Latn sv ta tr uk vi zh_CN zh_TW"
98GETTEXT_PACKAGE=gtksourceview-1.0
99AC_SUBST(GETTEXT_PACKAGE)
100AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
101
102AM_GLIB_GNU_GETTEXT
103AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR)
104
105# gtk-doc
106GTK_DOC_CHECK([1.0])
107
108# Output files
109AC_CONFIG_FILES([
110gtksourceview-1.0.pc
111Makefile
112po/Makefile.in
113gtksourceview/Makefile
114gtksourceview/gnu-regex/Makefile
115gtksourceview/language-specs/Makefile
116docs/Makefile
117docs/reference/Makefile
118docs/reference/version.xml
119tests/Makefile
120])
121
122AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.