>>>> "Jan" == Jan Vroonhof
<vroonhof(a)math.ethz.ch> writes:
Jan> "Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
> However, configure picks up the esd-config and assumes that I
can
> build esd-enabled stuff.
Jan> That is a valid assumption IMO. That is why esd-config exists. Do you
Jan> think your setup is very common?
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.
> Since I don't have the development package installed (or
something),
> configure panics with "CC can no longer build executables" because ld
> can't find -lesd.
Jan> Fix your setup. Or even better file a bug with your
Jan> distribution/vendor/sys-admin. Unfortunately configure failures are
Jan> always very indirect :-(
I disagree. The esd-config utility is shipped with the runtime
package, not the development package, which need not be installed.
Treat the esd-config output as a hint to the configure script. As in,
``if you want to link with esd, use these flags, but no guarantees!''
My proposal for changing the sound configure user interface has been
VETOed. So we should implement Stephen Turnbull's interface
suggestion, hairy though it may be. I would prefer if Robert or Jan
would take ownership of the sound configure support, but I will do it
if necessary.
Index: configure.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/configure.in,v
retrieving revision 1.111.2.53
diff -u -r1.111.2.53 configure.in
--- configure.in 1999/12/08 07:43:35 1.111.2.53
+++ configure.in 1999/12/09 03:27:33
@@ -3479,26 +3479,30 @@
AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
fi
-AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
-if test -z "$with_esd"; then
- with_esd=$have_esd_config
-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)
+dnl ESD Sound support
+if test "$with_esd" != "no"; then
+ AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
+ if test "$have_esd_config" = "yes"; then
+ esd_config_libs=`esd-config --libs`
+ save_libs_x="$libs_x"
+ XE_PREPEND(`esd-config --libs`, libs_x)
+ AC_CHECK_FUNC(esd_play_stream,
+ have_esd=yes,
+ have_esd=no libs_x="$save_libs_x")
+ fi
+ if test "$have_esd" = "yes"; then
+ with_esd=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" = "yes" && \
+ XE_DIE("Required ESD module support cannot be provided.")
+ with_esd=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