source: trunk/third/libgnomeui/configure.in @ 21509

Revision 21509, 7.9 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21508, which included commits to RCS files with non-trunk default branches.
Line 
1AC_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#
11m4_define([libgnomeui_major_version], [2])
12m4_define([libgnomeui_minor_version], [8])
13m4_define([libgnomeui_micro_version], [1])
14m4_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.
17m4_define([libgnomeui_extraversion], [])
18
19dnl Required versions of other packages
20m4_define([esound_required_version],         [0.2.26])
21m4_define([audiofile_required_version],      [0.2.3])
22m4_define([libgnome_required_version],       [2.0.0])
23m4_define([libgnomecanvas_required_version], [2.0.0])
24m4_define([libbonoboui_required_version],    [2.0.0])
25m4_define([gconf_required_version],          [1.1.11])
26m4_define([pango_required_version],          [1.1.2])
27m4_define([gtk_required_version],            [2.4.1])
28m4_define([gnomevfs_required_version],       [2.7.3])
29m4_define([libglade_required_version],       [2.0.0])
30m4_define([gnome_keyring_required_version],  [0.4])
31
32dnl libtool versioning from libgnome
33
34m4_define([libgnomeui_current], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version - libgnomeui_interface_age)])
35m4_define([libgnomeui_binary_age], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version)])
36m4_define([libgnomeui_revision], [libgnomeui_interface_age])
37m4_define([libgnomeui_age], [m4_eval(libgnomeui_binary_age - libgnomeui_interface_age)])
38m4_define([libgnomeui_version], [libgnomeui_major_version().libgnomeui_minor_version().libgnomeui_micro_version()libgnomeui_extraversion()])
39
40AC_INIT([libgnomeui], [libgnomeui_version],
41        [http://bugzilla.gnome.org/enter_bug.cgi?product=libgnomeui])
42AC_CONFIG_SRCDIR([libgnomeui/libgnomeui.h])
43
44LIBGNOMEUI_MAJOR_VERSION=libgnomeui_major_version
45LIBGNOMEUI_MINOR_VERSION=libgnomeui_minor_version
46LIBGNOMEUI_MICRO_VERSION=libgnomeui_micro_version
47LIBGNOMEUI_INTERFACE_AGE=libgnomeui_interface_age
48
49dnl libtool versioning from libgnome
50
51LIBGNOMEUI_CURRENT=libgnomeui_current
52LIBGNOMEUI_REVISION=libgnomeui_revision
53LIBGNOMEUI_AGE=libgnomeui_age
54
55AC_SUBST(LIBGNOMEUI_CURRENT)
56AC_SUBST(LIBGNOMEUI_REVISION)
57AC_SUBST(LIBGNOMEUI_AGE)
58
59AM_INIT_AUTOMAKE
60AM_CONFIG_HEADER(config.h)
61
62AM_MAINTAINER_MODE
63
64dnl make aclocal calls respect $ACLOCAL_FLAGS
65ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
66AC_SUBST(ACLOCAL_AMFLAGS)
67
68AC_ISC_POSIX
69AC_PROG_CC
70AC_STDC_HEADERS
71AC_LIBTOOL_WIN32_DLL
72AM_PROG_LIBTOOL
73
74GETTEXT_PACKAGE=libgnomeui-2.0
75AC_SUBST(GETTEXT_PACKAGE)
76AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
77                   [Name of gettext translation domain for library])
78
79ALL_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"
80AM_GLIB_GNU_GETTEXT
81AM_GLIB_DEFINE_LOCALEDIR([GNOMEUILOCALEDIR])
82
83GNOME_COMPILE_WARNINGS
84
85dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given.
86GNOME_DEBUG_CHECK
87
88dnl
89dnl Check for -lSM (for gnome-client)
90dnl
91
92AC_PATH_XTRA
93
94SM_LIBS=""
95sm_save_cppflags="$CPPFLAGS"
96CPPFLAGS="$CPPFLAGS $X_CFLAGS"
97
98GNOME_HAVE_SM=true
99AC_CHECK_LIB(SM, SmcSaveYourselfDone,
100        [SM_LIBS="$X_LIBS -lSM -lICE"],GNOME_HAVE_SM=false,
101        $X_LIBS -lICE)
102AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
103if test "$GNOME_HAVE_SM" = true; then
104        AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
105fi
106
107AC_SUBST(SM_LIBS)
108CPPFLAGS="$sm_save_cppflags"
109
110dnl
111dnl Start of pkg-config checks
112dnl
113
114dnl We first check for esound and audiofile (which has conditional
115dnl support built in)
116dnl
117SOUND_MODULES="esound >= esound_required_version dnl
118  audiofile >= audiofile_required_version"
119PKG_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
130dnl
131dnl libjpeg
132dnl
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
148AC_SUBST(LIBJPEG)
149
150GNOMEUI_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"
158PKG_CHECK_MODULES(LIBGNOMEUI, [$GNOMEUI_MODULES])
159LIBGNOMEUI_LIBS="$LIBGNOMEUI_LIBS $LIBJPEG"
160
161PKG_CHECK_MODULES(LIBGNOMEUI_COMPONENTS, [$GNOMEUI_MODULES])
162PKG_CHECK_MODULES(LIBGNOMEUI_DEMOS, [$GNOMEUI_MODULES])
163PKG_CHECK_MODULES(LIBGNOMEUI_GLADE, [$GNOMEUI_MODULES dnl
164  libglade-2.0 >= libglade_required_version])
165AC_PATH_PROG(LIBGLADE_CONVERT, libglade-convert)
166if test -z "$LIBGLADE_CONVERT" ; then
167        AC_MSG_WARN([libglade-convert (from libglade 2.0) is needed for the checks in the tests directory.])
168fi
169
170dnl File Chooser stuff
171PKG_CHECK_MODULES(FILE_SYSTEM,
172 [gtk+-2.0 >= gtk_required_version dnl
173  gnome-vfs-2.0 >= gnomevfs_required_version])
174
175GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
176AC_SUBST(GTK_BINARY_VERSION)
177       
178dnl
179dnl Check for gtk-doc
180dnl
181GTK_DOC_CHECK([1.0])
182
183
184dnl AC_SUBST GTK+ version
185GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
186AC_SUBST(GTK_VERSION)
187
188AC_MSG_CHECKING([for gtk+ multihead support])
189if $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)
192else
193   AC_MSG_RESULT(no)
194fi
195
196AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
197libgnomeui. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
198
199AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h)
200AC_CHECK_FUNCS(bind_textdomain_codeset)
201
202dnl This is installed from GTK+ 2.0's gdk-pixbuf
203AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
204test -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
213dnl Don't use AC_PROG_AWK since we need the full pathname.
214AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
215AC_PATH_PROGS(PERL, perl5 perl)
216
217AC_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
221AC_ARG_ENABLE(rebuilds,
222              AC_HELP_STRING([--disable-rebuilds],
223                             [disable all source autogeneration rules]),,
224              [enable_rebuilds=yes])
225REBUILD=\#
226if 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=
231fi
232AC_SUBST(REBUILD)
233
234AC_CONFIG_FILES([
235Makefile
236po/Makefile.in
237libgnomeui/Makefile
238libgnomeui/libgnomeui-2.0.pc
239libgnomeui/pixmaps/Makefile
240file-chooser/Makefile
241glade/Makefile
242images/Makefile
243demos/Makefile
244test-gnome/Makefile
245doc/Makefile
246doc/reference/Makefile
247doc/reference/version.xml
248])
249
250AC_OUTPUT
251echo "configuration:
252        esd support: ${esd_msg}
253        doc build:   ${enable_gtk_doc}
254"
Note: See TracBrowser for help on using the repository browser.