>>>> "Jan" == Jan Vroonhof
<vroonhof(a)math.ethz.ch> writes:
Jan> Martin Buchholz <martin(a)xemacs.org> writes:
> No, we should not trust the output of `esd-config --libs`. We
should
> be paranoid and test it, as my pseudocode non-working esd config patch
> tries to do.
Jan> Maybe we should, but I really don't like where this going. What is
Jan> next, we check for every single header file we include?
Jan> Potato is not released yet. Let's try not working around other peoples
Jan> bugs when they still can be fixed.
Sorry. You're too late.
1999-12-09 Martin Buchholz <martin(a)xemacs.org>
* configure.in: Clean up sound support.
- variable `old_nas' was used but never set.
- change `with_esd' to `with_esd_sound' for consistency.
- Don't trust the output of `esd-config --libs`; test it.
- Add `esd-config --cflags` to c_switch_site.
- Die if ESD sound requested, but not available.
- ESD is not dependent on X, therefore use LIBS, not libs_x.
--- configure.in 1999/12/08 07:43:35 1.111.2.53
+++ configure.in 1999/12/09 11:46:37
@@ -617,8 +617,8 @@
nas ) with_nas_sound=yes ;;
nonas ) with_nas_sound=no ;;
- esd ) with_esd=yes ;;
- noesd ) with_esd=no ;;
+ esd ) with_esd_sound=yes ;;
+ noesd ) with_esd_sound=no ;;
* ) bogus_sound=yes ;;
esac
@@ -631,7 +631,7 @@
elif test -n "$new_sdefault" ; then
with_native_sound=$new_sdefault
with_nas_sound=$new_sdefault
- with_esd=$new_sdefault
+ with_esd_sound=$new_sdefault
new_sdefault= # reset this
fi
sound_notfirst=true
@@ -3476,29 +3476,34 @@
XE_PREPEND(-laudio, libs_x)
dnl If the nas library does not contain the error jump point,
dnl then we force safer behavior.
- AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
+ AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[old_nas=yes;
AC_DEFINE(NAS_NO_ERROR_JUMP)])
fi
+dnl ESD Sound support
+if test "$with_esd_sound" != "no"; then
AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
-if test -z "$with_esd"; then
- with_esd=$have_esd_config
+ if test "$have_esd_config" = "yes"; then
+ save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
+ XE_APPEND(`esd-config --cflags`, c_switch_site)
+ XE_PREPEND(`esd-config --libs`, LIBS)
+ AC_CHECK_FUNC(esd_play_stream,
+ have_esd_sound=yes,
+ c_switch_site="$save_c_switch_site" LIBS="$save_LIBS")
fi
-if test "$with_esd" = "yes"; then
- if test "$have_esd_config" = "no"; then
- echo "*** esd-config was not found in your PATH. Disabling esd support."
- with_esd=no
- else
- AC_DEFINE(HAVE_ESD_SOUND)
+ if test "$have_esd_sound" = "yes"; then
+ with_esd_sound=yes
need_miscplay=yes
XE_ADD_OBJS(esd.o)
- XE_PREPEND(`esd-config --libs`, libs_x)
+ AC_DEFINE(HAVE_ESD_SOUND)
+ else
+ test "$with_esd_sound" = "yes" && \
+ XE_DIE("Required ESD sound support cannot be provided.")
+ with_esd_sound=no
fi
fi
-if test "$need_miscplay" = "yes"; then
- XE_ADD_OBJS(miscplay.o)
-fi
+test "$need_miscplay" = "yes" && XE_ADD_OBJS(miscplay.o)
dnl ---------------------
dnl TTY-dependent options
@@ -4175,10 +4180,11 @@
test "$with_jpeg" = yes && echo " Compiling in support for JPEG
image handling."
test "$with_tiff" = yes && echo " Compiling in support for TIFF
image handling."
test "$with_xface" = yes && echo " Compiling in support for
X-Face message headers."
+
test "$with_native_sound" = yes && echo " Compiling in native
sound support."
test "$with_nas_sound" = yes && echo " Compiling in network sound
(NAS) support."
test "$old_nas" = yes && echo " nas library lacks error
trapping, will play synchronously."
-test "$with_esd" = yes && echo " Compiling in support for
Enlightened Sound Daemon."
+test "$with_esd_sound" = yes && echo " Compiling in support
for Enlightened Sound Daemon (ESD)."
test "$with_database_berkdb" = yes && echo " Compiling in support
for Berkeley DB."
test "$with_database_dbm" = yes && echo " Compiling in support
for DBM."