2 AC_INIT([spkg], 1.0rc13, [megous@megous.com], spkg)
3 AC_CONFIG_SRCDIR([Makefile.am])
4 AM_CONFIG_HEADER([config.h])
5 AM_INIT_AUTOMAKE([dist-bzip2])
19 # Checks for pkg-config packages
20 GLIB_REQUIRED="glib-2.0 >= 2.2.0"
21 PKG_CHECK_MODULES(SPKG, [$GLIB_REQUIRED])
25 # Checks for header files.
27 AC_CHECK_HEADER([Judy.h], [true], AC_MSG_ERROR([spkg requires Judy: http://judy.sf.net]))
28 AC_CHECK_HEADER([zlib.h], [true], AC_MSG_ERROR([spkg requires zlib: http://www.zlib.net]))
29 AC_CHECK_HEADER([popt.h], [true], AC_MSG_ERROR([spkg requires popt library]))
32 AC_CHECK_LIB(Judy, Judy1Next, [true], AC_MSG_ERROR([spkg requires Judy: http://judy.sf.net]))
33 AC_CHECK_LIB(z, compress, [true], AC_MSG_ERROR([spkg requires zlib: http://www.zlib.net]))
34 AC_CHECK_LIB(popt, poptGetArg, [true], AC_MSG_ERROR([spkg requires popt library]))
37 AC_ARG_ENABLE(assume-broken-pkgdb,AC_HELP_STRING([--enable-assume-broken-pkgdb],
38 [Compile with support for broken package databases that may contain
39 non-normalized paths with multiple slashes. This doubles time necessary to load
40 file database. To see if you need to enable this option, check paths in your
41 package database with 'grep // /var/log/packages/*' command.]))
43 AM_CONDITIONAL(ENABLE_ASSUME_BROKEN_PKGDB, test "x$enable_assume_broken_pkgdb" = xyes)
46 AC_ARG_ENABLE(static-spkg,
47 AS_HELP_STRING([--enable-static-spkg],
48 [Create static spkg executable. Use --enable-static-spkg=only for
49 creating only static spkg binary that will be used by default.]),
50 [create_static=$enableval], [create_static=no])
52 AM_CONDITIONAL([STATIC_SPKG],[test "x$create_static" = "xyes"])
53 AM_CONDITIONAL([STATIC_SPKG_ONLY],[test "x$create_static" = "xonly"])
56 AS_HELP_STRING([--disable-legacy],
57 [Disable legacy checks, like symlinks in the archive. (EXPERIMENTAL)]),
58 [legacy_checks=$enableval], [legacy_checks=yes])
60 AM_CONDITIONAL([LEGACY_CHECKS],[test x$legacy_checks = xyes])
63 AM_CONDITIONAL(WINDOWS, test "x$version_type" = xwindows)