shithub: sox

Download patch

ref: 11b47ed334c2e285e985b33ec6c8003077da1203
parent: cf0debe64ed2d8793062b18168e771737421798f
author: cbagwell <cbagwell>
date: Wed Aug 6 20:33:55 EDT 2008

Add lpc10 check for library that was just added to gsm.

--- a/configure.ac
+++ b/configure.ac
@@ -235,10 +235,11 @@
 AM_CONDITIONAL(EXTERNAL_GSM, test x$found_libgsm = xyes)
 
 dnl Check for liblpc10
-AC_CHECK_HEADERS(lpc10.h, found_liblpc10=yes,
-    [AC_CHECK_HEADERS(lpc10.h, found_liblpc10=yes)])
+found_liblpc10=yes
+AC_CHECK_HEADERS(lpc10.h, ,
+    [AC_CHECK_HEADERS(lpc10.h, ,found_liblpc10=no)])
+    AC_CHECK_LIB(lpc10, create_lpc10_encoder_state, LPC10_LIBS="$LPC10_LIBS -llpc10", found_liblpc10=no)
 if test "$found_liblpc10" = yes; then
-    AC_CHECK_LIB(lpc10, create_lpc10_encoder_state, LPC10_LIBS="$LPC10_LIBS -llpc10")
     AC_DEFINE(EXTERNAL_LPC10, 1, [Define if you are using an external LPC10 library])
 else
     LIBLPC10_LIBADD=../lpc10/liblpc10.la
--- a/src/lpc10.c
+++ b/src/lpc10.c
@@ -20,11 +20,7 @@
 #include "sox_i.h"
 
 #ifdef EXTERNAL_LPC10
-
-#ifdef HAVE_LPC10_H
 #include <lpc10.h>
-#endif
-
 #else
 #include "../lpc10/lpc10.h"
 #endif
@@ -52,9 +48,9 @@
 static void write_bits(sox_format_t * ft, INT32 *bits, int len)
 {
   int i;
-  uint8_t mask;	/* The next bit position within the variable "data" to
+  uint8_t mask; /* The next bit position within the variable "data" to
                    place the next bit. */
-  uint8_t data;	/* The contents of the next byte to place in the
+  uint8_t data; /* The contents of the next byte to place in the
                    output. */
 
   /* Fill in the array bits.