changeset 32177:128c05cb7d80

Simplify esd checks using function_check().
author diego
date Thu, 16 Sep 2010 11:22:30 +0000
parents 597a376752a7
children f65b5ba494a2
files configure
diffstat 1 files changed, 3 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Thu Sep 16 11:05:42 2010 +0000
+++ b/configure	Thu Sep 16 11:22:30 2010 +0000
@@ -5563,13 +5563,7 @@
 if test "$_esd" = auto ; then
   _esd=no
   if ( esd-config --version ) >> "$TMPLOG" 2>&1 ; then
-
-cat > $TMPC << EOF
-#include <esd.h>
-int main(void) { int fd = esd_open_sound("test"); return fd; }
-EOF
-cc_check $(esd-config --libs) $(esd-config --cflags) && _esd=yes
-
+    function_check esd.h 'esd_open_sound("test")' $(esd-config --libs) $(esd-config --cflags) && _esd=yes
   fi
 fi
 echores "$_esd"
@@ -5581,11 +5575,8 @@
   extra_cflags="$extra_cflags $(esd-config --cflags)"
 
   echocheck "esd_get_latency()"
-  cat > $TMPC << EOF
-#include <esd.h>
-int main(void) { return esd_get_latency(0); }
-EOF
-  cc_check $(esd-config --libs) $(esd-config --cflags) && _esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY 1'
+  function_check esd.h 'esd_get_latency(0)' $(esd-config --libs) $(esd-config --cflags) &&
+    _esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY 1'
   echores "$_esd_latency"
 else
   def_esd='#undef CONFIG_ESD'