1 dnl Process this file with autoconf to produce a configure script.
2 dnl ==================================================
5 AC_CONFIG_SRCDIR(zypp/Makefile.am)
7 AC_PREFIX_DEFAULT(/usr)
11 AM_INIT_AUTOMAKE(foreign dist-bzip2 no-dist-gzip tar-ustar)
12 AM_CONFIG_HEADER(config.h)
14 dnl ==================================================
18 dnl CURRENT The most recent interface number that this library implements.
20 dnl REVISION The implementation number of the current interface.
22 dnl AGE The difference between the newest and oldest interfaces that this
23 dnl library implements.
24 dnl In other words, the library implements all the interface numbers
25 dnl in the range from number 'CURRENT - AGE' to 'CURRENT'.
27 dnl 1) Start with version information of `0:0:0' for each libtool library.
29 dnl 2) Update the version information only immediately before a public release
30 dnl of your software. More frequent updates are unnecessary, and only guarantee
31 dnl that the current interface number gets larger faster.
33 dnl 3) If the library source code has changed at all since the last update,
34 dnl then increment revision (`c:r:a' becomes `c:r+1:a').
36 dnl 4) If any interfaces have been added, removed, or changed since the last
37 dnl update, increment current, and set revision to 0.
39 dnl 5) If any interfaces have been added since the last public release, then
42 dnl 6) If any interfaces have been removed since the last public release, then
50 LIBZYPP_VERSION=$LIBZYPP_CURRENT.$LIBZYPP_REVISION.$LIBZYPP_AGE
51 AC_SUBST(LIBZYPP_VERSION)
53 LIBZYPP_VERSION_INFO="-version-info $LIBZYPP_CURRENT:$LIBZYPP_REVISION:$LIBZYPP_AGE"
54 AC_SUBST(LIBZYPP_VERSION_INFO)
56 dnl ==================================================
58 CXXFLAGS="-g -O2 -Wall -Wformat"
60 dnl ==================================================
62 docdir=\${datadir}/doc/packages
63 pkgdocdir=\${docdir}/$PACKAGE
68 zyppdir=${prefix}/share/$PACKAGE
69 localedir=${zyppdir}/locale
70 schemadir=${zyppdir}/schema
76 AH_TEMPLATE([LOCALEDIR],[gettext localedir])
77 AC_DEFINE_UNQUOTED([LOCALEDIR], ["${localedir}"])
78 AH_TEMPLATE([TEXTDOMAIN],[gettext textdomain])
79 AC_DEFINE_UNQUOTED([TEXTDOMAIN], ["$PACKAGE"])
81 dnl ==================================================
82 dnl checks for programs
84 dnl check for c++ compiler and tools
91 dnl do AC_CHECK_* tests using c++ (e.g. boost header)
94 AC_PATH_PROG(DOCGEN, doxygen)
95 if test -z "$DOCGEN" ; then
96 AC_MSG_ERROR(doxygen is missing; please install doxygen.)
99 AC_PATH_PROG(HAVE_DOT, dot)
100 if test -z "$HAVE_DOT" ; then
101 AC_MSG_WARN(dot not found; you should install graphviz.)
107 AC_PATH_PROG(XGETTEXT, xgettext)
108 if test -z "$XGETTEXT" ; then
109 AC_MSG_ERROR(xgettext is missing; please install gettext-devel.)
112 AC_PATH_PROG(MYRUNTEST, runtest)
113 if test -z "$MYRUNTEST" ; then
114 AC_MSG_ERROR(runtest is missing; please install dejagnu.)
117 dnl ==================================================
119 dnl Switches during develpoment only. They disable code using
120 dnl certain libraries (e.g. hal, sqlite) which may be temporarily
121 dnl unavailable or broken. This is just to allow building and testing
122 dnl the remaining parts of zypp.
124 AC_ARG_ENABLE(faked-hal, [ --enable-faked-hal do not use libhal (DEVELOPMENT ONLY)],
125 devel_faked_hal=yes, devel_faked_hal=no)
127 AC_ARG_ENABLE(faked-zmd, [ --enable-faked-zmd do not build zmd (DEVELOPMENT ONLY)],
128 devel_faked_zmd=yes, devel_faked_zmd=no)
130 dnl ==================================================
131 dnl checks for libraries
132 AC_CHECK_LIB([z], [gzopen],
134 AC_MSG_ERROR([libz not found. please install zlib-devel]))
135 AC_CHECK_LIB([xml2], [xmlNewTextReader],
137 AC_MSG_ERROR([libxml2 not found. please install libxml2-devel]))
140 if test "x$devel_faked_zmd" = "xyes"; then
141 AM_CONDITIONAL(BUILD_ZMD, false)
143 AM_CONDITIONAL(BUILD_ZMD, true)
144 PKG_CHECK_MODULES(SQLITE, sqlite3, pkg_sqlite=yes, pkg_sqlite=no)
145 if test ! -f $SQLITE_LIBS/libsqlite3.so; then
147 AC_MSG_ERROR([Could not find sqlite3 library, please install sqlite-devel])
150 dnl ==================================================
152 if test "x$devel_faked_hal" = "xyes"; then
153 HAL_CFLAGS=-DFAKE_HAL
155 dnl checks for pkgconfig modules
156 hal_module="hal >= 0.5.4"
157 dbus_module="dbus-1 >= 0.33"
158 hal_modules="glib-2.0 >= 2.6.0, gobject-2.0 >= 2.6.0, dbus-glib-1 >= 0.33, $dbus_module, $hal_module"
159 PKG_CHECK_MODULES(HAL, [$hal_modules])
165 dnl ==================================================
166 dnl checks for header files
167 AC_CHECK_HEADERS([boost/scoped_ptr.hpp],
169 AC_MSG_ERROR([boost header not found. please install boost-devel]))
170 AC_CHECK_HEADERS([curl/curl.h],
172 AC_MSG_ERROR([libcurl header not found. please install curl-devel.]))
173 AC_CHECK_HEADERS([rpm/rpmlib.h],
175 AC_MSG_ERROR([rpmlib header not found. please install rpm-devel.]))
176 AC_CHECK_HEADERS([popt.h],
178 AC_MSG_ERROR([popt header not found. please install popt-devel.]))
179 dnl ==================================================
180 dnl checks for typedefs
181 dnl ==================================================
182 dnl checks for structures
183 dnl ==================================================
184 dnl checks for compiler characteristics
185 dnl ==================================================
186 dnl checks for library functions
187 dnl ==================================================
188 dnl checks for system services
189 dnl ==================================================
190 dnl AC_CONFIG_FILES([FILE...])
195 devel/devel.jsrain/Makefile \
196 devel/devel.jsrain/yum/Makefile \
197 devel/devel.ma/Makefile \
198 devel/devel.kkaempf/Makefile \
200 doc/autodoc/Makefile \
201 doc/autodoc/Doxyfile \
203 testsuite/zypp/Makefile \
204 testsuite/zypp/tests/Makefile \
205 testsuite/solver/Makefile \
206 testsuite/solver/src/Makefile \
207 testsuite/solver/src/helix/Makefile \
208 testsuite/solver/single.out/Makefile \
209 testsuite/source/Makefile \
210 testsuite/source/tests/Makefile \
211 testsuite/parser/Makefile \
212 testsuite/parser/tests/Makefile \
213 testsuite/target/Makefile \
214 testsuite/target/tests/Makefile \
217 zypp/detail/Makefile \
218 zypp/capability/Makefile \
219 zypp/parser/Makefile \
220 zypp/parser/yum/Makefile \
221 zypp/parser/yum/schema/Makefile \
222 zypp/parser/tagfile/Makefile \
224 zypp/solver/Makefile \
225 zypp/solver/detail/Makefile \
226 zypp/source/Makefile \
227 zypp/source/susetags/Makefile \
228 zypp/source/yum/Makefile \
229 zypp/media/Makefile \
230 zypp/media/proxyinfo/Makefile \
232 zypp/target/Makefile \
233 zypp/target/rpm/Makefile \
234 zypp/target/store/Makefile \
235 zypp/target/hal/Makefile \
236 zypp/zypp_detail/Makefile \
241 dnl ==================================================
248 LIBVERSION: lib${PACKAGE}.so.${LIBZYPP_VERSION}
251 CXXFLAGS: ${CXXFLAGS}
257 if test "x$devel_faked_hal" = "xyes"; then
258 echo "**WARNIG: faked_hal"
260 if test "x$devel_faked_zmd" = "xyes"; then
261 echo "**WARNIG: faked_zmd"