configure: Merge the libXinerama existence check with the soname check.
This commit is contained in:
parent
629639ee60
commit
35d2fd7a25
|
@ -9633,10 +9633,83 @@ 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 -lXinerama" >&5
|
||||||
cat >>confdefs.h <<\_ACEOF
|
echo $ECHO_N "checking for -lXinerama... $ECHO_C" >&6; }
|
||||||
#define HAVE_LIBXINERAMA 1
|
if test "${ac_cv_lib_soname_Xinerama+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_check_soname_save_LIBS=$LIBS
|
||||||
|
LIBS="-lXinerama $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_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 XineramaQueryScreens ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return XineramaQueryScreens ();
|
||||||
|
;
|
||||||
|
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_Xinerama=`otool -L conftest$ac_exeext | grep "libXinerama\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXinerama\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||||
|
*) ac_cv_lib_soname_Xinerama=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXinerama\\.$LIBEXT" | sed -e "s/^.*\(libXinerama\.$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_Xinerama" = "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_Xinerama" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_lib_soname_Xinerama" >&6; }
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define SONAME_LIBXINERAMA "$ac_cv_lib_soname_Xinerama"
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
|
@ -15260,84 +15333,6 @@ cat >>confdefs.h <<_ACEOF
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for -lXinerama" >&5
|
|
||||||
echo $ECHO_N "checking for -lXinerama... $ECHO_C" >&6; }
|
|
||||||
if test "${ac_cv_lib_soname_Xinerama+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
ac_check_soname_save_LIBS=$LIBS
|
|
||||||
LIBS="-lXinerama $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 XineramaQueryScreens ();
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
return XineramaQueryScreens ();
|
|
||||||
;
|
|
||||||
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_Xinerama=`otool -L conftest$ac_exeext | grep "libXinerama\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXinerama\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
|
||||||
*) ac_cv_lib_soname_Xinerama=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXinerama\\.$LIBEXT" | sed -e "s/^.*\(libXinerama\.$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_Xinerama" = "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_Xinerama" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_lib_soname_Xinerama" >&6; }
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define SONAME_LIBXINERAMA "$ac_cv_lib_soname_Xinerama"
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for -lXcursor" >&5
|
{ echo "$as_me:$LINENO: checking for -lXcursor" >&5
|
||||||
|
|
|
@ -558,7 +558,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/Xinerama.h>]], [[static typeof(XineramaQueryScreens) * func;]])],
|
#include <X11/extensions/Xinerama.h>]], [[static typeof(XineramaQueryScreens) * func;]])],
|
||||||
[AC_DEFINE(HAVE_LIBXINERAMA, 1, [Define if you have the Xinerama library])],[])
|
[WINE_CHECK_SONAME(Xinerama,XineramaQueryScreens,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl *** End of X11/Xlib.h check
|
dnl *** End of X11/Xlib.h check
|
||||||
|
@ -1148,7 +1148,6 @@ AC_DEFINE_UNQUOTED(SONAME_EXT,[".$LIBEXT"],[Define to the file extension of shar
|
||||||
WINE_CHECK_SONAME(X11,XCreateWindow,,,[$X_LIBS $X_EXTRA_LIBS])
|
WINE_CHECK_SONAME(X11,XCreateWindow,,,[$X_LIBS $X_EXTRA_LIBS])
|
||||||
WINE_CHECK_SONAME(Xext,XextCreateExtension,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
|
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(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)
|
||||||
|
|
|
@ -66,17 +66,13 @@ static inline int monitor_to_index( HMONITOR handle )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBXINERAMA
|
#ifdef SONAME_LIBXINERAMA
|
||||||
|
|
||||||
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
|
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
|
||||||
|
|
||||||
MAKE_FUNCPTR(XineramaQueryExtension);
|
MAKE_FUNCPTR(XineramaQueryExtension);
|
||||||
MAKE_FUNCPTR(XineramaQueryScreens);
|
MAKE_FUNCPTR(XineramaQueryScreens);
|
||||||
|
|
||||||
#ifndef SONAME_LIBXINERAMA
|
|
||||||
#define SONAME_LIBXINERAMA "libXinerama" SONAME_EXT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void load_xinerama(void)
|
static void load_xinerama(void)
|
||||||
{
|
{
|
||||||
void *handle;
|
void *handle;
|
||||||
|
@ -129,14 +125,14 @@ static int query_screens(void)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_LIBXINERAMA */
|
#else /* SONAME_LIBXINERAMA */
|
||||||
|
|
||||||
static inline int query_screens(void)
|
static inline int query_screens(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_LIBXINERAMA */
|
#endif /* SONAME_LIBXINERAMA */
|
||||||
|
|
||||||
void xinerama_init(void)
|
void xinerama_init(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -300,9 +300,6 @@
|
||||||
/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
|
/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
|
||||||
#undef HAVE_LIBOSSAUDIO
|
#undef HAVE_LIBOSSAUDIO
|
||||||
|
|
||||||
/* Define if you have the Xinerama library */
|
|
||||||
#undef HAVE_LIBXINERAMA
|
|
||||||
|
|
||||||
/* Define if you have the libxml2 library */
|
/* Define if you have the libxml2 library */
|
||||||
#undef HAVE_LIBXML2
|
#undef HAVE_LIBXML2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue