diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-14 20:40:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-14 20:40:58 +0200 |
commit | 21606676d9ebc6f159c56ee90733e5d5720ab3d7 (patch) | |
tree | 9835823990627cdee4d4966eac28f359ff1f217a /src/auto/configure | |
parent | b4086ffa32d97831f2d25a37f8c1340223dee5eb (diff) |
patch 8.1.1529: libcanberra is linked with even when not usedv8.1.1529
Problem: Libcanberra is linked with even when not used.
Solution: Have configure check for libcanberra only when wanted.
(suggestions by Libor Bukata)
Diffstat (limited to 'src/auto/configure')
-rwxr-xr-x | src/auto/configure | 67 |
1 files changed, 43 insertions, 24 deletions
diff --git a/src/auto/configure b/src/auto/configure index d5b4f6053e..c326abf16c 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -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 - -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; } +{ $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$canberra_lib" = "x"; then - canberra_lib=-lcanberra - canberra_cflags=-D_REENTRANT + + +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 - { $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 |