configure: Make the libXi soname check depend on the header check.
This commit is contained in:
parent
19a988a25c
commit
d68d4335af
|
@ -9181,6 +9181,88 @@ cat >>confdefs.h <<_ACEOF
|
|||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_X11_extensions_XInput_h" = "yes"
|
||||
then
|
||||
{ echo "$as_me:$LINENO: checking for -lXi" >&5
|
||||
echo $ECHO_N "checking for -lXi... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_soname_Xi+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lXi $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 XOpenDevice ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XOpenDevice ();
|
||||
;
|
||||
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_Xi=`otool -L conftest$ac_exeext | grep "libXi\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXi\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_Xi=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXi\\.$LIBEXT" | sed -e "s/^.*\(libXi\.$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_Xi" = "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_Xi" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_soname_Xi" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBXI "$ac_cv_lib_soname_Xi"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@ -15337,84 +15419,6 @@ cat >>confdefs.h <<_ACEOF
|
|||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for -lXi" >&5
|
||||
echo $ECHO_N "checking for -lXi... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_soname_Xi+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lXi $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 XOpenDevice ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XOpenDevice ();
|
||||
;
|
||||
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_Xi=`otool -L conftest$ac_exeext | grep "libXi\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXi\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_Xi=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXi\\.$LIBEXT" | sed -e "s/^.*\(libXi\.$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_Xi" = "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_Xi" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_soname_Xi" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBXI "$ac_cv_lib_soname_Xi"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for -lfreetype" >&5
|
||||
|
|
|
@ -514,6 +514,12 @@ then
|
|||
WINE_CHECK_SONAME(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
fi
|
||||
|
||||
dnl *** Check for X input extension
|
||||
if test "$ac_cv_header_X11_extensions_XInput_h" = "yes"
|
||||
then
|
||||
WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
fi
|
||||
|
||||
dnl *** Check for X Shm extension
|
||||
if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
|
||||
then
|
||||
|
@ -1153,7 +1159,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(Xext,XextCreateExtension,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS])
|
||||
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ typedef struct tagWTPACKET {
|
|||
} WTPACKET, *LPWTPACKET;
|
||||
|
||||
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT_H
|
||||
#ifdef SONAME_LIBXI
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XInput.h>
|
||||
|
@ -239,10 +239,6 @@ static WTI_CURSORS_INFO gSysCursor[CURSORMAX];
|
|||
static INT gNumCursors;
|
||||
|
||||
|
||||
#ifndef SONAME_LIBXI
|
||||
#define SONAME_LIBXI "libXi" SONAME_EXT
|
||||
#endif
|
||||
|
||||
/* XInput stuff */
|
||||
static void *xinput_handle;
|
||||
|
||||
|
@ -1168,7 +1164,7 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
|
|||
return rc;
|
||||
}
|
||||
|
||||
#else /* HAVE_X11_EXTENSIONS_XINPUT_H */
|
||||
#else /* SONAME_LIBXI */
|
||||
|
||||
/***********************************************************************
|
||||
* AttachEventQueueToTablet (X11DRV.@)
|
||||
|
@ -1201,4 +1197,4 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* HAVE_X11_EXTENSIONS_XINPUT_H */
|
||||
#endif /* SONAME_LIBXI */
|
||||
|
|
Loading…
Reference in New Issue