source: trunk/third/librsvg/configure.in @ 18805

Revision 18805, 6.7 KB checked in by ghudson, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18804, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT(rsvg.h)
2
3dnl ===========================================================================
4
5GDK_PIXBUF_REQUIRED=1.3.7
6GLIB_REQUIRED=2.0.0
7LIBART_REQUIRED=2.3.10
8LIBXML_REQUIRED=2.4.7
9PANGOFT2_REQUIRED=1.0.0
10POPT_REQUIRED=1.5
11
12AC_SUBST(GDK_PIXBUF_REQUIRED)
13AC_SUBST(GLIB_REQUIRED)
14AC_SUBST(LIBART_REQUIRED)
15AC_SUBST(LIBXML_REQUIRED)
16AC_SUBST(PANGOFT2_REQUIRED)
17AC_SUBST(POPT_REQUIRED)
18
19dnl ===========================================================================
20
21LIBRSVG_MAJOR_VERSION=2
22LIBRSVG_MINOR_VERSION=2
23LIBRSVG_MICRO_VERSION=3
24AC_SUBST(LIBRSVG_MAJOR_VERSION)
25AC_SUBST(LIBRSVG_MINOR_VERSION)
26AC_SUBST(LIBRSVG_MICRO_VERSION)
27
28LIBRSVG_VERSION=$LIBRSVG_MAJOR_VERSION.$LIBRSVG_MINOR_VERSION.$LIBRSVG_MICRO_VERSION
29
30VERSION_INFO=`expr $LIBRSVG_MAJOR_VERSION + $LIBRSVG_MINOR_VERSION`:$LIBRSVG_MICRO_VERSION:$LIBRSVG_MINOR_VERSION
31AC_SUBST(VERSION_INFO)
32
33dnl ===========================================================================
34
35AM_INIT_AUTOMAKE(librsvg, $LIBRSVG_VERSION)
36AM_CONFIG_HEADER(config.h)
37
38AM_MAINTAINER_MODE
39
40AC_ISC_POSIX
41AC_PROG_CC
42AC_PROG_CPP
43AC_PROG_AWK
44AM_PROG_LIBTOOL
45AC_STDC_HEADERS
46
47AC_C_BIGENDIAN
48
49GNOME_REQUIRE_PKGCONFIG
50
51dnl ===========================================================================
52
53PKG_CHECK_MODULES(LIBRSVG, \
54        gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED \
55        glib-2.0 >= $GLIB_REQUIRED \
56        libart-2.0 >= $LIBART_REQUIRED \
57        libxml-2.0 >= $LIBXML_REQUIRED \
58        pangoft2 >= $PANGOFT2_REQUIRED)
59AC_SUBST(LIBRSVG_LIBS)
60AC_SUBST(LIBRSVG_CFLAGS)
61
62dnl ===========================================================================
63
64AC_CHECK_LIB(popt, poptParseArgvString, [POPT_LIBS="-lpopt"],
65AC_MSG_ERROR([popt 1.5 or newer is required to build librsvg.
66You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
67AC_SUBST(POPT_LIBS)
68
69dnl ===========================================================================
70
71LIBGSF_CFLAGS=""
72LIBGSF_LIBS=""
73
74LIBGSFPKG=""
75test_gsf=true
76AC_ARG_WITH(svgz,[  --with-svgz  Use libgsf for run-time decompression],[
77        if test "x$withval" = "xno"; then
78                test_gsf=false
79        fi
80])
81if test "x$test_gsf" = "xtrue"; then
82        PKG_CHECK_MODULES(LIBGSF,[libgsf-1 >= 1.6.0], test_gsf=true, test_gsf=false)
83fi
84
85if test "x$test_gsf" = "xtrue"; then
86        LIBGSF_CFLAGS="$LIBGSF_CFLAGS -DHAVE_SVGZ=1"
87        LIBGSFPKG="libgsf-1"
88else
89        AC_MSG_WARN([SVGZ support disabled, as requested (Use --with-svgz to enable)])
90fi
91AM_CONDITIONAL(WITH_LIBGSF,[test "$LIBGSFPKG" != ""])
92
93AC_SUBST(LIBGSFPKG)
94
95AC_SUBST(LIBGSF_CFLAGS)
96AC_SUBST(LIBGSF_LIBS)
97
98dnl ===========================================================================
99
100dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
101
102AC_ARG_ENABLE(more-warnings,
103[  --enable-more-warnings  Maximum compiler warnings],
104set_more_warnings="$enableval",[
105if test -f $srcdir/CVSVERSION; then
106        is_cvs_version=true
107        set_more_warnings=yes
108else
109        set_more_warnings=no
110fi
111])
112AC_MSG_CHECKING(for more warnings, including -Werror)
113if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
114        AC_MSG_RESULT(yes)
115        CFLAGS="\
116        -Wall \
117        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
118        -Wnested-externs -Wpointer-arith \
119        -Wcast-align -Wsign-compare \
120        -Werror \
121        $CFLAGS"
122
123        for option in -Wsign-promo -Wno-sign-compare; do
124                SAVE_CFLAGS="$CFLAGS"
125                CFLAGS="$option $CFLAGS"
126                AC_MSG_CHECKING([whether gcc understands $option])
127                AC_TRY_COMPILE([], [],
128                        has_option=yes,
129                        has_option=no,)
130                if test $has_option = no; then
131                        CFLAGS="$SAVE_CFLAGS"
132                fi
133                AC_MSG_RESULT($has_option)
134                unset has_option
135                unset SAVE_CFLAGS
136        done
137        unset option
138else
139        AC_MSG_RESULT(no)
140fi
141
142AC_ARG_ENABLE(gtk-theme,
143    [  --enable-gtk-theme  Enable a RSVG based GTK+ theme engine [default=auto]],,
144    enable_gtk_theme=yes)
145
146if test "x$enable_gtk_theme" = "xyes"; then
147        AC_MSG_CHECKING([for gtk+ engine support])
148        PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 1.3.12, enable_gtk_theme=yes,
149                enable_gtk_theme=no)
150        AC_MSG_RESULT([$enable_gtk_theme])
151GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
152AC_SUBST(GTK_CFLAGS)
153AC_SUBST(GTK_LIBS)
154AC_SUBST(GTK_VERSION)
155fi
156
157AM_CONDITIONAL(ENABLE_GTK_ENGINE, test "x$enable_gtk_theme" = "xyes")
158
159AC_PATH_PROG(QUERYLOADERS, gdk-pixbuf-query-loaders, true)
160
161AC_ARG_ENABLE(pixbuf-loader,
162    [  --enable-pixbuf-loader  Enable a RSVG based GdkPixbuf loader [default=auto]],
163    enable_pixbuf_loader="$enableval", enable_pixbuf_loader=auto)
164
165if test "x$enable_pixbuf_loader" = xauto ; then
166    if test x$QUERYLOADERS != x ; then
167        enable_pixbuf_loader=yes
168    else
169        enable_pixbuf_loader=no
170    fi
171fi
172
173AM_CONDITIONAL(ENABLE_PIXBUF_LOADER, test x$enable_pixbuf_loader = xyes)
174
175##################################################
176# Checks for gtk-doc and docbook-tools
177##################################################
178
179AC_ARG_WITH(html-dir, [  --with-html-dir=PATH    path to installed docs ])
180
181if test "x$with_html_dir" = "x" ; then
182  HTML_DIR='${datadir}/doc/librsvg/html'
183else
184  HTML_DIR=$with_html_dir
185fi
186
187AC_SUBST(HTML_DIR)
188
189AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
190
191gtk_doc_min_version=0.9
192if $GTKDOC ; then
193    gtk_doc_version=`gtkdoc-mkdb --version`
194    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
195
196    IFS="${IFS=         }"; gtk_save_IFS="$IFS"; IFS="."
197    set $gtk_doc_version
198    for min in $gtk_doc_min_version ; do
199        cur=$1; shift
200        if test -z $min ; then break; fi
201        if test -z $cur ; then GTKDOC=false; break; fi
202        if test $cur -gt $min ; then break ; fi
203        if test $cur -lt $min ; then GTKDOC=false; break ; fi
204    done
205    IFS="$gtk_save_IFS"
206
207    if $GTKDOC ; then
208      AC_MSG_RESULT(yes)
209   else
210      AC_MSG_RESULT(no)
211   fi
212fi
213
214AC_CHECK_PROG(DB2HTML, db2html, true, false)
215AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
216
217dnl Make people enable the gtk-doc stuff explicitely.
218AC_ARG_ENABLE(gtk-doc, [  --disable-gtk-doc        use gtk-doc to build documentation [default=yes]], enable_gtk_doc="$enableval", enable_gtk_doc=yes)
219
220if test x$enable_gtk_doc = xyes ; then
221  if test x$GTKDOC != xtrue ; then
222    enable_gtk_doc=no
223  fi
224fi
225
226dnl NOTE: We need to use a separate automake conditional for this
227dnl       to make this work with the tarballs.
228AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
229
230dnl ===========================================================================
231
232AC_OUTPUT([
233librsvg.spec
234librsvg-features.h
235Makefile
236librsvg-2.0.pc
237doc/Makefile
238gtk-engine/Makefile
239gtk-engine/examples/Makefile
240gtk-engine/examples/bubble/Makefile
241gtk-engine/examples/bubble/gtk-2.0/Makefile
242gdk-pixbuf-loader/Makefile
243])
Note: See TracBrowser for help on using the repository browser.