diff options
author | Sergey Udaltsov <svu@gnome.org> | 2010-09-13 21:48:23 +0000 |
---|---|---|
committer | Sergey Udaltsov <svu@gnome.org> | 2010-09-13 21:48:23 +0000 |
commit | 911fd70d0d6b3326081dcf2f51b459a821e3442f (patch) | |
tree | 5ab513d00c8fdc0b492495ca840dfedc6a6b1306 | |
parent | e50f4373b11db55ce829f86dab05c6eb695806c2 (diff) |
Accessing X11 API using pkg-config, skipping hackish AC_PATH_XTRA
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.in | 19 |
2 files changed, 12 insertions, 11 deletions
@@ -1,3 +1,7 @@ +2010-09-13 svu + + * configure.in: accessing X11 api using pkg-config + 2010-01-11 svu * libxklavier/xkl_engine.h, libxklavier/xklavier.c, diff --git a/configure.in b/configure.in index 0de62b6..be47a6a 100644 --- a/configure.in +++ b/configure.in @@ -48,14 +48,19 @@ dnl jm_LANGINFO_CODESET AC_CHECK_FUNCS(setlocale) -AC_PATH_XTRA + +PKG_CHECK_MODULES(X, \ + x11) +AC_SUBST(X_LIBS) +AC_SUBST(X_CFLAGS) + AC_ARG_WITH( xkb_base, [ --with-xkb-base=DIR XKB base path (by default it is /usr/share/X11/xkb)], xkb_base="$withval", - if test -z "$x_libraries" ; then + if test -z "$X_LIBS" ; then xkb_base="/usr/share/X11/xkb" else - xkb_base="$x_libraries/X11/xkb" + xkb_base="$X_LIBS/X11/xkb" fi ) AC_DEFINE_UNQUOTED(XKB_BASE,"${xkb_base}",Base for XKB configuration) @@ -94,12 +99,6 @@ AC_ARG_WITH( xmodmap_base, AC_DEFINE_UNQUOTED(XMODMAP_BASE,"${xmodmap_base}",Base for xmodmap configuration) -save_CFLAGS="$CFLAGS" -if test -n "$ac_x_includes"; then - X_INCLUDES=-I`echo $x_includes | sed -e "s/:/ -I/g"` - CFLAGS="${CFLAGS} $X_INCLUDES" -fi - ac_xkblib_include="\ #include <stdio.h> #include <X11/Xlib.h> @@ -112,8 +111,6 @@ AM_CONDITIONAL(LIBXKBFILE_PRESENT, test "$libxkbfile_present" = "yes") AC_SUBST(libxkbfile_present) -CFLAGS="$save_CFLAGS" - AC_ARG_ENABLE(xkb-support, [ --enable-xkb-support Enable XKB support], , enable_xkb_support=yes) |