1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | |
---|
3 | AC_PREREQ(2.53) |
---|
4 | |
---|
5 | # Initialization and versioning |
---|
6 | AC_INIT(gtksourceview, 1.1.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gtksourceview) |
---|
7 | AC_CONFIG_SRCDIR([gtksourceview/gtksourcebuffer.h]) |
---|
8 | AM_CONFIG_HEADER(config.h) |
---|
9 | |
---|
10 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
---|
11 | |
---|
12 | dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work |
---|
13 | AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS") |
---|
14 | |
---|
15 | AM_MAINTAINER_MODE |
---|
16 | |
---|
17 | # Check for programs |
---|
18 | AC_PROG_CC |
---|
19 | AC_PROG_INSTALL |
---|
20 | AM_DISABLE_STATIC |
---|
21 | AM_PROG_LIBTOOL |
---|
22 | AC_PROG_INTLTOOL(0.30) |
---|
23 | |
---|
24 | # Check for headers and functions |
---|
25 | AC_HEADER_STDC |
---|
26 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
27 | AC_CHECK_FUNCS([memset]) |
---|
28 | |
---|
29 | # Dependencies |
---|
30 | GTK_REQUIRED_VERSION=2.2.4 |
---|
31 | GTK24_REQUIRED_VERSION=2.4.0 |
---|
32 | GNOME_VFS_REQUIRED_VERSION=2.2.0 |
---|
33 | LIBXML_REQUIRED_VERSION=2.5.0 |
---|
34 | GNOME_PRINT_REQUIRED_VERSION=2.7.0 |
---|
35 | |
---|
36 | AC_SUBST(GTK_REQUIRED_VERSION) |
---|
37 | AC_SUBST(GNOME_VFS_REQUIRED_VERSION) |
---|
38 | AC_SUBST(LIBXML_REQUIRED_VERSION) |
---|
39 | AC_SUBST(GNOME_PRINT_REQUIRED_VERSION) |
---|
40 | |
---|
41 | # Pull glib-genmarshal & co. |
---|
42 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
---|
43 | AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) |
---|
44 | |
---|
45 | # Environment |
---|
46 | GNOME_COMMON_INIT |
---|
47 | if 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" |
---|
50 | else |
---|
51 | GNOME_COMPILE_WARNINGS(maximum) |
---|
52 | DEPRECATED_FLAGS="" |
---|
53 | fi |
---|
54 | AC_SUBST(DEPRECATED_FLAGS) |
---|
55 | |
---|
56 | PKG_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) |
---|
60 | AC_SUBST(DEP_CFLAGS) |
---|
61 | AC_SUBST(DEP_LIBS) |
---|
62 | |
---|
63 | # Check for GNU regex functions |
---|
64 | AH_TEMPLATE(NATIVE_GNU_REGEX, [Define if the C library implements the GNU regular expressions API]) |
---|
65 | BUILD_GNU_REGEX=false |
---|
66 | AC_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 | ]) |
---|
71 | AM_CONDITIONAL(BUILD_GNU_REGEX,$BUILD_GNU_REGEX) |
---|
72 | |
---|
73 | # Do we build optional tests? (they require gnome-vfs) |
---|
74 | AC_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) ;; |
---|
80 | esac],[build_tests=true]) |
---|
81 | |
---|
82 | # Check for Gtk 2.4; we need that to build the tests, so disable tests if not found |
---|
83 | PKG_CHECK_MODULES(GTK24, gtk+-2.0 >= $GTK24_REQUIRED_VERSION, |
---|
84 | [], [build_tests=false]) |
---|
85 | |
---|
86 | AM_CONDITIONAL(BUILD_TESTS, [test x$build_tests = xtrue]) |
---|
87 | |
---|
88 | if 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) |
---|
94 | fi |
---|
95 | |
---|
96 | # I18N stuff |
---|
97 | ALL_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" |
---|
98 | GETTEXT_PACKAGE=gtksourceview-1.0 |
---|
99 | AC_SUBST(GETTEXT_PACKAGE) |
---|
100 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext]) |
---|
101 | |
---|
102 | AM_GLIB_GNU_GETTEXT |
---|
103 | AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR) |
---|
104 | |
---|
105 | # gtk-doc |
---|
106 | GTK_DOC_CHECK([1.0]) |
---|
107 | |
---|
108 | # Output files |
---|
109 | AC_CONFIG_FILES([ |
---|
110 | gtksourceview-1.0.pc |
---|
111 | Makefile |
---|
112 | po/Makefile.in |
---|
113 | gtksourceview/Makefile |
---|
114 | gtksourceview/gnu-regex/Makefile |
---|
115 | gtksourceview/language-specs/Makefile |
---|
116 | docs/Makefile |
---|
117 | docs/reference/Makefile |
---|
118 | docs/reference/version.xml |
---|
119 | tests/Makefile |
---|
120 | ]) |
---|
121 | |
---|
122 | AC_OUTPUT |
---|