Introduce install/remove iterators.
These iterator constructors lets you pass in two sets and creates
an iterator for the packages to remove or the packages to install.
The iterators will step through the packages in a sequence that respects
the pre, post, preun and postun modifiers.
Right now, the install order isn't actually implemented, this patch just
implements the API changes and updates the applications.
1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT(razor, 0.8, krh@redhat.com)
5 AM_INIT_AUTOMAKE(razor, 0.1)
6 AM_CONFIG_HEADER(config.h)
9 # libtool versioning - this applies to all libraries in this package
11 # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
31 AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
32 AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
34 if test "${enable_verbose_mode}" != no; then
35 # To get -rdynamic you pass -export-dynamic to libtool.
36 AC_DEFINE(BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool])
37 R_DYNAMIC_LDFLAG=-export-dynamic
41 AC_SUBST(R_DYNAMIC_LDFLAG)
43 #### gcc warning flags
45 if test "x$GCC" = "xyes"; then
48 *[\ \ ]-Wall[\ \ ]*) ;;
49 *) CFLAGS="$CFLAGS -Wall" ;;
53 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
54 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
58 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
59 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
63 *[\ \ ]-Wnested-externs[\ \ ]*) ;;
64 *) CFLAGS="$CFLAGS -Wnested-externs" ;;
68 *[\ \ ]-Wcast-align[\ \ ]*) ;;
69 *) CFLAGS="$CFLAGS -Wcast-align" ;;
73 *[\ \ ]-Wformat[\ \ ]*) ;;
74 *) CFLAGS="$CFLAGS -Wformat" ;;
78 *[\ \ ]-Wformat-security[\ \ ]*) ;;
79 *) CFLAGS="$CFLAGS -Wformat-security" ;;
82 if test "x$enable_ansi" = "xyes"; then
84 *[\ \ ]-ansi[\ \ ]*) ;;
85 *) CFLAGS="$CFLAGS -ansi" ;;
89 *[\ \ ]-D_POSIX_C_SOURCE*) ;;
90 *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
94 *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;;
95 *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
99 *[\ \ ]-pedantic[\ \ ]*) ;;
100 *) CFLAGS="$CFLAGS -pedantic" ;;
106 PKG_CHECK_MODULES(CURL, [libcurl])
107 AC_SUBST(CURL_CFLAGS)
111 AC_ARG_WITH(zlib, [ --with-zlib=<dir> Use zlib from here],
114 CPPFLAGS="$CPPFLAGS -I$withval/include"
115 LDFLAGS="$LDFLAGS -L$withval/lib"
118 AC_CHECK_HEADERS(zlib.h, [AC_DEFINE(HAVE_ZLIB_H)],
119 [AC_MSG_ERROR([Can't find zlib.h. Please install zlib.])])
120 AC_CHECK_LIB(z, inflate, [ZLIB_LIBS="-lz"],
121 [AC_MSG_ERROR([Can't find zlib library. Please install zlib.])])
125 AC_ARG_WITH(expat, [ --with-expat=<dir> Use expat from here],
128 CPPFLAGS="$CPPFLAGS -I$withval/include"
129 LDFLAGS="$LDFLAGS -L$withval/lib"
132 AC_CHECK_HEADERS(expat.h, [AC_DEFINE(HAVE_EXPAT_H)],
133 [AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
134 AC_CHECK_LIB(expat, XML_ParserCreate, [EXPAT_LIBS="-lexpat"],
135 [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
139 AC_ARG_WITH(rpm, [ --with-rpm=<dir> Use rpm from here],
142 CPPFLAGS="$CPPFLAGS -I$withval/include"
143 LDFLAGS="$LDFLAGS -L$withval/lib"
146 AC_CHECK_HEADERS(rpm/rpmlib.h, [],
147 [AC_MSG_ERROR([Can't find rpm/rpmlib.h. Please install rpm-devel.])])
148 AC_CHECK_LIB(rpm,rpmdbOpen,[RPM_LIBS="-lrpm"],
149 [AC_MSG_ERROR([Can't find rpm library. Please install rpm-devel.])])
152 if test "x$GCC" = "xyes"; then
153 LDFLAGS="-Wl,--as-needed $LDFLAGS"
156 # *****************************
157 # Make available to Makefile.am
158 # *****************************
159 AC_SUBST(SYSCONFDIR, $sysconfdir)
161 # ********************
162 # Internationalisation
163 # ********************
165 IT_PROG_INTLTOOL([0.36.0])
166 GETTEXT_PACKAGE=razor
167 AC_SUBST([GETTEXT_PACKAGE])
169 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])
181 dnl ==========================================================================
188 libexecdir: ${libexecdir}
192 sysconfdir: ${sysconfdir}
193 localstatedir: ${localstatedir}
198 Maintainer mode: ${USE_MAINTAINER_MODE}
199 Building verbose mode: ${enable_verbose_mode}