source: trunk/third/libgnome/configure.in @ 18580

Revision 18580, 8.2 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18579, which included commits to RCS files with non-trunk default branches.
Line 
1AC_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#
11LIBGNOME_MAJOR_VERSION=2
12LIBGNOME_MINOR_VERSION=2
13LIBGNOME_MICRO_VERSION=0
14LIBGNOME_INTERFACE_AGE=0
15LIBGNOME_BINARY_AGE=200
16# If you need a modifier for the version number.
17# Normally empty, but can be used to make "fixup" releases.
18LIBGNOME_EXTRAVERSION=.1
19
20dnl libtool versioning from libgnome
21
22LIBGNOME_CURRENT=`expr 100 '*' $LIBGNOME_MINOR_VERSION + $LIBGNOME_MICRO_VERSION - $LIBGNOME_INTERFACE_AGE`
23LIBGNOME_REVISION=$LIBGNOME_INTERFACE_AGE
24LIBGNOME_AGE=`expr $LIBGNOME_BINARY_AGE - $LIBGNOME_INTERFACE_AGE`
25LIBGNOME_VERSION=$LIBGNOME_MAJOR_VERSION.$LIBGNOME_MINOR_VERSION.$LIBGNOME_MICRO_VERSION$LIBGNOME_EXTRAVERSION
26
27AC_SUBST(LIBGNOME_CURRENT)
28AC_SUBST(LIBGNOME_REVISION)
29AC_SUBST(LIBGNOME_AGE)
30
31AM_CONFIG_HEADER(config.h)
32AM_INIT_AUTOMAKE(libgnome, $LIBGNOME_VERSION)
33
34AM_MAINTAINER_MODE
35
36dnl
37dnl Due to the sed scripts being split on 90 line
38dnl blocks, this macro needs to be right at the beginning.
39dnl
40AC_PROG_INTLTOOL
41
42AC_ISC_POSIX
43AC_PROG_CC
44AC_STDC_HEADERS
45AM_PROG_LIBTOOL
46AC_PROG_YACC
47AC_PATH_PROGS(PATH_TO_XRDB, "xrdb")
48
49AC_CHECK_FUNCS([setenv unsetenv clearenv setfsgid])
50AC_CHECK_HEADERS(sys/fsuid.h)
51AC_CHECK_FUNCS(bind_textdomain_codeset)
52
53GETTEXT_PACKAGE=libgnome-2.0
54AC_SUBST(GETTEXT_PACKAGE)
55AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package])
56
57
58AC_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
64ALL_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"
65AM_GLIB_GNU_GETTEXT
66gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
67AC_SUBST(gnomelocaledir)
68
69AC_SUBST(CFLAGS)
70AC_SUBST(CPPFLAGS)
71AC_SUBST(LDFLAGS)
72
73GNOME_COMPILE_WARNINGS
74
75dnl Define GNOME_ENABLE_DEBUG if the --enable-debug switch was given.
76GNOME_DEBUG_CHECK
77
78dnl Don't use AC_PROG_AWK since we need the full pathname.
79AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
80AC_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
84AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
85REBUILD=\#
86if 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=
91fi
92AC_SUBST(REBUILD)
93
94AUDIOFILE_REQUIRED_VERSION=0.2.3
95ESOUND_REQUIRED_VERSION=0.2.26
96GCONF_REQUIRED_VERSION=1.1.11
97GLIB_REQUIRED_VERSION=2.0.3
98GNOME_VFS_REQUIRED_VERSION=1.9.16
99LIBBONOBO_REQUIRED_VERSION=2.0.0
100LIBXML_REQUIRED_VERSION=2.4.22
101LIBXSLT_REQUIRED_VERSION=1.0.18
102
103dnl
104dnl Start of pkg-config checks
105dnl
106dnl We first check for esound and audiofile (which has conditional
107dnl support built in)
108dnl
109
110AUDIOFILE_MODULE="audiofile >= $AUDIOFILE_REQUIRED_VERSION"
111ESOUND_MODULE="esound >= $ESOUND_REQUIRED_VERSION"
112PKG_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
120PKG_CHECK_MODULES(LIBGNOME, glib-2.0 >= $GLIB_REQUIRED_VERSION gmodule-2.0 >= $GLIB_REQUIRED_VERSION gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION \
121libxml-2.0 >= $LIBXML_REQUIRED_VERSION libbonobo-2.0 >= $LIBBONOBO_REQUIRED_VERSION gconf-2.0 >= $GCONF_REQUIRED_VERSION \
122$AUDIOFILE_MODULE $ESOUND_MODULE)
123
124PKG_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 \
125libxml-2.0 >= $LIBXML_REQUIRED_VERSION libbonobo-2.0 >= $LIBBONOBO_REQUIRED_VERSION)
126
127PKG_CHECK_MODULES(HELP_DOCBOOK_MODULE, glib-2.0 >= $GLIB_REQUIRED_VERSION libxslt >= $LIBXSLT_REQUIRED_VERSION libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
128AC_SUBST(HELP_DOCBOOK_MODULE_CFLAGS)
129AC_SUBST(HELP_DOCBOOK_MODULE_LIBS)
130
131dnl
132dnl Check for gtk-doc
133dnl
134AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
135
136if test "x$with_html_dir" = "x" ; then
137  HTML_DIR='${datadir}/gtk-doc/html'
138else
139  HTML_DIR=$with_html_dir
140fi
141
142AC_SUBST(HTML_DIR)
143
144AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
145
146gtk_doc_min_version=0.6
147if $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
168fi
169
170dnl Let people disable the gtk-doc stuff.
171AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
172
173if 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
179fi
180
181AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
182
183dnl Specify the gconf configuration source,
184dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
185
186dnl ==============================================
187dnl Special GConf section
188dnl ==============================================
189
190AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
191
192if test x"$GCONFTOOL" = xno; then
193  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
194fi
195
196AM_GCONF_SOURCE_2
197
198dnl
199dnl Substitute these
200dnl
201AC_SUBST(LIBGNOME_CFLAGS)
202AC_SUBST(LIBGNOME_LIBS)
203
204AC_SUBST(HELP_VFS_MODULE_CFLAGS)
205AC_SUBST(HELP_VFS_MODULE_LIBS)
206
207GNOME_VFS_VERSION=`$PKG_CONFIG --modversion gnome-vfs-2.0`
208AC_SUBST(GNOME_VFS_VERSION)
209
210AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
211libgnome. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
212
213dnl ====================================
214dnl = zlib for help converters
215dnl ====================================
216AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz
217AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required]))
218
219dnl ====================================
220dnl = Bzip2, for the help converters
221dnl ====================================
222BZ_LIBS=
223AC_CHECK_LIB(bz2, bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 suppot])
224                          BZ_LIBS="-lbz2"])
225dnl <= 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 =>
242AC_SUBST(BZ_LIBS)
243
244AC_OUTPUT([
245Makefile
246po/Makefile.in
247libgnome/Makefile
248monikers/Makefile
249schemas/Makefile
250gnome-data/Makefile
251libgnome/libgnome-2.0.pc
252help-converters/Makefile
253help-converters/docbook/Makefile
254help-converters/docbook/gnome-customization/Makefile
255help-converters/man/Makefile
256help-converters/info/Makefile
257help-converters/gnome-vfs-module/Makefile
258doc/Makefile
259doc/reference/Makefile
260])
261
262
Note: See TracBrowser for help on using the repository browser.