Commit af928ecb authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Merge the libXrandr existence check with the soname check.

parent 31353e1e
...@@ -9359,11 +9359,84 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ...@@ -9359,11 +9359,84 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test -z "$ac_c_werror_flag" || test -z "$ac_c_werror_flag" ||
test ! -s conftest.err test ! -s conftest.err
} && test -s conftest.$ac_objext; then } && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: checking for -lXrandr" >&5
echo $ECHO_N "checking for -lXrandr... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_Xrandr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lXrandr $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
cat >>confdefs.h <<\_ACEOF /* Override any GCC internal prototype to avoid an error.
#define HAVE_LIBXRANDR 1 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 XRRQueryExtension ();
int
main ()
{
return XRRQueryExtension ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
case "$LIBEXT" in
dll) ;;
dylib) ac_cv_lib_soname_Xrandr=`otool -L conftest$ac_exeext | grep "libXrandr\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXrandr\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_Xrandr=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXrandr\\.$LIBEXT" | sed -e "s/^.*\(libXrandr\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
esac
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_soname_save_LIBS
fi
if test "x$ac_cv_lib_soname_Xrandr" = "x"; then
{ echo "$as_me:$LINENO: result: not found" >&5
echo "${ECHO_T}not found" >&6; }
else
{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_Xrandr" >&5
echo "${ECHO_T}$ac_cv_lib_soname_Xrandr" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBXRANDR "$ac_cv_lib_soname_Xrandr"
_ACEOF _ACEOF
fi
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
...@@ -15267,84 +15340,6 @@ _ACEOF ...@@ -15267,84 +15340,6 @@ _ACEOF
fi fi
{ echo "$as_me:$LINENO: checking for -lXrandr" >&5
echo $ECHO_N "checking for -lXrandr... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_Xrandr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lXrandr $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 XRRQueryExtension ();
int
main ()
{
return XRRQueryExtension ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
case "$LIBEXT" in
dll) ;;
dylib) ac_cv_lib_soname_Xrandr=`otool -L conftest$ac_exeext | grep "libXrandr\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXrandr\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_Xrandr=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXrandr\\.$LIBEXT" | sed -e "s/^.*\(libXrandr\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
esac
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_soname_save_LIBS
fi
if test "x$ac_cv_lib_soname_Xrandr" = "x"; then
{ echo "$as_me:$LINENO: result: not found" >&5
echo "${ECHO_T}not found" >&6; }
else
{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_Xrandr" >&5
echo "${ECHO_T}$ac_cv_lib_soname_Xrandr" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBXRANDR "$ac_cv_lib_soname_Xrandr"
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for -lXcursor" >&5 { echo "$as_me:$LINENO: checking for -lXcursor" >&5
echo $ECHO_N "checking for -lXcursor... $ECHO_C" >&6; } echo $ECHO_N "checking for -lXcursor... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_Xcursor+set}" = set; then if test "${ac_cv_lib_soname_Xcursor+set}" = set; then
......
...@@ -539,7 +539,7 @@ then ...@@ -539,7 +539,7 @@ then
then then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>]], [[static typeof(XRRSetScreenConfigAndRate) * func;]])], #include <X11/extensions/Xrandr.h>]], [[static typeof(XRRSetScreenConfigAndRate) * func;]])],
[AC_DEFINE(HAVE_LIBXRANDR, 1, [Define if you have the Xrandr library])],[]) [WINE_CHECK_SONAME(Xrandr,XRRQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
fi fi
dnl *** Check for Transform functions in Xrender dnl *** Check for Transform functions in Xrender
...@@ -1148,7 +1148,6 @@ WINE_CHECK_SONAME(Xext,XextCreateExtension,,,[$X_LIBS -lX11 $X_EXTRA_LIBS]) ...@@ -1148,7 +1148,6 @@ WINE_CHECK_SONAME(Xext,XextCreateExtension,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xinerama,XineramaQueryScreens,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) WINE_CHECK_SONAME(Xinerama,XineramaQueryScreens,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xrender,XRenderQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]) WINE_CHECK_SONAME(Xrender,XRenderQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xrandr,XRRQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS -lX11 $X_EXTRA_LIBS]) WINE_CHECK_SONAME(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS]) WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS])
WINE_CHECK_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1) WINE_CHECK_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
......
...@@ -439,7 +439,7 @@ static BOOL process_attach(void) ...@@ -439,7 +439,7 @@ static BOOL process_attach(void)
/* initialize XVidMode */ /* initialize XVidMode */
X11DRV_XF86VM_Init(); X11DRV_XF86VM_Init();
#endif #endif
#ifdef HAVE_LIBXRANDR #ifdef SONAME_LIBXRANDR
/* initialize XRandR */ /* initialize XRandR */
X11DRV_XRandR_Init(); X11DRV_XRandR_Init();
#endif #endif
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_LIBXRANDR #ifdef SONAME_LIBXRANDR
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h> #include <X11/extensions/Xrandr.h>
...@@ -52,9 +52,6 @@ static void *xrandr_handle; ...@@ -52,9 +52,6 @@ static void *xrandr_handle;
#ifndef SONAME_LIBXRENDER #ifndef SONAME_LIBXRENDER
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT #define SONAME_LIBXRENDER "libXrender" SONAME_EXT
#endif #endif
#ifndef SONAME_LIBXRANDR
#define SONAME_LIBXRANDR "libXrandr" SONAME_EXT
#endif
#define MAKE_FUNCPTR(f) static typeof(f) * p##f; #define MAKE_FUNCPTR(f) static typeof(f) * p##f;
MAKE_FUNCPTR(XRRConfigCurrentConfiguration) MAKE_FUNCPTR(XRRConfigCurrentConfiguration)
...@@ -332,4 +329,4 @@ void X11DRV_XRandR_Cleanup(void) ...@@ -332,4 +329,4 @@ void X11DRV_XRandR_Cleanup(void)
real_xrandr_rates_count = NULL; real_xrandr_rates_count = NULL;
} }
#endif /* HAVE_LIBXRANDR */ #endif /* SONAME_LIBXRANDR */
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
# error You must include config.h to use this header # error You must include config.h to use this header
#endif #endif
#ifdef HAVE_LIBXRANDR #ifdef SONAME_LIBXRANDR
void X11DRV_XRandR_Init(void); void X11DRV_XRandR_Init(void);
void X11DRV_XRandR_Cleanup(void); void X11DRV_XRandR_Cleanup(void);
#endif /* HAVE_LIBXRANDR */ #endif /* SONAME_LIBXRANDR */
#endif /* __WINE_XRANDR_H */ #endif /* __WINE_XRANDR_H */
...@@ -312,9 +312,6 @@ ...@@ -312,9 +312,6 @@
/* Define to 1 if you have the `xpg4' library (-lxpg4). */ /* Define to 1 if you have the `xpg4' library (-lxpg4). */
#undef HAVE_LIBXPG4 #undef HAVE_LIBXPG4
/* Define if you have the Xrandr library */
#undef HAVE_LIBXRANDR
/* Define if you have the X Shape extension */ /* Define if you have the X Shape extension */
#undef HAVE_LIBXSHAPE #undef HAVE_LIBXSHAPE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment