2008-06-09 Emmanuele Bassi <ebassi@openedhand.com>

* configure.ac: Clean up a bit the X11 and X extensions
	checks with PKG_CHECK_EXISTS(). Since we are filling up the
	X11_CFLAGS and X11_LIBS variables ourselves there is no
	point in polluting the Makefiles with unused variables.

	* clutter/Makefile.am: Remove the pkg-config variable
	evaluation and use the values retrieved from the configure
	script.
This commit is contained in:
Emmanuele Bassi 2008-06-09 13:29:17 +00:00
parent db232dd5e7
commit 40b62c7b67
3 changed files with 71 additions and 36 deletions

View File

@ -1,3 +1,14 @@
2008-06-09 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac: Clean up a bit the X11 and X extensions
checks with PKG_CHECK_EXISTS(). Since we are filling up the
X11_CFLAGS and X11_LIBS variables ourselves there is no
point in polluting the Makefiles with unused variables.
* clutter/Makefile.am: Remove the pkg-config variable
evaluation and use the values retrieved from the configure
script.
2008-06-09 Chris Lord <chris@openedhand.com> 2008-06-09 Chris Lord <chris@openedhand.com>
Bug #914 - ClutterEntry is confused about characters vs. bytes Bug #914 - ClutterEntry is confused about characters vs. bytes

View File

@ -16,8 +16,6 @@ target = $(clutterbackend)
MARSHALFILES = clutter-marshal.c clutter-marshal.h MARSHALFILES = clutter-marshal.c clutter-marshal.h
ENUMFILES = clutter-enum-types.c clutter-enum-types.h ENUMFILES = clutter-enum-types.c clutter-enum-types.h
STAMPFILES = stamp-clutter-marshal.h stamp-clutter-enum-types.h STAMPFILES = stamp-clutter-marshal.h stamp-clutter-enum-types.h
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
GLIB_MKENUMS=`pkg-config --variable=glib_mkenums glib-2.0`
INCLUDES = \ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \

View File

@ -78,6 +78,11 @@ AC_FUNC_MALLOC
AC_FUNC_MMAP AC_FUNC_MMAP
AC_CHECK_FUNCS([memset munmap strcasecmp strdup]) AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
PKG_PROG_PKG_CONFIG
dnl ======================================================================== dnl ========================================================================
imagebackend="gdk-pixbuf" imagebackend="gdk-pixbuf"
@ -136,39 +141,61 @@ fi
BACKEND_PC_FILES="" BACKEND_PC_FILES=""
# Check for X though could be redundant if backend does not need it. # Check for X though could be redundant if backend does not need it.
PKG_CHECK_MODULES(X11, x11, [have_x11=yes], [have_x11=no]) AC_MSG_CHECKING([for X11])
if test x$have_x11 = xno; then PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
AC_PATH_X if test "x$have_x11" = "xno"; then
if test x"$no_x" = "yes" ; then AC_PATH_X
if test "x$clutterbackend" = "xglx" or "x$clutterbackend" = "xeglx"
then if test x"$no_x" = "yes" ; then
AC_MSG_ERROR([[No X11 Libraries found and required by backend.]]) if test "x$clutterbackend" = "xglx" or "x$clutterbackend" = "xeglx"
fi then
fi AC_MSG_ERROR([No X11 Libraries found and required by backend.])
if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then fi
X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`
fi AC_MSG_RESULT([not found])
if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then else
X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"` if test x"$x_includes" != x"NONE" && test -n "$x_includes" ; then
fi X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`
fi
if test x"$x_libraries" != x"NONE" && test -n "$x_libraries" ; then
X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`
fi
AC_MSG_RESULT([found])
fi
else
AC_MSG_RESULT([found])
fi fi
PKG_CHECK_MODULES(XFIXES, xfixes >= 3, [have_xfixes=yes], [have_xfixes=no]) AC_MSG_CHECKING([for XFIXES extension >= 3])
if test x$have_xfixes = xyes; then PKG_CHECK_EXISTS([xfixes >= 3], [have_xfixes=yes], [have_xfixes=no])
AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension]) if test "x$have_xfixes" = "xyes"; then
X11_LIBS="$X11_LIBS -lXfixes" AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if we have the XFIXES X extension])
X11_LIBS="$X11_LIBS -lXfixes"
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
fi fi
PKG_CHECK_MODULES(XDAMAGE, xdamage, [have_xdamage=yes], [have_xdamage=no]) AC_MSG_CHECKING([for XDAMAGE extension])
if test x$have_xdamage = xyes; then PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension]) if test "x$have_xdamage" = "xyes"; then
X11_LIBS="$X11_LIBS -lXdamage" AC_DEFINE(HAVE_XDAMAGE, 1, [Define to 1 if we have the XDAMAGE X extension])
X11_LIBS="$X11_LIBS -lXdamage"
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
fi fi
# Composite 0.4 just needed for tests # Composite 0.4 just needed for tests
PKG_CHECK_MODULES(XCOMPOSITE, xcomposite >= 0.4, [have_xcomposite=yes], [have_xcomposite=no]) AC_MSG_CHECKING([for XCOMPOSITE extension >= 0.4])
if test x$have_xcomposite = xyes; then PKG_CHECK_EXISTS([xcomposite >= 0.4], [have_xcomposite=yes], [have_xcomposite=no])
AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension]) if test "x$have_xcomposite" = "xyes"; then
AC_DEFINE(HAVE_XCOMPOSITE, 1, [Define to 1 if we have the XCOMPOSITE X extension])
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
fi fi
x11_tests=no x11_tests=no
@ -176,14 +203,13 @@ x11_tests=no
# Currently require all extentions, may not for actual release. # Currently require all extentions, may not for actual release.
if test "x$clutterbackend" = "xglx" || test "x$clutterbackend" = "xeglx" if test "x$clutterbackend" = "xglx" || test "x$clutterbackend" = "xeglx"
then then
if test "x$have_xdamage" = "xno" || test "x$have_xfixes" = "xno" if test "x$have_xdamage" = "xno" || test "x$have_xfixes" = "xno"; then
then AC_MSG_ERROR([Required backend X11 Libraries not found.])
AC_MSG_ERROR([[Required backend X11 Libraries not found.]]) fi
fi
if test "x$have_xcomposite" = "xyes" if test "x$have_xcomposite" = "xyes"; then
then x11_tests=yes
x11_tests=yes fi
fi
fi fi
AM_CONDITIONAL(X11_TESTS, test "x$x11_tests" != "xno") AM_CONDITIONAL(X11_TESTS, test "x$x11_tests" != "xno")