summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2008-11-10 23:01:13 -0800
committerDaniel Burrows <dburrows@debian.org>2008-11-10 23:01:13 -0800
commitb19f395988700a2521a7ba36d453f590d6e43bdf (patch)
treed73204adef04dc52bec04ae94c5b4bb0df07beea /configure.ac
parent6544eb693a0aad5dcb5e4131929c7e8c3e0b7ee6 (diff)
parentfa00aef0833f8c9456d68061ac096b487e2f80b7 (diff)
downloadaptitude-b19f395988700a2521a7ba36d453f590d6e43bdf.tar.gz
Merge with head.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac66
1 files changed, 52 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index c26bf134..de6dc83e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,31 +41,59 @@ AC_CHECK_LIB(pthread, main,
ALL_LINGUAS="ar bs ca cs da de dz el es eu fi fr gl hu it ja km ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sv th tl tr uk vi zh_CN zh_TW"
AM_GNU_GETTEXT([external])
-HAVE_EPT=
-AC_ARG_WITH(ept,
- AS_HELP_STRING(--with-ept, [compile against the ept library (enables debtags and xapian-index support)]),
+PKG_CHECK_MODULES(ept, libept, [], [AC_MSG_ERROR([Can't find the ept library -- please install libept-dev])])
+AC_DEFINE([HAVE_EPT], [], [Backwards compatibility symbol; must always be defined.])
+
+PKG_CHECK_MODULES(SIGC, sigc++-2.0)
+
+PKG_CHECK_MODULES(CWIDGET, cwidget)
+
+PKG_CHECK_MODULES(VTE, vte)
+
+HAVE_GTK=1
+AC_ARG_ENABLE(gtk,
+ AS_HELP_STRING(--disable-gtk, [don't compile the GTK+/gtkmm frontend even if the appropriate libraries are available]),
[if test x$withval = xyes
then
- HAVE_EPT=1
+ HAVE_GTK=1
+ else
+ HAVE_GTK=
fi])
-PKG_CHECK_MODULES(ept, libept, [], [HAVE_EPT=])
+WANT_HAVE_GTK=$HAVE_GTK
-if test x$HAVE_EPT = x1
+dnl We always test all the libraries so that the user gets to see
+dnl which libraries are needed for GTK+.
+if test x$HAVE_GTK = x1
then
- AC_DEFINE(HAVE_EPT, 1, [Define if the ept package information library is available.])
+ AC_MSG_NOTICE([Testing for the libraries needed to build the GTK+ frontend.])
+
+ PKG_CHECK_MODULES(GLIBMM, glibmm-2.4,,[HAVE_GTK=])
+ PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,[HAVE_GTK=])
+ PKG_CHECK_MODULES(GTKMM, gtkmm-2.4,,[HAVE_GTK=])
+ PKG_CHECK_MODULES(LIBGLADEMM, libglademm-2.4,,[HAVE_GTK=])
else
- # Force the program not to link against ept.
- ept_CFLAGS=
- ept_LIBS=
+ AC_MSG_NOTICE([Disabling the GTK+ frontend at your request (--disable-gtk).])
fi
-PKG_CHECK_MODULES(SIGC, sigc++-2.0)
+if test x$WANT_HAVE_GTK = x1 && test x$HAVE_GTK != x1
+then
+ AC_MSG_WARN([Unable to find the necessary GTK+ libraries; disabling GTK+ support.])
+fi
-PKG_CHECK_MODULES(CWIDGET, cwidget)
+if test x$HAVE_GTK = x1
+then
+ AC_MSG_NOTICE([The GTK+ frontend will be built.])
+fi
-CXXFLAGS="$CXXFLAGS $SIGC_CFLAGS $CWIDGET_CFLAGS $ept_CFLAGS"
-LIBS="$LIBS $SIGC_LIBS $CWIDGET_LIBS $ept_LIBS"
+AM_CONDITIONAL([BUILD_GTK], [test x$HAVE_GTK = x1])
+if test x$HAVE_GTK = x1
+then
+ AC_DEFINE([HAVE_GTK], [], [Define if the GTK+ frontend is included in the build.])
+fi
+
+CXXFLAGS="$CXXFLAGS $SIGC_CFLAGS $CWIDGET_CFLAGS $GLIBMM_CFLAGS $GTHREAD_CFLAGS $GTKMM_CFLAGS $LIBGLADEMM_CFLAGS $VTE_CFLAGS $ept_CFLAGS"
+LIBS="$LIBS $SIGC_LIBS $CWIDGET_LIBS $GLIBMM_LIBS $GTHREAD_LIBS $GTKMM_LIBS $LIBGLADEMM_LIBS $VTE_LIBS $ept_LIBS"
AC_DEFINE_UNQUOTED(SIGC_VERSION, ["$(pkg-config --modversion sigc++-2.0)"], [The version of libsigc++ with which the program was compiled])
dnl Checks for header files.
@@ -211,6 +239,14 @@ fi
WERROR="-Werror"
+AC_ARG_ENABLE(private-glade-file,
+ AS_HELP_STRING([--disable-private-glade-file], [Always read the .glade file from \$datadir instead of reading one in ".". This can be useful when installing aptitude globally, to avoid accidentally picking up the wrong version of the .glade file.]),
+ [if test x$enableval = xno
+ then
+ AC_DEFINE([DISABLE_PRIVATE_GLADE_FILE], [], [Define to disable the use of a .glade file found relative to the current working directory.])
+ fi]
+ )
+
AC_ARG_ENABLE(dynamic-backtrace,
AS_HELP_STRING([--enable-dynamic-backtrace], [Modify the executable so that it can generate a backtrace for uncaught exceptions. Will double the size of the stripped binary.]),
[if test x$enableval = xyes
@@ -324,9 +360,11 @@ AC_CONFIG_FILES([
m4/Makefile
po/Makefile.in
src/Makefile
+ src/gtk/Makefile
src/cmdline/Makefile
src/generic/Makefile
src/generic/apt/Makefile
+ src/generic/apt/matching/Makefile
src/generic/problemresolver/Makefile
src/generic/util/Makefile
src/mine/Makefile