2007-07-31 09:53:31 -07:00
|
|
|
AC_PREREQ(2.52)
|
|
|
|
|
|
|
|
AC_INIT(PackageKit, 0.0.1)
|
|
|
|
AC_CONFIG_SRCDIR(src)
|
|
|
|
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
2007-08-22 15:26:59 -07:00
|
|
|
AM_PROG_CC_C_O
|
2007-07-31 09:53:31 -07:00
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
2007-08-14 04:45:24 -07:00
|
|
|
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
|
2007-07-31 09:53:31 -07:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Extra verbose warning switches
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
if test "$GCC" = "yes"; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -Werror -Wcast-align -Wno-uninitialized"
|
|
|
|
CPPFLAGS="$CPPFLAGS -Wall"
|
|
|
|
fi
|
|
|
|
|
2007-08-14 04:45:24 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - gettext stuff
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
GETTEXT_PACKAGE=PackageKit
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
|
|
|
|
|
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
|
2007-07-31 09:53:31 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Library dependencies
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
GLIB_REQUIRED=2.6.0
|
2007-08-03 13:15:01 -07:00
|
|
|
GTK_REQUIRED=2.10.0
|
2007-08-14 04:45:24 -07:00
|
|
|
DBUS_REQUIRED=0.70
|
2007-08-14 12:52:42 -07:00
|
|
|
LIBGLADE_REQUIRED=2.5.0
|
|
|
|
LIBNOTIFY_REQUIRED=0.4.3
|
2007-08-21 06:50:27 -07:00
|
|
|
LIBNM_REQUIRED=0.6.4
|
2007-08-21 04:54:04 -07:00
|
|
|
POLKIT_DBUS_REQUIRED=0.5
|
|
|
|
POLKIT_GRANT_REQUIRED=0.5
|
2007-07-31 09:53:31 -07:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Make above strings available for packaging files (e.g. rpm spec files)
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_SUBST(GLIB_REQUIRED)
|
2007-08-03 13:15:01 -07:00
|
|
|
AC_SUBST(GTK_REQUIRED)
|
2007-08-14 04:45:24 -07:00
|
|
|
AC_SUBST(DBUS_REQUIRED)
|
2007-08-14 12:52:42 -07:00
|
|
|
AC_SUBST(LIBGLADE_REQUIRED)
|
|
|
|
AC_SUBST(LIBNOTIFY_REQUIRED)
|
2007-07-31 09:53:31 -07:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Check library dependencies
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0)
|
|
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
|
|
AC_SUBST(GLIB_LIBS)
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(DBUS, \
|
|
|
|
dbus-glib-1 >= $DBUS_REQUIRED \
|
|
|
|
dbus-1 >= $DBUS_REQUIRED \
|
|
|
|
gthread-2.0)
|
|
|
|
AC_SUBST(DBUS_CFLAGS)
|
|
|
|
AC_SUBST(DBUS_LIBS)
|
|
|
|
|
2007-08-03 13:15:01 -07:00
|
|
|
PKG_CHECK_MODULES(GTK, \
|
|
|
|
gtk+-2.0 >= $GTK_REQUIRED)
|
|
|
|
AC_SUBST(GTK_CFLAGS)
|
|
|
|
AC_SUBST(GTK_LIBS)
|
|
|
|
|
2007-08-14 12:52:42 -07:00
|
|
|
PKG_CHECK_MODULES(LIBGLADE, \
|
|
|
|
libglade-2.0 >= $LIBGLADE_REQUIRED)
|
|
|
|
AC_SUBST(LIBGLADE_CFLAGS)
|
|
|
|
AC_SUBST(LIBGLADE_LIBS)
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(LIBNOTIFY, \
|
|
|
|
libnotify >= $LIBNOTIFY_REQUIRED)
|
|
|
|
AC_SUBST(LIBNOTIFY_CFLAGS)
|
|
|
|
AC_SUBST(LIBNOTIFY_LIBS)
|
|
|
|
|
2007-08-20 10:19:09 -07:00
|
|
|
PKG_CHECK_MODULES(LIBNM, \
|
|
|
|
libnm_glib >= $LIBNM_REQUIRED)
|
|
|
|
AC_SUBST(LIBNM_CFLAGS)
|
|
|
|
AC_SUBST(LIBNM_LIBS)
|
|
|
|
|
2007-08-21 04:54:04 -07:00
|
|
|
PKG_CHECK_MODULES(POLKIT, \
|
|
|
|
polkit-dbus >= $POLKIT_DBUS_REQUIRED \
|
|
|
|
polkit-grant >= $POLKIT_GRANT_REQUIRED)
|
|
|
|
|
|
|
|
AC_CHECK_PROG([POLKIT_POLICY_FILE_VALIDATE],
|
|
|
|
[polkit-policy-file-validate], [polkit-policy-file-validate])
|
|
|
|
if test -z "$POLKIT_POLICY_FILE_VALIDATE"; then
|
|
|
|
AC_MSG_ERROR([polkit-policy-file-validate not found])
|
|
|
|
fi
|
|
|
|
|
2007-08-23 09:11:59 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Is docbook2man available?
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
|
|
|
|
if test "$DOCBOOK2MAN" = "no" ; then
|
|
|
|
AC_MSG_WARN([docbook2man not found, will not be able to build man documentation])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])
|
|
|
|
|
2007-07-31 09:53:31 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Make paths available for source files
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_SUBST(SYSCONFDIR, $sysconfdir)
|
|
|
|
AC_SUBST(DATADIR, $datadir)
|
|
|
|
AC_SUBST(BINDIR, $bindir)
|
|
|
|
AC_SUBST(SBINDIR, $sbindir)
|
|
|
|
|
2007-07-31 11:07:22 -07:00
|
|
|
AC_ARG_WITH([packagekit_user],
|
|
|
|
AS_HELP_STRING([--with-packagekit-user=<user>],
|
|
|
|
[User for running the PacakgeKit daemon (root)]))
|
|
|
|
if test -z "$with_packagekit_user" ; then
|
|
|
|
PACKAGEKIT_USER=root
|
|
|
|
else
|
|
|
|
PACKAGEKIT_USER=$with_packagekit_user
|
|
|
|
fi
|
|
|
|
AC_SUBST(PACKAGEKIT_USER)
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGEKIT_USER,"$PACKAGEKIT_USER", [User for running the PacakgeKit daemon])
|
|
|
|
|
2007-07-31 09:53:31 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Build self tests
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE(tests, [ --enable-tests Build self tests],enable_tests=$enableval,enable_tests=no)
|
|
|
|
AC_MSG_CHECKING([whether to support tests])
|
|
|
|
have_tests=no
|
|
|
|
if test x$enable_tests = xyes ; then
|
|
|
|
have_tests=yes
|
|
|
|
AC_DEFINE(HAVE_TESTS, 1, [Define if we want to use the self tests])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([HAVE_TESTS], [test $have_tests = yes])
|
|
|
|
|
2007-08-13 16:02:19 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Are we specifying a different dbus root ?
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(dbus-sys,
|
|
|
|
[AC_HELP_STRING([--with-dbus-sys=<dir>],
|
|
|
|
[where D-BUS system.d directory is])])
|
|
|
|
AC_ARG_WITH(dbus-services,
|
|
|
|
[AC_HELP_STRING([--with-dbus-services=<dir>],
|
|
|
|
[where D-BUS system-services directory is])])
|
|
|
|
if ! test -z "$with_dbus_sys" ; then
|
|
|
|
DBUS_SYS_DIR="$with_dbus_sys"
|
|
|
|
else
|
|
|
|
DBUS_SYS_DIR="$SYSCONFDIR/dbus-1/system.d"
|
|
|
|
fi
|
|
|
|
if ! test -z "$with_dbus_services" ; then
|
|
|
|
DBUS_SERVICES_DIR="$with_dbus_services"
|
|
|
|
else
|
|
|
|
DBUS_SERVICES_DIR="$DATADIR/dbus-1/system-services"
|
|
|
|
fi
|
|
|
|
AC_SUBST(DBUS_SYS_DIR)
|
|
|
|
AC_SUBST(DBUS_SERVICES_DIR)
|
2007-08-01 09:19:45 -07:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Compile time choice of backend
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH([backend],
|
|
|
|
AS_HELP_STRING([--with-backend=<option>],
|
2007-08-23 09:36:26 -07:00
|
|
|
[Backend to use dummy,apt,yum,conary (dummy)]))
|
2007-08-19 14:43:19 -07:00
|
|
|
# default to a sane option for the installed tool
|
2007-08-01 09:19:45 -07:00
|
|
|
if test x$with_backend = x; then
|
2007-08-19 14:43:19 -07:00
|
|
|
if test -f /usr/bin/yum ; then
|
|
|
|
with_backend=yum
|
|
|
|
elif test -f /usr/bin/apt-get ; then
|
|
|
|
with_backend=apt
|
2007-08-23 09:36:26 -07:00
|
|
|
elif test -f /usr/bin/conary ; then
|
|
|
|
with_backend=conary
|
2007-08-19 14:43:19 -07:00
|
|
|
else
|
|
|
|
with_backend=dummy
|
|
|
|
fi
|
2007-08-01 09:19:45 -07:00
|
|
|
fi
|
2007-08-22 06:33:56 -07:00
|
|
|
|
|
|
|
# apt has other BR's
|
|
|
|
if test x$with_backend = xapt; then
|
|
|
|
# This does not work for me on fedora
|
|
|
|
# PKG_CHECK_MODULES(APT,libapt-pkg)
|
|
|
|
APT_CFLAGS="-I/usr/include/apt-pkg"
|
|
|
|
APT_LIBS="-lapt-pkg"
|
|
|
|
AC_SUBST(APT_CFLAGS)
|
|
|
|
AC_SUBST(APT_LIBS)
|
|
|
|
fi
|
|
|
|
|
2007-08-19 14:43:19 -07:00
|
|
|
AM_CONDITIONAL(BACKEND_TYPE_DUMMY, [test x$with_backend = xdummy], [using dummy backend])
|
|
|
|
AM_CONDITIONAL(BACKEND_TYPE_APT, [test x$with_backend = xapt], [using APT backend])
|
|
|
|
AM_CONDITIONAL(BACKEND_TYPE_YUM, [test x$with_backend = xyum], [using YUM backend])
|
2007-08-23 09:36:26 -07:00
|
|
|
AM_CONDITIONAL(BACKEND_TYPE_CONARY, [test x$with_backend = xconary], [using CONARY backend])
|
2007-08-01 09:19:45 -07:00
|
|
|
|
|
|
|
|
2007-07-31 09:53:31 -07:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl - Makefiles, etc.
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
2007-08-23 09:11:59 -07:00
|
|
|
man/Makefile
|
2007-08-20 08:37:32 -07:00
|
|
|
libgbus/Makefile
|
2007-08-23 06:50:55 -07:00
|
|
|
libpackagekit/Makefile
|
2007-08-21 04:54:04 -07:00
|
|
|
policy/Makefile
|
2007-07-31 09:53:31 -07:00
|
|
|
src/Makefile
|
2007-08-03 04:29:18 -07:00
|
|
|
client/Makefile
|
2007-08-16 07:17:47 -07:00
|
|
|
helpers/Makefile
|
2007-07-31 11:07:22 -07:00
|
|
|
PackageKit.conf
|
2007-07-31 09:53:31 -07:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl ==========================================================================
|
|
|
|
echo "
|
|
|
|
PackageKit $VERSION
|
|
|
|
====================
|
|
|
|
|
|
|
|
prefix: ${prefix}
|
|
|
|
datadir: ${datadir}
|
|
|
|
compiler: ${CC}
|
|
|
|
cflags: ${CFLAGS}
|
2007-08-01 09:19:45 -07:00
|
|
|
Backend: ${with_backend}
|
2007-07-31 09:53:31 -07:00
|
|
|
Self test support: ${have_tests}
|
|
|
|
"
|
|
|
|
|