added bootstrap script. updated README
[deb_libcec.git] / configure.ac
index e0252c9bc118cce5c51c2681fc8cd7483403660c..df63c2d3f86e7df4b1aee298020fff1c4d98f378 100644 (file)
@@ -1,10 +1,10 @@
 AC_PREREQ(2.59)
-AC_INIT([libcec], [1:9:0], [http://libcec.pulse-eight.com/])
+AC_INIT([libcec], [2:0:0], [http://libcec.pulse-eight.com/])
 AC_CONFIG_HEADERS([config.h])
 AH_TOP([#pragma once])
 
 AM_INIT_AUTOMAKE([foreign])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
@@ -47,15 +47,15 @@ AC_ARG_ENABLE([optimisation],
 AC_ARG_ENABLE([cubox],
   [AS_HELP_STRING([--enable-cubox],
   [enable support for the CuBox (default is no)])],
-  [use_nxp=$enableval],
-  [use_nxp=no])
+  [use_tda995x=$enableval],
+  [use_tda995x=no])
 
-## Optional path to the NXP dev toolkit
-AC_ARG_WITH([nxp-toolkit-path],
-  [AS_HELP_STRING([--with-nxp-toolkit-path],
-    [location of the NXP HDMI toolkit (default is ./nxp_hdmi)])],
-  [NXP_CFLAGS="-I$withval/inc"],
-  [NXP_CFLAGS="-I\$(abs_top_srcdir)/nxp_hdmi/inc"])
+## Optional path to the tda995x dev toolkit
+AC_ARG_WITH([tda995x-toolkit-path],
+  [AS_HELP_STRING([--with-tda995x-toolkit-path],
+    [location of the TDA995x driver toolkit (default is ./nxp_hdmi)])],
+  [TDA995X_CFLAGS="-I$withval/inc"],
+  [TDA995X_CFLAGS="-I\$(abs_top_srcdir)/nxp_hdmi/inc"])
 
 ## Raspberry Pi support
 AC_ARG_ENABLE([rpi],
@@ -110,7 +110,7 @@ AC_CHECK_FUNCS([pthread_mutexattr_init pthread_cond_init pthread_cond_destroy pt
 AC_SEARCH_LIBS([dlopen], [dl],
   [test "$ac_cv_search_dlopen" = "none required" || LIBS_DL=$ac_cv_search_dlopen],
   AC_MSG_ERROR($msg_dl_missing))
-AC_CHECK_FUNCS([dlopen dlcose dlsym])
+AC_CHECK_FUNCS([dlopen dlclose dlsym])
 
 ## platform specific libs, required by all targets
 case "${host}" in
@@ -207,6 +207,7 @@ case "${host}" in
   *-apple-darwin*)
     AC_CHECK_HEADER(mach/mach_time.h,,AC_MSG_ERROR($msg_required_header_missing))
     AC_CHECK_HEADER(CoreVideo/CVHostTime.h,,AC_MSG_ERROR($msg_required_header_missing))
+    AC_DEFINE([TARGET_DARWIN], [1], [Darwin target])
     ;;
 esac
 
@@ -250,14 +251,14 @@ else
 fi
 
 ## mark CuBox support as available
-if test "x$use_nxp" != "xno"; then
-  AC_DEFINE([HAVE_NXP_API],[1],[Define to 1 to include CuBox support])
-  AM_CONDITIONAL(USE_NXP_API, true)
+if test "x$use_tda995x" != "xno"; then
+  AC_DEFINE([HAVE_TDA995X_API],[1],[Define to 1 to include CuBox support])
+  AM_CONDITIONAL(USE_TDA995X_API, true)
   features="$features\n  CuBox support :\t\t\tyes"
   LIB_INFO="$LIB_INFO 'CuBox'"
-  CPPFLAGS="$CPPFLAGS $NXP_CFLAGS"
+  CPPFLAGS="$CPPFLAGS $TDA995X_CFLAGS"
 else
-  AM_CONDITIONAL(USE_NXP_API, false)
+  AM_CONDITIONAL(USE_TDA995X_API, false)
   features="$features\n  CuBox support :\t\t\tno"
 fi
 
@@ -335,10 +336,11 @@ fi
 LIBS_LIBCEC="$LIBS"
 LIBS="$libs_client"
 
-CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Wno-missing-field-initializers"
+CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Werror -Wno-missing-field-initializers"
 
 if test "x$use_debug" = "xyes"; then
   CXXFLAGS="$CXXFLAGS -g"
+  AC_DEFINE(CEC_DEBUGGING,"1", "generate libCEC debug output")
 fi
 
 if test "x$optimisation" = "xyes"; then