From e7434f0391a791fca249caba10c9670e2b901b6c Mon Sep 17 00:00:00 2001 From: ericwa Date: Tue, 2 Aug 2011 04:08:48 +0000 Subject: [PATCH] * configure.ac: Add a configure test for Xcursor * configure: regenerate * config.h.in: regernate git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33677 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ config.h.in | 6 ++++++ configure | 47 +++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 7 +++++++ 4 files changed, 66 insertions(+) diff --git a/ChangeLog b/ChangeLog index 60f7719..7774777 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-08-01 Eric Wasylishen + + * configure.ac: Add a configure test for Xcursor + * configure: regenerate + * config.h.in: regernate + 2011-07-30 Eric Wasylishen * Source/win32/WIN32Server.m (-resolutionForScreen:): Scale the result by 0.75 so the Windows default of 96 DPI is diff --git a/config.h.in b/config.h.in index 5ea37eb..be4a347 100644 --- a/config.h.in +++ b/config.h.in @@ -92,6 +92,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_X11_EXTENSIONS_XSHM_H +/* Define to enable Xcursor support */ +#undef HAVE_XCURSOR + /* Define if you have a functional XFreeType installation, including libXft. */ #undef HAVE_XFT @@ -114,6 +117,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/configure b/configure index fada396..6576344 100755 --- a/configure +++ b/configure @@ -4706,6 +4706,53 @@ $as_echo "$XMU_LIBS" >&6; } fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XcursorImageCreate in -lXcursor" >&5 +$as_echo_n "checking for XcursorImageCreate in -lXcursor... " >&6; } +if test "${ac_cv_lib_Xcursor_XcursorImageCreate+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXcursor $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XcursorImageCreate (); +int +main () +{ +return XcursorImageCreate (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xcursor_XcursorImageCreate=yes +else + ac_cv_lib_Xcursor_XcursorImageCreate=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xcursor_XcursorImageCreate" >&5 +$as_echo "$ac_cv_lib_Xcursor_XcursorImageCreate" >&6; } +if test "x$ac_cv_lib_Xcursor_XcursorImageCreate" = x""yes; then : + + LIBS="-lXcursor $LIBS" + +$as_echo "#define HAVE_XCURSOR 1" >>confdefs.h + + + +fi + + LIBS="$X_LIBS $LIBS" fi diff --git a/configure.ac b/configure.ac index afbceb4..bbdbfb6 100644 --- a/configure.ac +++ b/configure.ac @@ -152,6 +152,13 @@ if test $set_x_paths = yes; then PKG_CHECK_MODULES([XMU], [xmu]) fi + AC_CHECK_LIB(Xcursor, XcursorImageCreate, + [ + LIBS="-lXcursor $LIBS" + AC_DEFINE(HAVE_XCURSOR, 1, [Define to enable Xcursor support]) + ] + ,) + LIBS="$X_LIBS $LIBS" fi AC_SUBST(X_PRE_LIBS)