From 63256bf442274a693271a6460dfd1181fb0c8fc1 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
Date: Fri, 5 Nov 2010 14:20:17 -0400
Subject: [PATCH] [#4367] Use PKG_CHECK_MODULE for celt

---
 sflphone-common/configure.ac | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac
index f0c107c428..789fc63480 100644
--- a/sflphone-common/configure.ac
+++ b/sflphone-common/configure.ac
@@ -372,11 +372,11 @@ AM_CONDITIONAL(ENABLE_SPEEXDSP, test  $HAVE_SPEEXDSP = yes)
 
 dnl Check for celt. Compile it only if a recent enough version is found
 LIBCELT_MIN_VERSION=0.7.1
-AC_ARG_WITH([celt],
-	[AS_HELP_STRING([--without-celt],
-	[disable support for celt codec])],
-	[],
-	[with_celt=yes])
+# AC_ARG_WITH([celt],
+#	[AS_HELP_STRING([--without-celt],
+#	[disable support for celt codec])],
+#	[],
+#	[with_celt=yes])
 	
 # AS_IF([test "x$with_celt" != xno],
 #	[AC_CHECK_HEADER([celt/celt.h], , AC_MSG_FAILURE([Unable to find the libcelt headers (you may need to install the dev package). You may use --without-celt to compile without celt codec support.]))]
@@ -385,11 +385,11 @@ AC_ARG_WITH([celt],
 #	[AC_MSG_FAILURE([libcelt link test failed.   You may use --without-celt to compile without celt codec support.])])
 #	])
 
-AC_DEFINE([HAVE_CELT], test "x$with_celt" = "xyes", [Define if you have libcelt])
-AM_CONDITIONAL(BUILD_CELT, test "x$with_celt" = "xyes" )
+#AC_DEFINE([HAVE_CELT], test "x$with_celt" = "xyes", [Define if you have libcelt])
+#AM_CONDITIONAL(BUILD_CELT, test "x$with_celt" = "xyes" )
 
-# PKG_CHECK_MODULES(CELT, celt >= ${LIBCELT_MIN_VERSION})
-# AC_SUBST(BUILD_CELT)
+PKG_CHECK_MODULES(CELT, celt >= ${LIBCELT_MIN_VERSION}, [with_celt=yes], [with_celt=no])
+AM_CONDITIONAL(BUILD_CELT, test "x$with_celt" = "xyes" )
 
 
 dnl Check for IAX
-- 
GitLab