Skip to content

Commit

Permalink
Changed GTK+ configure option.
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwarat committed Nov 30, 2010
1 parent 1f2f2d3 commit 44a4af5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
49 changes: 28 additions & 21 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,35 @@ PKG_CHECK_MODULES(GLIB2, [
])

dnl - check gtk
AC_ARG_WITH(gtk-version,
AS_HELP_STRING([--with-gtk-version[=VERSION]],
[Select GTK+ version. The default is 2]),,
with_gtk_version=2
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk=2.0|3.0],
[Select GTK+ version. The default is 2.0])],
[case "$with_gtk" in
2.0|3.0) ;;
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
esac],
[with_gtk=2.0]
)

if test "x$with_gtk_version" = x3 ; then
PKG_CHECK_MODULES(GTK3, [
gtk+-3.0
])
AM_CONDITIONAL(HAVE_GTK3, true)
AM_CONDITIONAL(HAVE_GTK2, false)
WITH_GTK_VERSION=3.0
else
PKG_CHECK_MODULES(GTK2, [
gtk+-2.0
])
AM_CONDITIONAL(HAVE_GTK3, false)
AM_CONDITIONAL(HAVE_GTK2, true)
WITH_GTK_VERSION=2.0
fi
AC_SUBST(WITH_GTK_VERSION)
case "$with_gtk" in
2.0)
PKG_CHECK_MODULES(GTK2, [
gtk+-2.0
])
AM_CONDITIONAL(HAVE_GTK3, false)
AM_CONDITIONAL(HAVE_GTK2, true)
GTK_API_VERSION=2.0
;;
3.0)
PKG_CHECK_MODULES(GTK3, [
gtk+-3.0
])
AM_CONDITIONAL(HAVE_GTK3, true)
AM_CONDITIONAL(HAVE_GTK2, false)
GTK_API_VERSION=3.0
;;
esac
AC_SUBST(GTK_API_VERSION)

PKG_CHECK_MODULES(LIBXML2, [
libxml-2.0 >= 2.0
Expand Down Expand Up @@ -228,7 +235,7 @@ echo "


libinput_pad version: $libinput_pad_VERSION
GTK+ version: $WITH_GTK_VERSION
GTK+ version: $GTK_API_VERSION
Have libxklavier: $have_libxklavier
Enable EEK $enable_eek
Enable Python $enable_python
Expand Down
2 changes: 1 addition & 1 deletion input-pad.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ xkeysenddir=@libdir@/input-pad-@libinput_pad_VERSION@/modules/xkeysend
Name: input-pad
Description: Input Pad
Version: @VERSION@
Requires: glib-2.0 gtk+-@WITH_GTK_VERSION@
Requires: glib-2.0 gtk+-@GTK_API_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -linput-pad

0 comments on commit 44a4af5

Please sign in to comment.