[tracker] add explicit option for enca



commit 94e54f9535473a25101240a4d718bb73fd926930
Author: Saleem Abdulrasool <compnerd compnerd org>
Date:   Thu Jan 21 20:10:37 2010 -0800

    add explicit option for enca

 configure.ac |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a6458eb..a117996 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,16 +209,22 @@ AC_SUBST(UUID_CFLAGS)
 AC_SUBST(UUID_LIBS)
 
 # Check for enca, detects defect Russian or Cyrillic language specifics in mp3s
-PKG_CHECK_MODULES(ENCA, [enca >= 1.9], have_enca=yes, have_enca=no)
-AC_SUBST(ENCA_CFLAGS)
-AC_SUBST(ENCA_LIBS)
+AC_ARG_WITH([enca],
+            AS_HELP_STRING([--with-enca], [build with enca]),,
+            [with_enca=yes])
 
-AM_CONDITIONAL(HAVE_ENCA, test "$have_enca" = "yes")
+if test x$with_enca = xyes ; then
+   PKG_CHECK_MODULES(ENCA, [enca >= 1.9])
+
+   AC_SUBST(ENCA_CFLAGS)
+   AC_SUBST(ENCA_LIBS)
 
-if test x$have_enca == "xyes"; then
-  AC_DEFINE(HAVE_ENCA, 1, [Enca language detection aid])
+   AC_DEFINE(HAVE_ENCA, [], [Enca language detection aid])
 fi
 
+have_enca=$with_enca
+AM_CONDITIONAL(HAVE_ENCA, test "$have_enca" = "yes")
+
 AC_PATH_PROG(VALAC, valac, valac)
 AC_SUBST(VALAC)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]