comparison configure @ 32177:128c05cb7d80

Simplify esd checks using function_check().
author diego
date Thu, 16 Sep 2010 11:22:30 +0000
parents f002b9d0f4d1
children f65b5ba494a2
comparison
equal deleted inserted replaced
32176:597a376752a7 32177:128c05cb7d80
5561 5561
5562 echocheck "EsounD" 5562 echocheck "EsounD"
5563 if test "$_esd" = auto ; then 5563 if test "$_esd" = auto ; then
5564 _esd=no 5564 _esd=no
5565 if ( esd-config --version ) >> "$TMPLOG" 2>&1 ; then 5565 if ( esd-config --version ) >> "$TMPLOG" 2>&1 ; then
5566 5566 function_check esd.h 'esd_open_sound("test")' $(esd-config --libs) $(esd-config --cflags) && _esd=yes
5567 cat > $TMPC << EOF
5568 #include <esd.h>
5569 int main(void) { int fd = esd_open_sound("test"); return fd; }
5570 EOF
5571 cc_check $(esd-config --libs) $(esd-config --cflags) && _esd=yes
5572
5573 fi 5567 fi
5574 fi 5568 fi
5575 echores "$_esd" 5569 echores "$_esd"
5576 5570
5577 if test "$_esd" = yes ; then 5571 if test "$_esd" = yes ; then
5579 aomodules="esd $aomodules" 5573 aomodules="esd $aomodules"
5580 libs_mplayer="$libs_mplayer $(esd-config --libs)" 5574 libs_mplayer="$libs_mplayer $(esd-config --libs)"
5581 extra_cflags="$extra_cflags $(esd-config --cflags)" 5575 extra_cflags="$extra_cflags $(esd-config --cflags)"
5582 5576
5583 echocheck "esd_get_latency()" 5577 echocheck "esd_get_latency()"
5584 cat > $TMPC << EOF 5578 function_check esd.h 'esd_get_latency(0)' $(esd-config --libs) $(esd-config --cflags) &&
5585 #include <esd.h> 5579 _esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY 1'
5586 int main(void) { return esd_get_latency(0); }
5587 EOF
5588 cc_check $(esd-config --libs) $(esd-config --cflags) && _esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY 1'
5589 echores "$_esd_latency" 5580 echores "$_esd_latency"
5590 else 5581 else
5591 def_esd='#undef CONFIG_ESD' 5582 def_esd='#undef CONFIG_ESD'
5592 def_esd_latency='#undef CONFIG_ESD_LATENCY' 5583 def_esd_latency='#undef CONFIG_ESD_LATENCY'
5593 noaomodules="esd $noaomodules" 5584 noaomodules="esd $noaomodules"