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

Revision 18352, 3.2 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18351, 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=0
23LIBRSVG_MICRO_VERSION=1
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
71dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
72
73AC_ARG_ENABLE(more-warnings,
74[  --enable-more-warnings  Maximum compiler warnings],
75set_more_warnings="$enableval",[
76if test -f $srcdir/CVSVERSION; then
77        is_cvs_version=true
78        set_more_warnings=yes
79else
80        set_more_warnings=no
81fi
82])
83AC_MSG_CHECKING(for more warnings, including -Werror)
84if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
85        AC_MSG_RESULT(yes)
86        CFLAGS="\
87        -Wall \
88        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
89        -Wnested-externs -Wpointer-arith \
90        -Wcast-align -Wsign-compare \
91        -Werror \
92        $CFLAGS"
93
94        for option in -Wsign-promo -Wno-sign-compare; do
95                SAVE_CFLAGS="$CFLAGS"
96                CFLAGS="$option $CFLAGS"
97                AC_MSG_CHECKING([whether gcc understands $option])
98                AC_TRY_COMPILE([], [],
99                        has_option=yes,
100                        has_option=no,)
101                if test $has_option = no; then
102                        CFLAGS="$SAVE_CFLAGS"
103                fi
104                AC_MSG_RESULT($has_option)
105                unset has_option
106                unset SAVE_CFLAGS
107        done
108        unset option
109else
110        AC_MSG_RESULT(no)
111fi
112
113dnl ===========================================================================
114
115AC_OUTPUT([
116librsvg.spec
117librsvg-features.h
118Makefile
119librsvg-2.0.pc])
Note: See TracBrowser for help on using the repository browser.