[CF-Devel] Patch to remove sound with configure

Mark Wedel mwedel at scruz.net
Sun Mar 4 18:08:42 CST 2001


Andreas Vogl wrote:
>
     
     
     >
     
      Benjamin `Quisar' Lerman wrote:
     
     >
     
     
     >
     
      > Hi,
     
     >
     
      >
     
     >
     
      > I have a patch to add an option to configure to disable the sound in the
     
     >
     
      > Unix client.
     
     >
     
      >
     
     >
     
      > You can find it there :
     
     >
     
      >
     
     >
     
      > 
      
      http://www.ambre.net/crossfire/sound.patch
      
      
     >
     
     
     >
     
      I've tested this patch on my (SuSE) system and it works fine. Like I hoped,
     
     >
     
      the new compile flag (--disable-sound) kinda "solved" my sound-lib problems.
     
     >
     
      =)
     
     >
     
     
     >
     
      If nobody has concerns about it, I'd like to check the patch into
     
     >
     
      CVS quite soon. I think this patch is very good because it provides an
     
     >
     
      "emergency" option for people with unusual sound systems.
     
     
 A few notes.

 First, the issue isn't with unusual sound systems - if you run on some strange
OS which sound has not been ported for, thing will work fine.  The problem is
that the client/configure script thinks it knows how to deal with the also sound
system, when in fact the alsa sound system has changed the API, and so it
breaks.

 That is really the only case where the --disable-sound option would be needed. 
So such an option is really for systems where we think we know how to support
the sound system, but in fact don't (because of broken code or the sound system
has changed, etc).

 I looked over the patch, and my initial impression is that there are a lot more
#ifdefs than we really need.  All that is really needed is to not compile the
cfsndserv program, and perhaps turn off sounds by default.

 Also, the code as is will break on some system - the patch to gx11.c (while I'm
not sure why it is there), is not valid ANSI C code.   // is not a valid comment
character.  Gcc will take it, but gcc will take lots of improper C constructs. 
That code will fail on any ANSI compliant C compiler.

 I don't have a problem with a configure option to disable the sound - I just
think the current one does the right thing.  I think the more proper fix is to
just not try and compile the cfsndserv if that option is given, and really no
other changes would need to be made to any of the code.

    
    


More information about the crossfire mailing list