[Mplayer-dev-eng] Sun audio trouble broke CVS build

Bertrand BAUDET bertrand_baudet at yahoo.com
Wed Jun 6 14:46:54 CEST 2001


Hi,

> > I just update from CVS and I was unable to build mplayer.
> >
> > First the configure script report that I have Sun audio on my Linux box!
> > Checking for Sun Audio ... yes
> > I didn't know that I can use Sun audio on my Linux box :op
> > This make my mplayer build to fail...
> > Anyway, I changed by hand in the config.h file the define USE_SUN_AUDIO
> > by an undef. That make the build go further but failed to find the file
> > ao_sun.c! I just removed the build of this file and everything went well.
> >
> > Can someone have a look at it?
>
> Can you find why is it detected as 'yes' ?
>
> You can workaround with --disable-sun (or sun-audio?) (check ./configure
> --help)

The -disable-sun doesn't work for me.
I don't think the script is good:

==============================================
# ---
# try to detect type of audio supported on this machine
 
_oss_audio=no
[ -c /dev/dsp ] && _oss_audio=yes
 
_sun_audio=no
[ -c /dev/audio -a -c /dev/audioctl ] && _sun_audio=yes
===============================================

The script just check in /dev for filename! In my case,
I have both /dev/audio & /dev/audioctl which can
be the same on most of Un*x bases system. 

I don't think an autodection based on filename is a good thing,
we must use the same way as for detecting ALSA drivers or ESD
-ie- by doing a small c file that test for specific include file or
variable name or for a lib at compilation time.
Or we can just try to detect if it's sun:

void main() { 
#ifdef sun
	return 1;
#else
	return 0;
#endif
}

I don't know Solaris to suggest the right define so Solaris people
is your turn to speek.

And I think this will be the same trouble with OSS audio, just
checking for /dev/dsp is not enough!

Remember that files can be present in the /dev without any interface
behind....


> > Note to Makefile maintainers:
> > An easy way to transform a list of c sources files in a list of objects
> > files is to use the following rule: (in case of you don't know)
> > SRCS = file1.c file2.c file3.c ....
> > OBJS = $(SRCS:.c=.o)
>
> Already done. But do you have idea to transform a list or .c _and_ .S files
> to .o ? I couldn't solve this.

I have seen that you did it in the main makefile, but with the sun stuff
I have seen it at someother places like in libao2/config.mak

Hummm, I have no idea on hox to transform the list of .c AND .S files.
I can suggest:
SRCCS=file.c
SRCSS=file.S
OBJS=$(SRCCS:.c=.o) $(SRCSS:.S=.o)

Bertrand

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list