1 | AC_PREREQ(2.54) |
---|
2 | |
---|
3 | # Making releases: |
---|
4 | # libgnome_micro_version += 1; |
---|
5 | # libgnome_interface_age += 1; |
---|
6 | # if any functions have been added, set libgnome_interface_age to 0. |
---|
7 | # if backwards compatibility has been broken, |
---|
8 | # set LIBGNOME_BINARY_AGE and LIBGNOME_INTERFACE_AGE to 0. |
---|
9 | # |
---|
10 | m4_define([libgnome_major_version], [2]) |
---|
11 | m4_define([libgnome_minor_version], [8]) |
---|
12 | m4_define([libgnome_micro_version], [1]) |
---|
13 | m4_define([libgnome_interface_age], [1]) |
---|
14 | # If you need a modifier for the version number. |
---|
15 | # Normally empty, but can be used to make "fixup" releases. |
---|
16 | m4_define([libgnome_extraversion], []) |
---|
17 | |
---|
18 | dnl required versions of other tools. |
---|
19 | m4_define([audiofile_required_version], [0.2.3]) |
---|
20 | m4_define([esound_required_version], [0.2.26]) |
---|
21 | m4_define([gconf_required_version], [1.1.11]) |
---|
22 | m4_define([glib_required_version], [2.0.3]) |
---|
23 | m4_define([gnome_vfs_required_version], [2.5.3]) |
---|
24 | m4_define([libbonobo_required_version], [2.0.0]) |
---|
25 | |
---|
26 | |
---|
27 | dnl libtool versioning from libgnome |
---|
28 | m4_define([libgnome_current], [m4_eval(100 * libgnome_minor_version + libgnome_micro_version - libgnome_interface_age)]) |
---|
29 | m4_define([libgnome_binary_age], [m4_eval(100 * libgnome_minor_version + libgnome_micro_version)]) |
---|
30 | m4_define([libgnome_revision], [libgnome_interface_age]) |
---|
31 | m4_define([libgnome_age], [m4_eval(libgnome_binary_age - libgnome_interface_age)]) |
---|
32 | m4_define([libgnome_version], [libgnome_major_version().libgnome_minor_version().libgnome_micro_version()libgnome_extraversion()]) |
---|
33 | |
---|
34 | AC_INIT([libgnome], [libgnome_version], |
---|
35 | [http://bugzilla.gnome.org/enter_bug.cgi?product=libgnome]) |
---|
36 | AC_CONFIG_SRCDIR([libgnome/libgnome.h]) |
---|
37 | |
---|
38 | LIBGNOME_MAJOR_VERSION=libgnome_major_version |
---|
39 | LIBGNOME_MINOR_VERSION=libgnome_minor_version |
---|
40 | LIBGNOME_MICRO_VERSION=libgnome_micro_version |
---|
41 | LIBGNOME_INTERFACE_AGE=libgnome_interface_age |
---|
42 | |
---|
43 | LIBGNOME_CURRENT=libgnome_current |
---|
44 | LIBGNOME_REVISION=libgnome_revision |
---|
45 | LIBGNOME_AGE=libgnome_age |
---|
46 | |
---|
47 | AC_SUBST(LIBGNOME_CURRENT) |
---|
48 | AC_SUBST(LIBGNOME_REVISION) |
---|
49 | AC_SUBST(LIBGNOME_AGE) |
---|
50 | |
---|
51 | AM_INIT_AUTOMAKE |
---|
52 | AM_CONFIG_HEADER(config.h) |
---|
53 | |
---|
54 | AM_MAINTAINER_MODE |
---|
55 | |
---|
56 | dnl make aclocal calls respect $ACLOCAL_FLAGS |
---|
57 | ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" |
---|
58 | AC_SUBST(ACLOCAL_AMFLAGS) |
---|
59 | |
---|
60 | dnl |
---|
61 | dnl Due to the sed scripts being split on 90 line |
---|
62 | dnl blocks, this macro needs to be right at the beginning. |
---|
63 | dnl |
---|
64 | AC_PROG_INTLTOOL([0.21]) |
---|
65 | |
---|
66 | AC_ISC_POSIX |
---|
67 | AC_PROG_CC |
---|
68 | AC_STDC_HEADERS |
---|
69 | AC_LIBTOOL_WIN32_DLL |
---|
70 | AM_PROG_LIBTOOL |
---|
71 | |
---|
72 | AC_CHECK_FUNCS([setenv unsetenv clearenv setfsgid]) |
---|
73 | AC_CHECK_HEADERS(sys/fsuid.h) |
---|
74 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
75 | |
---|
76 | GETTEXT_PACKAGE=libgnome-2.0 |
---|
77 | AC_SUBST(GETTEXT_PACKAGE) |
---|
78 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package]) |
---|
79 | |
---|
80 | ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko lt lv mk ml mn ms nb ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tr uk vi wa yi zh_CN zh_TW" |
---|
81 | AM_GLIB_GNU_GETTEXT |
---|
82 | AM_GLIB_DEFINE_LOCALEDIR([LIBGNOME_LOCALEDIR]) |
---|
83 | |
---|
84 | GNOME_COMPILE_WARNINGS |
---|
85 | |
---|
86 | dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given. |
---|
87 | GNOME_DEBUG_CHECK |
---|
88 | |
---|
89 | dnl Don't use AC_PROG_AWK since we need the full pathname. |
---|
90 | AC_PATH_PROGS(AWK, mawk gawk nawk awk, ) |
---|
91 | AC_PATH_PROGS(PERL, perl5 perl) |
---|
92 | |
---|
93 | # define a MAINT-like variable REBUILD which is set if Perl |
---|
94 | # and awk are found, so autogenerated sources can be rebuilt |
---|
95 | AC_ARG_ENABLE(rebuilds, |
---|
96 | AC_HELP_STRING([--disable-rebuilds], |
---|
97 | [disable all source autogeneration rules]),, |
---|
98 | [enable_rebuilds=yes]) |
---|
99 | REBUILD=\# |
---|
100 | if test "x$enable_rebuilds" = "xyes" && \ |
---|
101 | test -n "$PERL" && \ |
---|
102 | $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ |
---|
103 | test -n "$AWK" ; then |
---|
104 | REBUILD= |
---|
105 | fi |
---|
106 | AC_SUBST(REBUILD) |
---|
107 | |
---|
108 | dnl |
---|
109 | dnl Start of pkg-config checks |
---|
110 | dnl |
---|
111 | dnl We first check for esound and audiofile (which has conditional |
---|
112 | dnl support built in) |
---|
113 | dnl |
---|
114 | |
---|
115 | SOUND_MODULES="esound >= esound_required_version dnl |
---|
116 | audiofile >= audiofile_required_version" |
---|
117 | PKG_CHECK_MODULES(SOUND_TEST, [$SOUND_MODULES], |
---|
118 | [ |
---|
119 | AC_DEFINE(HAVE_LIBAUDIOFILE,, [Compile with audiofile support]) |
---|
120 | AC_DEFINE(HAVE_ESD,, [Compile with esd support]) |
---|
121 | ],[ |
---|
122 | SOUND_MODULES="" |
---|
123 | ]) |
---|
124 | |
---|
125 | PKG_CHECK_MODULES(LIBGNOME, dnl |
---|
126 | [glib-2.0 >= glib_required_version dnl |
---|
127 | gmodule-2.0 >= glib_required_version dnl |
---|
128 | gobject-2.0 >= glib_required_version dnl |
---|
129 | gnome-vfs-2.0 >= gnome_vfs_required_version dnl |
---|
130 | libbonobo-2.0 >= libbonobo_required_version dnl |
---|
131 | gconf-2.0 >= gconf_required_version dnl |
---|
132 | $SOUND_MODULES]) |
---|
133 | |
---|
134 | dnl |
---|
135 | dnl Check for gtk-doc |
---|
136 | dnl |
---|
137 | GTK_DOC_CHECK([1.0]) |
---|
138 | |
---|
139 | dnl Specify the gconf configuration source, |
---|
140 | dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults |
---|
141 | |
---|
142 | dnl ============================================== |
---|
143 | dnl Special GConf section |
---|
144 | dnl ============================================== |
---|
145 | |
---|
146 | AC_PATH_PROG(GCONFTOOL, gconftool-2, no) |
---|
147 | |
---|
148 | if test x"$GCONFTOOL" = xno; then |
---|
149 | AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) |
---|
150 | fi |
---|
151 | |
---|
152 | AM_GCONF_SOURCE_2 |
---|
153 | |
---|
154 | dnl |
---|
155 | dnl Substitute these |
---|
156 | dnl |
---|
157 | GNOME_VFS_VERSION=`$PKG_CONFIG --modversion gnome-vfs-2.0` |
---|
158 | AC_SUBST(GNOME_VFS_VERSION) |
---|
159 | |
---|
160 | AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build |
---|
161 | libgnome. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
162 | |
---|
163 | AC_CONFIG_FILES([ |
---|
164 | Makefile |
---|
165 | po/Makefile.in |
---|
166 | libgnome/Makefile |
---|
167 | monikers/Makefile |
---|
168 | schemas/Makefile |
---|
169 | gnome-data/Makefile |
---|
170 | libgnome/libgnome-2.0.pc |
---|
171 | libgnome/libgnome-2.0-uninstalled.pc |
---|
172 | doc/Makefile |
---|
173 | doc/reference/Makefile |
---|
174 | doc/reference/version.xml |
---|
175 | ]) |
---|
176 | |
---|
177 | AC_OUTPUT |
---|