1 | AC_INIT(libgnome) |
---|
2 | |
---|
3 | # Making releases: |
---|
4 | # LIBGNOME_MICRO_VERSION += 1; |
---|
5 | # LIBGNOME_INTERFACE_AGE += 1; |
---|
6 | # LIBGNOME_BINARY_AGE += 1; |
---|
7 | # if any functions have been added, set LIBGNOME_INTERFACE_AGE to 0. |
---|
8 | # if backwards compatibility has been broken, |
---|
9 | # set LIBGNOME_BINARY_AGE and LIBGNOME_INTERFACE_AGE to 0. |
---|
10 | # |
---|
11 | LIBGNOME_MAJOR_VERSION=2 |
---|
12 | LIBGNOME_MINOR_VERSION=2 |
---|
13 | LIBGNOME_MICRO_VERSION=0 |
---|
14 | LIBGNOME_INTERFACE_AGE=0 |
---|
15 | LIBGNOME_BINARY_AGE=200 |
---|
16 | # If you need a modifier for the version number. |
---|
17 | # Normally empty, but can be used to make "fixup" releases. |
---|
18 | LIBGNOME_EXTRAVERSION=.1 |
---|
19 | |
---|
20 | dnl libtool versioning from libgnome |
---|
21 | |
---|
22 | LIBGNOME_CURRENT=`expr 100 '*' $LIBGNOME_MINOR_VERSION + $LIBGNOME_MICRO_VERSION - $LIBGNOME_INTERFACE_AGE` |
---|
23 | LIBGNOME_REVISION=$LIBGNOME_INTERFACE_AGE |
---|
24 | LIBGNOME_AGE=`expr $LIBGNOME_BINARY_AGE - $LIBGNOME_INTERFACE_AGE` |
---|
25 | LIBGNOME_VERSION=$LIBGNOME_MAJOR_VERSION.$LIBGNOME_MINOR_VERSION.$LIBGNOME_MICRO_VERSION$LIBGNOME_EXTRAVERSION |
---|
26 | |
---|
27 | AC_SUBST(LIBGNOME_CURRENT) |
---|
28 | AC_SUBST(LIBGNOME_REVISION) |
---|
29 | AC_SUBST(LIBGNOME_AGE) |
---|
30 | |
---|
31 | AM_CONFIG_HEADER(config.h) |
---|
32 | AM_INIT_AUTOMAKE(libgnome, $LIBGNOME_VERSION) |
---|
33 | |
---|
34 | AM_MAINTAINER_MODE |
---|
35 | |
---|
36 | dnl |
---|
37 | dnl Due to the sed scripts being split on 90 line |
---|
38 | dnl blocks, this macro needs to be right at the beginning. |
---|
39 | dnl |
---|
40 | AC_PROG_INTLTOOL |
---|
41 | |
---|
42 | AC_ISC_POSIX |
---|
43 | AC_PROG_CC |
---|
44 | AC_STDC_HEADERS |
---|
45 | AM_PROG_LIBTOOL |
---|
46 | AC_PROG_YACC |
---|
47 | AC_PATH_PROGS(PATH_TO_XRDB, "xrdb") |
---|
48 | |
---|
49 | AC_CHECK_FUNCS([setenv unsetenv clearenv setfsgid]) |
---|
50 | AC_CHECK_HEADERS(sys/fsuid.h) |
---|
51 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
52 | |
---|
53 | GETTEXT_PACKAGE=libgnome-2.0 |
---|
54 | AC_SUBST(GETTEXT_PACKAGE) |
---|
55 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package]) |
---|
56 | |
---|
57 | |
---|
58 | AC_CANONICAL_HOST |
---|
59 | case $host in |
---|
60 | *-linux-gnu | *-irix6*) AC_DEFINE(HAVE_MAN_WHEREIS, 1, [man(1) understands -w option]);; |
---|
61 | *-solaris*) AC_DEFINE(HAVE_MAN_DEBUG, 1, [man(1) has a -d debug option]);; |
---|
62 | esac |
---|
63 | |
---|
64 | ALL_LINGUAS="am ar az be bg bs ca cs da de el en_GB es et eu fa fi fr gl he hi hu it ja ko lt lv mk mn ms nl nn no pl pt pt_BR ro ru sk sl sv ta tr uk vi wa zh_CN zh_TW" |
---|
65 | AM_GLIB_GNU_GETTEXT |
---|
66 | gnomelocaledir='${prefix}/${DATADIRNAME}/locale' |
---|
67 | AC_SUBST(gnomelocaledir) |
---|
68 | |
---|
69 | AC_SUBST(CFLAGS) |
---|
70 | AC_SUBST(CPPFLAGS) |
---|
71 | AC_SUBST(LDFLAGS) |
---|
72 | |
---|
73 | GNOME_COMPILE_WARNINGS |
---|
74 | |
---|
75 | dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given. |
---|
76 | GNOME_DEBUG_CHECK |
---|
77 | |
---|
78 | dnl Don't use AC_PROG_AWK since we need the full pathname. |
---|
79 | AC_PATH_PROGS(AWK, mawk gawk nawk awk, ) |
---|
80 | AC_PATH_PROGS(PERL, perl5 perl) |
---|
81 | |
---|
82 | # define a MAINT-like variable REBUILD which is set if Perl |
---|
83 | # and awk are found, so autogenerated sources can be rebuilt |
---|
84 | AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) |
---|
85 | REBUILD=\# |
---|
86 | if test "x$enable_rebuilds" = "xyes" && \ |
---|
87 | test -n "$PERL" && \ |
---|
88 | $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ |
---|
89 | test -n "$AWK" ; then |
---|
90 | REBUILD= |
---|
91 | fi |
---|
92 | AC_SUBST(REBUILD) |
---|
93 | |
---|
94 | AUDIOFILE_REQUIRED_VERSION=0.2.3 |
---|
95 | ESOUND_REQUIRED_VERSION=0.2.26 |
---|
96 | GCONF_REQUIRED_VERSION=1.1.11 |
---|
97 | GLIB_REQUIRED_VERSION=2.0.3 |
---|
98 | GNOME_VFS_REQUIRED_VERSION=1.9.16 |
---|
99 | LIBBONOBO_REQUIRED_VERSION=2.0.0 |
---|
100 | LIBXML_REQUIRED_VERSION=2.4.22 |
---|
101 | LIBXSLT_REQUIRED_VERSION=1.0.18 |
---|
102 | |
---|
103 | dnl |
---|
104 | dnl Start of pkg-config checks |
---|
105 | dnl |
---|
106 | dnl We first check for esound and audiofile (which has conditional |
---|
107 | dnl support built in) |
---|
108 | dnl |
---|
109 | |
---|
110 | AUDIOFILE_MODULE="audiofile >= $AUDIOFILE_REQUIRED_VERSION" |
---|
111 | ESOUND_MODULE="esound >= $ESOUND_REQUIRED_VERSION" |
---|
112 | PKG_CHECK_MODULES(SOUND_TEST, $ESOUND_MODULE $AUDIOFILE_MODULE, [ |
---|
113 | AC_DEFINE(HAVE_LIBAUDIOFILE, 1, [Compile with audiofile support]) |
---|
114 | AC_DEFINE(HAVE_ESD, 1, [Compile with esd support]) |
---|
115 | ],[ |
---|
116 | AUDIOFILE_MODULE="" |
---|
117 | ESOUND_MODULE="" |
---|
118 | ]) |
---|
119 | |
---|
120 | PKG_CHECK_MODULES(LIBGNOME, glib-2.0 >= $GLIB_REQUIRED_VERSION gmodule-2.0 >= $GLIB_REQUIRED_VERSION gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION \ |
---|
121 | libxml-2.0 >= $LIBXML_REQUIRED_VERSION libbonobo-2.0 >= $LIBBONOBO_REQUIRED_VERSION gconf-2.0 >= $GCONF_REQUIRED_VERSION \ |
---|
122 | $AUDIOFILE_MODULE $ESOUND_MODULE) |
---|
123 | |
---|
124 | PKG_CHECK_MODULES(HELP_VFS_MODULE, glib-2.0 >= $GLIB_REQUIRED_VERSION gmodule-2.0 >= $GLIB_REQUIRED_VERSION gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION gnome-vfs-module-2.0 >= $GNOME_VFS_REQUIRED_VERSION \ |
---|
125 | libxml-2.0 >= $LIBXML_REQUIRED_VERSION libbonobo-2.0 >= $LIBBONOBO_REQUIRED_VERSION) |
---|
126 | |
---|
127 | PKG_CHECK_MODULES(HELP_DOCBOOK_MODULE, glib-2.0 >= $GLIB_REQUIRED_VERSION libxslt >= $LIBXSLT_REQUIRED_VERSION libxml-2.0 >= $LIBXML_REQUIRED_VERSION) |
---|
128 | AC_SUBST(HELP_DOCBOOK_MODULE_CFLAGS) |
---|
129 | AC_SUBST(HELP_DOCBOOK_MODULE_LIBS) |
---|
130 | |
---|
131 | dnl |
---|
132 | dnl Check for gtk-doc |
---|
133 | dnl |
---|
134 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
---|
135 | |
---|
136 | if test "x$with_html_dir" = "x" ; then |
---|
137 | HTML_DIR='${datadir}/gtk-doc/html' |
---|
138 | else |
---|
139 | HTML_DIR=$with_html_dir |
---|
140 | fi |
---|
141 | |
---|
142 | AC_SUBST(HTML_DIR) |
---|
143 | |
---|
144 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
145 | |
---|
146 | gtk_doc_min_version=0.6 |
---|
147 | if $GTKDOC ; then |
---|
148 | gtk_doc_version=`gtkdoc-mkdb --version` |
---|
149 | AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) |
---|
150 | |
---|
151 | IFS="${IFS= }"; gtk_save_IFS="$IFS"; IFS="." |
---|
152 | set $gtk_doc_version |
---|
153 | for min in $gtk_doc_min_version ; do |
---|
154 | cur=$1; shift |
---|
155 | if test -z $min ; then break; fi |
---|
156 | if test -z $cur ; then GTKDOC=false; break; fi |
---|
157 | if test $cur -gt $min ; then break ; fi |
---|
158 | if test $cur -lt $min ; then GTKDOC=false; break ; fi |
---|
159 | done |
---|
160 | IFS="$gtk_save_IFS" |
---|
161 | |
---|
162 | if $GTKDOC ; then |
---|
163 | AC_MSG_RESULT(yes) |
---|
164 | else |
---|
165 | AC_MSG_RESULT(no) |
---|
166 | GTKDOC=false |
---|
167 | fi |
---|
168 | fi |
---|
169 | |
---|
170 | dnl Let people disable the gtk-doc stuff. |
---|
171 | AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) |
---|
172 | |
---|
173 | if test x$enable_gtk_doc = xauto ; then |
---|
174 | if test x$GTKDOC = xtrue ; then |
---|
175 | enable_gtk_doc=yes |
---|
176 | else |
---|
177 | enable_gtk_doc=no |
---|
178 | fi |
---|
179 | fi |
---|
180 | |
---|
181 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
182 | |
---|
183 | dnl Specify the gconf configuration source, |
---|
184 | dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults |
---|
185 | |
---|
186 | dnl ============================================== |
---|
187 | dnl Special GConf section |
---|
188 | dnl ============================================== |
---|
189 | |
---|
190 | AC_PATH_PROG(GCONFTOOL, gconftool-2, no) |
---|
191 | |
---|
192 | if test x"$GCONFTOOL" = xno; then |
---|
193 | AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) |
---|
194 | fi |
---|
195 | |
---|
196 | AM_GCONF_SOURCE_2 |
---|
197 | |
---|
198 | dnl |
---|
199 | dnl Substitute these |
---|
200 | dnl |
---|
201 | AC_SUBST(LIBGNOME_CFLAGS) |
---|
202 | AC_SUBST(LIBGNOME_LIBS) |
---|
203 | |
---|
204 | AC_SUBST(HELP_VFS_MODULE_CFLAGS) |
---|
205 | AC_SUBST(HELP_VFS_MODULE_LIBS) |
---|
206 | |
---|
207 | GNOME_VFS_VERSION=`$PKG_CONFIG --modversion gnome-vfs-2.0` |
---|
208 | AC_SUBST(GNOME_VFS_VERSION) |
---|
209 | |
---|
210 | AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build |
---|
211 | libgnome. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
212 | |
---|
213 | dnl ==================================== |
---|
214 | dnl = zlib for help converters |
---|
215 | dnl ==================================== |
---|
216 | AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz |
---|
217 | AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required])) |
---|
218 | |
---|
219 | dnl ==================================== |
---|
220 | dnl = Bzip2, for the help converters |
---|
221 | dnl ==================================== |
---|
222 | BZ_LIBS= |
---|
223 | AC_CHECK_LIB(bz2, bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 suppot]) |
---|
224 | BZ_LIBS="-lbz2"]) |
---|
225 | dnl <= Check for bzip2 > 1.0.0 |
---|
226 | AC_CHECK_LIB(bz2, BZ2_bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 support]) |
---|
227 | BZ_LIBS="-lbz2" |
---|
228 | dnl <= define the wrapper-functions to get the Bzip2 stuff working .. => |
---|
229 | AC_DEFINE(bzread,BZ2_bzread, [Needed to get Bzip2 working]) |
---|
230 | AC_DEFINE(bzopen,BZ2_bzopen, [Needed to get Bzip2 working]) |
---|
231 | AC_DEFINE(bzdopen,BZ2_bzdopen, [Needed to get Bzip2 working]) |
---|
232 | AC_DEFINE(bzwrite,BZ2_bzwrite, [Needed to get Bzip2 working]) |
---|
233 | AC_DEFINE(bzerror,BZ2_bzerror, [Needed to get Bzip2 working]) |
---|
234 | AC_DEFINE(bzclose,BZ2_bzclose, [Needed to get Bzip2 working]) |
---|
235 | AC_DEFINE(bzflush,BZ2_bzflush, [Needed to get Bzip2 working]) |
---|
236 | AC_DEFINE(bzCompress,BZ2_bzCompress, [Needed to get Bzip2 working]) |
---|
237 | AC_DEFINE(bzCompressInit,BZ2_bzCompressInit, [Needed to get Bzip2 working]) |
---|
238 | AC_DEFINE(bzDecompress,BZ2_bzDecompress, [Needed to get Bzip2 working]) |
---|
239 | AC_DEFINE(bzDecompressInit,BZ2_bzDecompressInit, [Needed to get Bzip2 working]) |
---|
240 | ]) |
---|
241 | dnl => |
---|
242 | AC_SUBST(BZ_LIBS) |
---|
243 | |
---|
244 | AC_OUTPUT([ |
---|
245 | Makefile |
---|
246 | po/Makefile.in |
---|
247 | libgnome/Makefile |
---|
248 | monikers/Makefile |
---|
249 | schemas/Makefile |
---|
250 | gnome-data/Makefile |
---|
251 | libgnome/libgnome-2.0.pc |
---|
252 | help-converters/Makefile |
---|
253 | help-converters/docbook/Makefile |
---|
254 | help-converters/docbook/gnome-customization/Makefile |
---|
255 | help-converters/man/Makefile |
---|
256 | help-converters/info/Makefile |
---|
257 | help-converters/gnome-vfs-module/Makefile |
---|
258 | doc/Makefile |
---|
259 | doc/reference/Makefile |
---|
260 | ]) |
---|
261 | |
---|
262 | |
---|