mirror of https://github.com/vim/vim.git
patch 8.1.1529: libcanberra is linked with even when not used
Problem: Libcanberra is linked with even when not used. Solution: Have configure check for libcanberra only when wanted. (suggestions by Libor Bukata)
This commit is contained in:
parent
b4086ffa32
commit
21606676d9
|
@ -528,6 +528,11 @@ CClink = $(CC)
|
|||
# though you have /dev/sysmouse and includes.
|
||||
#CONF_OPT_SYSMOUSE = --disable-sysmouse
|
||||
|
||||
# libcanberra - For sound support. Default is on for big features.
|
||||
# Uncomment one of the two to chose otherwise.
|
||||
# CONF_OPT_CANBERRA = --enable-canberra
|
||||
# CONF_OPT_CANBERRA = --disable-canberra
|
||||
|
||||
# FEATURES - For creating Vim with more or less features
|
||||
# Uncomment one of these lines when you want to include few to many features.
|
||||
# The default is "huge" for most systems.
|
||||
|
@ -1952,7 +1957,7 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
|
|||
$(CONF_ARGS4) $(CONF_ARGS5) $(CONF_ARGS6) \
|
||||
$(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
|
||||
$(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
|
||||
$(CONF_OPT_SYSMOUSE); \
|
||||
$(CONF_OPT_SYSMOUSE) $(CONF_OPT_CANBERRA); \
|
||||
fi
|
||||
|
||||
# Use "make reconfig" to rerun configure without cached values.
|
||||
|
|
|
@ -840,6 +840,7 @@ enable_desktop_database_update
|
|||
with_motif_lib
|
||||
with_tlib
|
||||
enable_largefile
|
||||
enable_canberra
|
||||
enable_acl
|
||||
enable_gpm
|
||||
enable_sysmouse
|
||||
|
@ -1515,6 +1516,7 @@ Optional Features:
|
|||
--disable-icon-cache-update update disabled
|
||||
--disable-desktop-database-update update disabled
|
||||
--disable-largefile omit support for large files
|
||||
--disable-canberra Do not use libcanberra.
|
||||
--disable-acl No check for ACL support.
|
||||
--disable-gpm Don't use gpm (Linux mouse daemon).
|
||||
--disable-sysmouse Don't use sysmouse (mouse in *BSD console).
|
||||
|
@ -12925,40 +12927,56 @@ rm -rf conftest*
|
|||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
|
||||
$as_echo_n "checking --enable-canberra argument... " >&6; }
|
||||
# Check whether --enable-canberra was given.
|
||||
if test "${enable_canberra+set}" = set; then :
|
||||
enableval=$enable_canberra;
|
||||
else
|
||||
enable_canberra="maybe"
|
||||
fi
|
||||
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
canberra_lib=`$PKG_CONFIG --libs libcanberrax 2>/dev/null`
|
||||
canberra_cflags=`$PKG_CONFIG --cflags libcanberrax 2>/dev/null`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: canberra_lib: $canberra_lib" >&5
|
||||
$as_echo "canberra_lib: $canberra_lib" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: canberra_cflags: $canberra_cflags" >&5
|
||||
$as_echo "canberra_cflags: $canberra_cflags" >&6; }
|
||||
|
||||
if test "$enable_canberra" = "maybe"; then
|
||||
if test "$features" = "big" -o "$features" = "huge"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
|
||||
$as_echo "Defaulting to yes" >&6; }
|
||||
enable_canberra="yes"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
|
||||
$as_echo "Defaulting to no" >&6; }
|
||||
enable_canberra="no"
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
|
||||
$as_echo "$enable_canberra" >&6; }
|
||||
fi
|
||||
if test "x$canberra_lib" = "x"; then
|
||||
canberra_lib=-lcanberra
|
||||
canberra_cflags=-D_REENTRANT
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: canberra_lib: $canberra_lib" >&5
|
||||
$as_echo "canberra_lib: $canberra_lib" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: canberra_cflags: $canberra_cflags" >&5
|
||||
$as_echo "canberra_cflags: $canberra_cflags" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
|
||||
if test "$enable_canberra" = "yes"; then
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
|
||||
canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
|
||||
fi
|
||||
if test "x$canberra_lib" = "x"; then
|
||||
canberra_lib=-lcanberra
|
||||
canberra_cflags=-D_REENTRANT
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
|
||||
$as_echo_n "checking for libcanberra... " >&6; }
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $canberra_cflags"
|
||||
LIBS="$LIBS $canberra_lib"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $canberra_cflags"
|
||||
LIBS="$LIBS $canberra_lib"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
# include <canberra.h>
|
||||
# include <canberra.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
ca_context *hello;
|
||||
ca_context_create(&hello);
|
||||
ca_context *hello;
|
||||
ca_context_create(&hello);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
@ -12973,6 +12991,7 @@ $as_echo "no" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
|
|||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
|
||||
|
|
|
@ -3751,27 +3751,44 @@ dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
|
|||
dnl appropriate, so that off_t is 64 bits when needed.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_MSG_CHECKING(--enable-canberra argument)
|
||||
AC_ARG_ENABLE(canberra,
|
||||
[ --disable-canberra Do not use libcanberra.],
|
||||
, [enable_canberra="maybe"])
|
||||
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
|
||||
canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
|
||||
if test "$enable_canberra" = "maybe"; then
|
||||
if test "$features" = "big" -o "$features" = "huge"; then
|
||||
AC_MSG_RESULT(Defaulting to yes)
|
||||
enable_canberra="yes"
|
||||
else
|
||||
AC_MSG_RESULT(Defaulting to no)
|
||||
enable_canberra="no"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT($enable_canberra)
|
||||
fi
|
||||
if test "x$canberra_lib" = "x"; then
|
||||
canberra_lib=-lcanberra
|
||||
canberra_cflags=-D_REENTRANT
|
||||
if test "$enable_canberra" = "yes"; then
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
|
||||
canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
|
||||
fi
|
||||
if test "x$canberra_lib" = "x"; then
|
||||
canberra_lib=-lcanberra
|
||||
canberra_cflags=-D_REENTRANT
|
||||
fi
|
||||
AC_MSG_CHECKING(for libcanberra)
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $canberra_cflags"
|
||||
LIBS="$LIBS $canberra_lib"
|
||||
AC_TRY_LINK([
|
||||
# include <canberra.h>
|
||||
], [
|
||||
ca_context *hello;
|
||||
ca_context_create(&hello);],
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA),
|
||||
AC_MSG_RESULT(no); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
|
||||
fi
|
||||
AC_MSG_CHECKING(for libcanberra)
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $canberra_cflags"
|
||||
LIBS="$LIBS $canberra_lib"
|
||||
AC_TRY_LINK([
|
||||
# include <canberra.h>
|
||||
], [
|
||||
ca_context *hello;
|
||||
ca_context_create(&hello);],
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA),
|
||||
AC_MSG_RESULT(no); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
|
||||
|
||||
|
||||
dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
|
||||
|
|
|
@ -663,7 +663,7 @@
|
|||
/*
|
||||
* sound - currently only with libcanberra
|
||||
*/
|
||||
#if !defined(FEAT_SOUND) && defined(FEAT_BIG) && defined(HAVE_CANBERRA)
|
||||
#if !defined(FEAT_SOUND) && defined(HAVE_CANBERRA)
|
||||
# define FEAT_SOUND
|
||||
#endif
|
||||
|
||||
|
|
|
@ -777,6 +777,8 @@ static char *(features[]) =
|
|||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1529,
|
||||
/**/
|
||||
1528,
|
||||
/**/
|
||||
|
|
Loading…
Reference in New Issue