autotools: revised and silenced esound detection a bit.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
diff --git a/acinclude/esd.m4 b/acinclude/esd.m4
index 2e50ddb..bd4b848 100644
--- a/acinclude/esd.m4
+++ b/acinclude/esd.m4
@@ -104,10 +104,11 @@ int main (void)
else
AC_MSG_RESULT(no)
if test "$ESD_CONFIG" = "no" ; then
- echo "*** The esd-config script installed by ESD could not be found"
- echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the ESD_CONFIG environment variable to the"
- echo "*** full path to esd-config."
+dnl echo "*** The esd-config script installed by ESD could not be found"
+dnl echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
+dnl echo "*** your path, or set the ESD_CONFIG environment variable to the"
+dnl echo "*** full path to esd-config."
+ :
else
if test -f conf.esdtest ; then
:
diff --git a/configure b/configure
index 62c39ee..f626d12 100755
--- a/configure
+++ b/configure
@@ -712,9 +712,9 @@ PULSEAUDIO_LIBS
PULSEAUDIO_CFLAGS
PIPEWIRE_LIBS
PIPEWIRE_CFLAGS
+ESD_CONFIG
ESD_LIBS
ESD_CFLAGS
-ESD_CONFIG
JACK_LIBS
JACK_CFLAGS
ALSA_LIBS
@@ -970,6 +970,8 @@ PKG_CONFIG_LIBDIR
CPP
JACK_CFLAGS
JACK_LIBS
+ESD_CFLAGS
+ESD_LIBS
PIPEWIRE_CFLAGS
PIPEWIRE_LIBS
PULSEAUDIO_CFLAGS
@@ -1809,6 +1811,8 @@ Some influential environment variables:
CPP C preprocessor
JACK_CFLAGS C compiler flags for JACK, overriding pkg-config
JACK_LIBS linker flags for JACK, overriding pkg-config
+ ESD_CFLAGS C compiler flags for ESD, overriding pkg-config
+ ESD_LIBS linker flags for ESD, overriding pkg-config
PIPEWIRE_CFLAGS
C compiler flags for PIPEWIRE, overriding pkg-config
PIPEWIRE_LIBS
@@ -21456,6 +21460,78 @@ fi
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for esound >= 0.2.8" >&5
+printf %s "checking for esound >= 0.2.8... " >&6; }
+
+if test -n "$ESD_CFLAGS"; then
+ pkg_cv_ESD_CFLAGS="$ESD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"esound >= 0.2.8\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "esound >= 0.2.8") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ESD_CFLAGS=`$PKG_CONFIG --cflags "esound >= 0.2.8" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$ESD_LIBS"; then
+ pkg_cv_ESD_LIBS="$ESD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"esound >= 0.2.8\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "esound >= 0.2.8") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ESD_LIBS=`$PKG_CONFIG --libs "esound >= 0.2.8" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ESD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "esound >= 0.2.8" 2>&1`
+ else
+ ESD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "esound >= 0.2.8" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ESD_PKG_ERRORS" >&5
+
+ have_esd=no
+elif test $pkg_failed = untried; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ have_esd=no
+else
+ ESD_CFLAGS=$pkg_cv_ESD_CFLAGS
+ ESD_LIBS=$pkg_cv_ESD_LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ have_esd=yes
+fi
+ if test x$have_esd = xno; then
+
# Check whether --with-esd-prefix was given.
if test ${with_esd_prefix+y}
then :
@@ -21639,10 +21715,7 @@ printf "%s\n" "yes" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if test "$ESD_CONFIG" = "no" ; then
- echo "*** The esd-config script installed by ESD could not be found"
- echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the ESD_CONFIG environment variable to the"
- echo "*** full path to esd-config."
+ :
else
if test -f conf.esdtest ; then
:
@@ -21707,6 +21780,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
rm -f conf.esdtest
+ fi
if test x$have_esd = xyes; then
# Check whether --enable-esd-shared was given.
if test ${enable_esd_shared+y}
diff --git a/configure.ac b/configure.ac
index 5365189..4a4023e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1057,7 +1057,10 @@ CheckESD()
[AS_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [default=yes]])],
, enable_esd=yes)
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
- AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+ PKG_CHECK_MODULES([ESD], [esound >= 0.2.8], have_esd=yes, have_esd=no)
+ if test x$have_esd = xno; then
+ AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+ fi
if test x$have_esd = xyes; then
AC_ARG_ENABLE(esd-shared,
[AS_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]])],