Permalink
Browse files

Fix libappindicator detection with gtk3

  • Loading branch information...
nick87720z committed Jan 11, 2018
1 parent 722fcf7 commit 1d66facfc0b749692d80b78568bf9b71749fc16c
Showing with 32 additions and 30 deletions.
  1. +32 −30 configure.ac
@@ -38,36 +38,6 @@ AC_SUBST(clipitlocaledir)
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.19)
# -------------------------------------------------------------------------------
# Application indicator.
# -------------------------------------------------------------------------------
APPINDICATOR_REQUIRED_VERSION=0.2.4
AC_ARG_ENABLE([appindicator],
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS(appindicator-0.1 >= $APPINDICATOR_REQUIRED_VERSION,
[enable_appindicator="yes"],
[enable_appindicator="no"])
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_MODULES(APPINDICATOR,
[appindicator-0.1 >= $APPINDICATOR_REQUIRED_VERSION],
[AC_DEFINE(HAVE_APPINDICATOR, 1, [Have AppIndicator])])
fi
AM_CONDITIONAL(HAVE_APPINDICATOR, test x$enable_appindicator = xyes)
AC_SUBST(APPINDICATOR_CFLAGS)
AC_SUBST(APPINDICATOR_LIBS)
AC_SUBST(X11_LIBS, -lX11)
# -------------------------------------------------------------------------------
# Config options.
# -------------------------------------------------------------------------------
@@ -93,10 +63,42 @@ AC_ARG_WITH([gtk3], AS_HELP_STRING([--with-gtk3], [Build with the GTK+ 3 interfa
if test "x$with_gtk3" = "xyes"; then
PKG_CHECK_MODULES([GTK], [gtk+-3.0])
APPINDICATOR_MODULE="appindicator3-0.1"
else
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.10])
APPINDICATOR_MODULE="appindicator-0.1"
fi
# -------------------------------------------------------------------------------
# Application indicator.
# -------------------------------------------------------------------------------
APPINDICATOR_REQUIRED_VERSION=0.2.4
AC_ARG_ENABLE([appindicator],
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS($APPINDICATOR_MODULE= >= $APPINDICATOR_REQUIRED_VERSION,
[enable_appindicator="yes"],
[enable_appindicator="no"])
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_MODULES(APPINDICATOR,
[$APPINDICATOR_MODULE >= $APPINDICATOR_REQUIRED_VERSION],
[AC_DEFINE(HAVE_APPINDICATOR, 1, [Have AppIndicator])])
fi
AM_CONDITIONAL(HAVE_APPINDICATOR, test x$enable_appindicator = xyes)
AC_SUBST(APPINDICATOR_CFLAGS)
AC_SUBST(APPINDICATOR_LIBS)
AC_SUBST(X11_LIBS, -lX11)
AM_PATH_GLIB_2_0(2.14.0, [], AC_MSG_ERROR(Requirement not met: glib >= 2.14.0))
# -------------------------------------------------------------------------------

0 comments on commit 1d66fac

Please sign in to comment.