1 | AC_PREREQ(2.54) |
---|
2 | |
---|
3 | # Making releases: |
---|
4 | # LIBGNOMEUI_MICRO_VERSION += 1; |
---|
5 | # LIBGNOMEUI_INTERFACE_AGE += 1; |
---|
6 | # LIBGNOMEUI_BINARY_AGE += 1; |
---|
7 | # if any functions have been added, set LIBGNOMEUI_INTERFACE_AGE to 0. |
---|
8 | # if backwards compatibility has been broken, |
---|
9 | # set LIBGNOMEUI_BINARY_AGE and LIBGNOMEUI_INTERFACE_AGE to 0. |
---|
10 | # |
---|
11 | m4_define([libgnomeui_major_version], [2]) |
---|
12 | m4_define([libgnomeui_minor_version], [8]) |
---|
13 | m4_define([libgnomeui_micro_version], [1]) |
---|
14 | m4_define([libgnomeui_interface_age], [1]) |
---|
15 | # If you need a modifier for the version number. |
---|
16 | # Normally empty, but can be used to make "fixup" releases. |
---|
17 | m4_define([libgnomeui_extraversion], []) |
---|
18 | |
---|
19 | dnl Required versions of other packages |
---|
20 | m4_define([esound_required_version], [0.2.26]) |
---|
21 | m4_define([audiofile_required_version], [0.2.3]) |
---|
22 | m4_define([libgnome_required_version], [2.0.0]) |
---|
23 | m4_define([libgnomecanvas_required_version], [2.0.0]) |
---|
24 | m4_define([libbonoboui_required_version], [2.0.0]) |
---|
25 | m4_define([gconf_required_version], [1.1.11]) |
---|
26 | m4_define([pango_required_version], [1.1.2]) |
---|
27 | m4_define([gtk_required_version], [2.4.1]) |
---|
28 | m4_define([gnomevfs_required_version], [2.7.3]) |
---|
29 | m4_define([libglade_required_version], [2.0.0]) |
---|
30 | m4_define([gnome_keyring_required_version], [0.4]) |
---|
31 | |
---|
32 | dnl libtool versioning from libgnome |
---|
33 | |
---|
34 | m4_define([libgnomeui_current], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version - libgnomeui_interface_age)]) |
---|
35 | m4_define([libgnomeui_binary_age], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version)]) |
---|
36 | m4_define([libgnomeui_revision], [libgnomeui_interface_age]) |
---|
37 | m4_define([libgnomeui_age], [m4_eval(libgnomeui_binary_age - libgnomeui_interface_age)]) |
---|
38 | m4_define([libgnomeui_version], [libgnomeui_major_version().libgnomeui_minor_version().libgnomeui_micro_version()libgnomeui_extraversion()]) |
---|
39 | |
---|
40 | AC_INIT([libgnomeui], [libgnomeui_version], |
---|
41 | [http://bugzilla.gnome.org/enter_bug.cgi?product=libgnomeui]) |
---|
42 | AC_CONFIG_SRCDIR([libgnomeui/libgnomeui.h]) |
---|
43 | |
---|
44 | LIBGNOMEUI_MAJOR_VERSION=libgnomeui_major_version |
---|
45 | LIBGNOMEUI_MINOR_VERSION=libgnomeui_minor_version |
---|
46 | LIBGNOMEUI_MICRO_VERSION=libgnomeui_micro_version |
---|
47 | LIBGNOMEUI_INTERFACE_AGE=libgnomeui_interface_age |
---|
48 | |
---|
49 | dnl libtool versioning from libgnome |
---|
50 | |
---|
51 | LIBGNOMEUI_CURRENT=libgnomeui_current |
---|
52 | LIBGNOMEUI_REVISION=libgnomeui_revision |
---|
53 | LIBGNOMEUI_AGE=libgnomeui_age |
---|
54 | |
---|
55 | AC_SUBST(LIBGNOMEUI_CURRENT) |
---|
56 | AC_SUBST(LIBGNOMEUI_REVISION) |
---|
57 | AC_SUBST(LIBGNOMEUI_AGE) |
---|
58 | |
---|
59 | AM_INIT_AUTOMAKE |
---|
60 | AM_CONFIG_HEADER(config.h) |
---|
61 | |
---|
62 | AM_MAINTAINER_MODE |
---|
63 | |
---|
64 | dnl make aclocal calls respect $ACLOCAL_FLAGS |
---|
65 | ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" |
---|
66 | AC_SUBST(ACLOCAL_AMFLAGS) |
---|
67 | |
---|
68 | AC_ISC_POSIX |
---|
69 | AC_PROG_CC |
---|
70 | AC_STDC_HEADERS |
---|
71 | AC_LIBTOOL_WIN32_DLL |
---|
72 | AM_PROG_LIBTOOL |
---|
73 | |
---|
74 | GETTEXT_PACKAGE=libgnomeui-2.0 |
---|
75 | AC_SUBST(GETTEXT_PACKAGE) |
---|
76 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", |
---|
77 | [Name of gettext translation domain for library]) |
---|
78 | |
---|
79 | ALL_LINGUAS="af am ar az be bg bn br bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja kn ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk vi wa yi zh_CN zh_TW zu" |
---|
80 | AM_GLIB_GNU_GETTEXT |
---|
81 | AM_GLIB_DEFINE_LOCALEDIR([GNOMEUILOCALEDIR]) |
---|
82 | |
---|
83 | GNOME_COMPILE_WARNINGS |
---|
84 | |
---|
85 | dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given. |
---|
86 | GNOME_DEBUG_CHECK |
---|
87 | |
---|
88 | dnl |
---|
89 | dnl Check for -lSM (for gnome-client) |
---|
90 | dnl |
---|
91 | |
---|
92 | AC_PATH_XTRA |
---|
93 | |
---|
94 | SM_LIBS="" |
---|
95 | sm_save_cppflags="$CPPFLAGS" |
---|
96 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
---|
97 | |
---|
98 | GNOME_HAVE_SM=true |
---|
99 | AC_CHECK_LIB(SM, SmcSaveYourselfDone, |
---|
100 | [SM_LIBS="$X_LIBS -lSM -lICE"],GNOME_HAVE_SM=false, |
---|
101 | $X_LIBS -lICE) |
---|
102 | AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) |
---|
103 | if test "$GNOME_HAVE_SM" = true; then |
---|
104 | AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed]) |
---|
105 | fi |
---|
106 | |
---|
107 | AC_SUBST(SM_LIBS) |
---|
108 | CPPFLAGS="$sm_save_cppflags" |
---|
109 | |
---|
110 | dnl |
---|
111 | dnl Start of pkg-config checks |
---|
112 | dnl |
---|
113 | |
---|
114 | dnl We first check for esound and audiofile (which has conditional |
---|
115 | dnl support built in) |
---|
116 | dnl |
---|
117 | SOUND_MODULES="esound >= esound_required_version dnl |
---|
118 | audiofile >= audiofile_required_version" |
---|
119 | PKG_CHECK_MODULES(SOUND_TEST, [$SOUND_MODULES], [ |
---|
120 | AC_DEFINE(HAVE_LIBAUDIOFILE, 1, |
---|
121 | [Define to 1 if you have libaudiofile installed]) |
---|
122 | AC_DEFINE(HAVE_ESD, 1, |
---|
123 | [Define to 1 if you have libesd installed]) |
---|
124 | esd_msg=yes |
---|
125 | ],[ |
---|
126 | SOUND_MODULES="" |
---|
127 | esd_msg=no |
---|
128 | ]) |
---|
129 | |
---|
130 | dnl |
---|
131 | dnl libjpeg |
---|
132 | dnl |
---|
133 | if test -z "$LIBJPEG"; then |
---|
134 | AC_CHECK_LIB(jpeg, jpeg_start_decompress, |
---|
135 | [AC_CHECK_HEADER(jpeglib.h, |
---|
136 | jpeg_ok=yes, |
---|
137 | jpeg_ok=no)], |
---|
138 | AC_MSG_WARN(*** (jpeg library not found) ***), -lm) |
---|
139 | if test "$jpeg_ok" = yes; then |
---|
140 | JPEG='jpeg'; LIBJPEG='-ljpeg' |
---|
141 | AC_DEFINE(HAVE_LIBJPEG, 1, |
---|
142 | [Define to 1 if you have libjpeg installed]) |
---|
143 | else |
---|
144 | AC_MSG_WARN(*** JPEG thumbnail loader will not be built (jpeg header file not found) ***) |
---|
145 | fi |
---|
146 | fi |
---|
147 | |
---|
148 | AC_SUBST(LIBJPEG) |
---|
149 | |
---|
150 | GNOMEUI_MODULES="dnl |
---|
151 | libgnome-2.0 >= libgnome_required_version dnl |
---|
152 | libgnomecanvas-2.0 >= libgnomecanvas_required_version dnl |
---|
153 | libbonoboui-2.0 >= libbonoboui_required_version dnl |
---|
154 | gconf-2.0 >= gconf_required_version dnl |
---|
155 | pango >= pango_required_version dnl |
---|
156 | gnome-vfs-2.0 >= gnomevfs_required_version dnl |
---|
157 | gnome-keyring-1 >= gnome_keyring_required_version" |
---|
158 | PKG_CHECK_MODULES(LIBGNOMEUI, [$GNOMEUI_MODULES]) |
---|
159 | LIBGNOMEUI_LIBS="$LIBGNOMEUI_LIBS $LIBJPEG" |
---|
160 | |
---|
161 | PKG_CHECK_MODULES(LIBGNOMEUI_COMPONENTS, [$GNOMEUI_MODULES]) |
---|
162 | PKG_CHECK_MODULES(LIBGNOMEUI_DEMOS, [$GNOMEUI_MODULES]) |
---|
163 | PKG_CHECK_MODULES(LIBGNOMEUI_GLADE, [$GNOMEUI_MODULES dnl |
---|
164 | libglade-2.0 >= libglade_required_version]) |
---|
165 | AC_PATH_PROG(LIBGLADE_CONVERT, libglade-convert) |
---|
166 | if test -z "$LIBGLADE_CONVERT" ; then |
---|
167 | AC_MSG_WARN([libglade-convert (from libglade 2.0) is needed for the checks in the tests directory.]) |
---|
168 | fi |
---|
169 | |
---|
170 | dnl File Chooser stuff |
---|
171 | PKG_CHECK_MODULES(FILE_SYSTEM, |
---|
172 | [gtk+-2.0 >= gtk_required_version dnl |
---|
173 | gnome-vfs-2.0 >= gnomevfs_required_version]) |
---|
174 | |
---|
175 | GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0` |
---|
176 | AC_SUBST(GTK_BINARY_VERSION) |
---|
177 | |
---|
178 | dnl |
---|
179 | dnl Check for gtk-doc |
---|
180 | dnl |
---|
181 | GTK_DOC_CHECK([1.0]) |
---|
182 | |
---|
183 | |
---|
184 | dnl AC_SUBST GTK+ version |
---|
185 | GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0` |
---|
186 | AC_SUBST(GTK_VERSION) |
---|
187 | |
---|
188 | AC_MSG_CHECKING([for gtk+ multihead support]) |
---|
189 | if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then |
---|
190 | AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found]) |
---|
191 | AC_MSG_RESULT(yes) |
---|
192 | else |
---|
193 | AC_MSG_RESULT(no) |
---|
194 | fi |
---|
195 | |
---|
196 | AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build |
---|
197 | libgnomeui. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
198 | |
---|
199 | AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h) |
---|
200 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
201 | |
---|
202 | dnl This is installed from GTK+ 2.0's gdk-pixbuf |
---|
203 | AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) |
---|
204 | test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_ERROR([ |
---|
205 | *** You need the gdk-pixbuf-csource tool which is installed |
---|
206 | *** from GTK+ 2.0's gdk-pixbuf. |
---|
207 | *** |
---|
208 | *** Either the location where you installed your GTK+ 2.0 is |
---|
209 | *** not in your PATH or something is screwed up with your |
---|
210 | *** GTK+ 2.0 installation |
---|
211 | ]) |
---|
212 | |
---|
213 | dnl Don't use AC_PROG_AWK since we need the full pathname. |
---|
214 | AC_PATH_PROGS(AWK, mawk gawk nawk awk, ) |
---|
215 | AC_PATH_PROGS(PERL, perl5 perl) |
---|
216 | |
---|
217 | AC_PATH_PROG(GCONFTOOL, gconftool-2) |
---|
218 | |
---|
219 | # define a MAINT-like variable REBUILD which is set if Perl |
---|
220 | # and awk are found, so autogenerated sources can be rebuilt |
---|
221 | AC_ARG_ENABLE(rebuilds, |
---|
222 | AC_HELP_STRING([--disable-rebuilds], |
---|
223 | [disable all source autogeneration rules]),, |
---|
224 | [enable_rebuilds=yes]) |
---|
225 | REBUILD=\# |
---|
226 | if test "x$enable_rebuilds" = "xyes" && \ |
---|
227 | test -n "$PERL" && \ |
---|
228 | $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ |
---|
229 | test -n "$AWK" ; then |
---|
230 | REBUILD= |
---|
231 | fi |
---|
232 | AC_SUBST(REBUILD) |
---|
233 | |
---|
234 | AC_CONFIG_FILES([ |
---|
235 | Makefile |
---|
236 | po/Makefile.in |
---|
237 | libgnomeui/Makefile |
---|
238 | libgnomeui/libgnomeui-2.0.pc |
---|
239 | libgnomeui/pixmaps/Makefile |
---|
240 | file-chooser/Makefile |
---|
241 | glade/Makefile |
---|
242 | images/Makefile |
---|
243 | demos/Makefile |
---|
244 | test-gnome/Makefile |
---|
245 | doc/Makefile |
---|
246 | doc/reference/Makefile |
---|
247 | doc/reference/version.xml |
---|
248 | ]) |
---|
249 | |
---|
250 | AC_OUTPUT |
---|
251 | echo "configuration: |
---|
252 | esd support: ${esd_msg} |
---|
253 | doc build: ${enable_gtk_doc} |
---|
254 | " |
---|