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

Revision 20840, 7.8 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20839, 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], [0])
14m4_define([libgnomeui_interface_age], [0])
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.5.3])
29m4_define([libglade_required_version],       [2.0.0])
30
31dnl libtool versioning from libgnome
32
33m4_define([libgnomeui_current], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version - libgnomeui_interface_age)])
34m4_define([libgnomeui_binary_age], [m4_eval(100 * libgnomeui_minor_version + libgnomeui_micro_version)])
35m4_define([libgnomeui_revision], [libgnomeui_interface_age])
36m4_define([libgnomeui_age], [m4_eval(libgnomeui_binary_age - libgnomeui_interface_age)])
37m4_define([libgnomeui_version], [libgnomeui_major_version().libgnomeui_minor_version().libgnomeui_micro_version()libgnomeui_extraversion()])
38
39AC_INIT([libgnomeui], [libgnomeui_version],
40        [http://bugzilla.gnome.org/enter_bug.cgi?product=libgnomeui])
41AC_CONFIG_SRCDIR([libgnomeui/libgnomeui.h])
42
43LIBGNOMEUI_MAJOR_VERSION=libgnomeui_major_version
44LIBGNOMEUI_MINOR_VERSION=libgnomeui_minor_version
45LIBGNOMEUI_MICRO_VERSION=libgnomeui_micro_version
46LIBGNOMEUI_INTERFACE_AGE=libgnomeui_interface_age
47
48dnl libtool versioning from libgnome
49
50LIBGNOMEUI_CURRENT=libgnomeui_current
51LIBGNOMEUI_REVISION=libgnomeui_revision
52LIBGNOMEUI_AGE=libgnomeui_age
53
54AC_SUBST(LIBGNOMEUI_CURRENT)
55AC_SUBST(LIBGNOMEUI_REVISION)
56AC_SUBST(LIBGNOMEUI_AGE)
57
58AM_INIT_AUTOMAKE
59AM_CONFIG_HEADER(config.h)
60
61AM_MAINTAINER_MODE
62
63dnl make aclocal calls respect $ACLOCAL_FLAGS
64ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
65AC_SUBST(ACLOCAL_AMFLAGS)
66
67AC_ISC_POSIX
68AC_PROG_CC
69AC_STDC_HEADERS
70AC_LIBTOOL_WIN32_DLL
71AM_PROG_LIBTOOL
72
73GETTEXT_PACKAGE=libgnomeui-2.0
74AC_SUBST(GETTEXT_PACKAGE)
75AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
76                   [Name of gettext translation domain for library])
77
78ALL_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 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"
79AM_GLIB_GNU_GETTEXT
80AM_GLIB_DEFINE_LOCALEDIR([GNOMEUILOCALEDIR])
81
82GNOME_COMPILE_WARNINGS
83
84dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given.
85GNOME_DEBUG_CHECK
86
87dnl
88dnl Check for -lSM (for gnome-client)
89dnl
90
91AC_PATH_XTRA
92
93SM_LIBS=""
94sm_save_cppflags="$CPPFLAGS"
95CPPFLAGS="$CPPFLAGS $X_CFLAGS"
96
97GNOME_HAVE_SM=true
98AC_CHECK_LIB(SM, SmcSaveYourselfDone,
99        [SM_LIBS="$X_LIBS -lSM -lICE"],GNOME_HAVE_SM=false,
100        $X_LIBS -lICE)
101AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
102if test "$GNOME_HAVE_SM" = true; then
103        AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
104fi
105
106AC_SUBST(SM_LIBS)
107CPPFLAGS="$sm_save_cppflags"
108
109dnl
110dnl Start of pkg-config checks
111dnl
112
113dnl We first check for esound and audiofile (which has conditional
114dnl support built in)
115dnl
116SOUND_MODULES="esound >= esound_required_version dnl
117  audiofile >= audiofile_required_version"
118PKG_CHECK_MODULES(SOUND_TEST, [$SOUND_MODULES], [
119        AC_DEFINE(HAVE_LIBAUDIOFILE, 1,
120                  [Define to 1 if you have libaudiofile installed])
121        AC_DEFINE(HAVE_ESD, 1,
122                  [Define to 1 if you have libesd installed])
123        esd_msg=yes
124],[
125        SOUND_MODULES=""
126        esd_msg=no
127])
128
129dnl
130dnl libjpeg
131dnl
132  if test -z "$LIBJPEG"; then
133    AC_CHECK_LIB(jpeg, jpeg_start_decompress,
134      [AC_CHECK_HEADER(jpeglib.h,
135        jpeg_ok=yes,
136        jpeg_ok=no)],
137      AC_MSG_WARN(*** (jpeg library not found) ***), -lm)
138    if test "$jpeg_ok" = yes; then
139      JPEG='jpeg'; LIBJPEG='-ljpeg'
140      AC_DEFINE(HAVE_LIBJPEG, 1,
141                [Define to 1 if you have libjpeg installed])
142    else
143     AC_MSG_WARN(*** JPEG thumbnail loader will not be built (jpeg header file not found) ***)
144    fi
145  fi
146
147AC_SUBST(LIBJPEG)
148
149GNOMEUI_MODULES="dnl
150  libgnome-2.0 >= libgnome_required_version dnl
151  libgnomecanvas-2.0 >= libgnomecanvas_required_version dnl
152  libbonoboui-2.0 >= libbonoboui_required_version dnl
153  gconf-2.0 >= gconf_required_version dnl
154  pango >= pango_required_version dnl
155  gnome-vfs-2.0 >= gnomevfs_required_version dnl
156  gnome-keyring-1"
157PKG_CHECK_MODULES(LIBGNOMEUI, [$GNOMEUI_MODULES])
158LIBGNOMEUI_LIBS="$LIBGNOMEUI_LIBS $LIBJPEG"
159
160PKG_CHECK_MODULES(LIBGNOMEUI_COMPONENTS, [$GNOMEUI_MODULES])
161PKG_CHECK_MODULES(LIBGNOMEUI_DEMOS, [$GNOMEUI_MODULES])
162PKG_CHECK_MODULES(LIBGNOMEUI_GLADE, [$GNOMEUI_MODULES dnl
163  libglade-2.0 >= libglade_required_version])
164AC_PATH_PROG(LIBGLADE_CONVERT, libglade-convert)
165if test -z "$LIBGLADE_CONVERT" ; then
166        AC_MSG_WARN([libglade-convert (from libglade 2.0) is needed for the checks in the tests directory.])
167fi
168
169dnl File Chooser stuff
170PKG_CHECK_MODULES(FILE_SYSTEM,
171 [gtk+-2.0 >= gtk_required_version dnl
172  gnome-vfs-2.0 >= gnomevfs_required_version])
173
174GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
175AC_SUBST(GTK_BINARY_VERSION)
176       
177dnl
178dnl Check for gtk-doc
179dnl
180GTK_DOC_CHECK([1.0])
181
182
183dnl AC_SUBST GTK+ version
184GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
185AC_SUBST(GTK_VERSION)
186
187AC_MSG_CHECKING([for gtk+ multihead support])
188if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then
189   AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
190   AC_MSG_RESULT(yes)
191else
192   AC_MSG_RESULT(no)
193fi
194
195AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
196libgnomeui. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
197
198AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h)
199AC_CHECK_FUNCS(bind_textdomain_codeset)
200
201dnl This is installed from GTK+ 2.0's gdk-pixbuf
202AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
203test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_ERROR([
204*** You need the gdk-pixbuf-csource tool which is installed
205*** from GTK+ 2.0's gdk-pixbuf.
206***
207*** Either the location where you installed your GTK+ 2.0 is
208*** not in your PATH or something is screwed up with your
209*** GTK+ 2.0 installation
210])
211
212dnl Don't use AC_PROG_AWK since we need the full pathname.
213AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
214AC_PATH_PROGS(PERL, perl5 perl)
215
216AC_PATH_PROG(GCONFTOOL, gconftool-2)
217
218# define a MAINT-like variable REBUILD which is set if Perl
219# and awk are found, so autogenerated sources can be rebuilt
220AC_ARG_ENABLE(rebuilds,
221              AC_HELP_STRING([--disable-rebuilds],
222                             [disable all source autogeneration rules]),,
223              [enable_rebuilds=yes])
224REBUILD=\#
225if test "x$enable_rebuilds" = "xyes" && \
226     test -n "$PERL" && \
227     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
228     test -n "$AWK" ; then
229  REBUILD=
230fi
231AC_SUBST(REBUILD)
232
233AC_CONFIG_FILES([
234Makefile
235po/Makefile.in
236libgnomeui/Makefile
237libgnomeui/libgnomeui-2.0.pc
238libgnomeui/pixmaps/Makefile
239file-chooser/Makefile
240glade/Makefile
241images/Makefile
242demos/Makefile
243test-gnome/Makefile
244doc/Makefile
245doc/reference/Makefile
246doc/reference/version.xml
247])
248
249AC_OUTPUT
250echo "configuration:
251        esd support: ${esd_msg}
252        doc build:   ${enable_gtk_doc}
253"
Note: See TracBrowser for help on using the repository browser.