mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.4.475
Problem: Can't compile on a system where Xutf8SetWMProperties() is not in the X11 library. Issue 265. Solution: Add a configure check.
This commit is contained in:
parent
2a9853925b
commit
cbc246a331
53
src/auto/configure
vendored
53
src/auto/configure
vendored
@ -12732,16 +12732,15 @@ $as_echo "$vim_cv_memcpy_handles_overlap" >&6; }
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "x$with_x" = "xyes"; then
|
||||||
if test "$enable_multibyte" = "yes"; then
|
|
||||||
cflags_save=$CFLAGS
|
cflags_save=$CFLAGS
|
||||||
ldflags_save=$LDFLAGS
|
libs_save=$LIBS
|
||||||
if test "x$x_includes" != "xNONE" ; then
|
LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
|
||||||
CFLAGS="$CFLAGS -I$x_includes"
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||||
LDFLAGS="$X_LIBS $LDFLAGS -lX11"
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
|
||||||
$as_echo_n "checking whether X_LOCALE needed... " >&6; }
|
$as_echo_n "checking whether X_LOCALE needed... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <X11/Xlocale.h>
|
#include <X11/Xlocale.h>
|
||||||
int
|
int
|
||||||
@ -12774,7 +12773,7 @@ _ACEOF
|
|||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "yes" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
$as_echo "#define X_LOCALE 1" >>confdefs.h
|
$as_echo "#define X_LOCALE 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
@ -12787,9 +12786,41 @@ else
|
|||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
fi
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
|
||||||
|
$as_echo_n "checking whether Xutf8SetWMProperties() can be used... " >&6; }
|
||||||
|
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 Xutf8SetWMProperties ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return Xutf8SetWMProperties ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
$as_echo "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
|
||||||
|
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
CFLAGS=$cflags_save
|
CFLAGS=$cflags_save
|
||||||
LDFLAGS=$ldflags_save
|
LIBS=$libs_save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
|
||||||
|
@ -446,3 +446,6 @@
|
|||||||
|
|
||||||
/* Define if we have AvailabilityMacros.h on Mac OS X */
|
/* Define if we have AvailabilityMacros.h on Mac OS X */
|
||||||
#undef HAVE_AVAILABILITYMACROS_H
|
#undef HAVE_AVAILABILITYMACROS_H
|
||||||
|
|
||||||
|
/* Define if Xutf8SetWMProperties() is in an X library. */
|
||||||
|
#undef HAVE_XUTF8SETWMPROPERTIES
|
||||||
|
@ -3730,21 +3730,24 @@ fi
|
|||||||
dnl Check for multibyte locale functions
|
dnl Check for multibyte locale functions
|
||||||
dnl Find out if _Xsetlocale() is supported by libX11.
|
dnl Find out if _Xsetlocale() is supported by libX11.
|
||||||
dnl Check if X_LOCALE should be defined.
|
dnl Check if X_LOCALE should be defined.
|
||||||
|
if test "x$with_x" = "xyes"; then
|
||||||
if test "$enable_multibyte" = "yes"; then
|
|
||||||
cflags_save=$CFLAGS
|
cflags_save=$CFLAGS
|
||||||
ldflags_save=$LDFLAGS
|
libs_save=$LIBS
|
||||||
if test "x$x_includes" != "xNONE" ; then
|
LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
|
||||||
CFLAGS="$CFLAGS -I$x_includes"
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||||
LDFLAGS="$X_LIBS $LDFLAGS -lX11"
|
|
||||||
AC_MSG_CHECKING(whether X_LOCALE needed)
|
AC_MSG_CHECKING(whether X_LOCALE needed)
|
||||||
AC_TRY_COMPILE([#include <X11/Xlocale.h>],,
|
AC_TRY_COMPILE([#include <X11/Xlocale.h>],,
|
||||||
AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes)
|
AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)),
|
AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)),
|
||||||
AC_MSG_RESULT(no))
|
AC_MSG_RESULT(no))
|
||||||
fi
|
|
||||||
|
AC_MSG_CHECKING(whether Xutf8SetWMProperties() can be used)
|
||||||
|
AC_TRY_LINK_FUNC([Xutf8SetWMProperties], [AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no))
|
||||||
|
|
||||||
CFLAGS=$cflags_save
|
CFLAGS=$cflags_save
|
||||||
LDFLAGS=$ldflags_save
|
LIBS=$libs_save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Link with xpg4, it is said to make Korean locale working
|
dnl Link with xpg4, it is said to make Korean locale working
|
||||||
|
@ -1960,9 +1960,12 @@ get_x11_thing(get_title, test_only)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Are Xutf8 functions available? Avoid error from old compilers. */
|
/* Xutf8 functions are not avaialble on older systems. Note that on some
|
||||||
|
* systems X_HAVE_UTF8_STRING may be defined in a header file but
|
||||||
|
* Xutf8SetWMProperties() is not in the X11 library. Configure checks for
|
||||||
|
* that and defines HAVE_XUTF8SETWMPROPERTIES. */
|
||||||
#if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
|
#if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
|
||||||
# if X_HAVE_UTF8_STRING
|
# if X_HAVE_UTF8_STRING && HAVE_XUTF8SETWMPROPERTIES
|
||||||
# define USE_UTF8_STRING
|
# define USE_UTF8_STRING
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
475,
|
||||||
/**/
|
/**/
|
||||||
474,
|
474,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user