Use pkg-config to get x11 flags instead of AC_PATH_XTRA

This commit is contained in:
Yevgen Muntyan 2010-09-30 23:09:06 -07:00
parent 941f87953f
commit d7de7f74e0

View File

@ -281,16 +281,17 @@ AC_DEFUN_ONCE([MOO_AC_FLAGS],[
MOO_LIBS="$MOO_LIBS $GTK_LIBS $GTHREAD_LIBS $LIBM" MOO_LIBS="$MOO_LIBS $GTK_LIBS $GTHREAD_LIBS $LIBM"
if $GDK_X11; then if $GDK_X11; then
AC_PATH_XTRA _moo_x_pkgs=
AC_CHECK_LIB(Xrender, XRenderFindFormat,[ PKG_CHECK_EXISTS(x11,[_moo_x_pkgs="$_moo_x_pkgs x11"],[:])
AC_SUBST(RENDER_LIBS, "-lXrender -lXext") PKG_CHECK_EXISTS(xext,[_moo_x_pkgs="$_moo_x_pkgs xext"],[:])
AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.]) PKG_CHECK_EXISTS(xrender,[_moo_x_pkgs="$_moo_x_pkgs xrender"],[:])
],[ PKG_CHECK_EXISTS(ice,[_moo_x_pkgs="$_moo_x_pkgs ice"],[:])
AC_SUBST(RENDER_LIBS, "") if test -n "$_moo_x_pkgs"; then
],[-lXext]) PKG_CHECK_MODULES(X,[$_moo_x_pkgs])
MOO_CFLAGS="$MOO_CFLAGS $X_CFLAGS" MOO_CFLAGS="$MOO_CFLAGS $X_CFLAGS"
MOO_CXXFLAGS="$MOO_CXXFLAGS $X_CFLAGS" MOO_CXXFLAGS="$MOO_CXXFLAGS $X_CFLAGS"
MOO_LIBS="$MOO_LIBS $X_LIBS -lX11 -lICE -lSM $RENDER_LIBS" MOO_LIBS="$MOO_LIBS $X_LIBS"
fi
fi fi
if $MOO_OS_WIN32; then if $MOO_OS_WIN32; then