Merge PR #21
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 24 Oct 2014 19:04:39 +0000 (21:04 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 24 Oct 2014 19:04:39 +0000 (21:04 +0200)
1  2 
configure.ac
src/lib/Makefile.am

diff --combined configure.ac
index 0e73e023023901a353fc3205550dd09f5433eb16,52305d5fd7d1b6a8213f24d0b068237d86c50dd5..cb952f376033b67f18b8b98fb9989739ffe3655b
@@@ -57,6 -57,13 +57,13 @@@ AC_ARG_WITH([tda995x-toolkit-path]
    [TDA995X_CFLAGS="-I$withval/inc"],
    [TDA995X_CFLAGS="-I\$(abs_top_srcdir)/nxp_hdmi/inc"])
  
+ ## Exynos support
+ AC_ARG_ENABLE([exynos],
+   [AS_HELP_STRING([--enable-exynos],
+   [enable support for the Exynos (default is yes)])],
+   [use_exynos=$enableval],
+   [use_exynos=yes])
  ## Raspberry Pi support
  AC_ARG_ENABLE([rpi],
    [AS_HELP_STRING([--enable-rpi],
@@@ -206,20 -213,6 +213,20 @@@ case "${host}" i
          LIBS="$libs_pre_rpi"
        fi
      fi
 +    ## search for X11/xrandr
 +    libs_tmp="$LIBS"
 +    use_x11_xrandr="yes"
 +    AC_CHECK_HEADER(X11/Xlib.h,,[use_x11_xrandr="no"])
 +    AC_CHECK_HEADER(X11/Xatom.h,,[use_x11_xrandr="no"])
 +    AC_CHECK_HEADER(X11/extensions/Xrandr.h,,[use_x11_xrandr="no"])
 +    AC_CHECK_LIB(X11,XOpenDisplay,,[use_x11_xrandr="no"])
 +    AC_CHECK_LIB(Xrandr,XRRGetScreenResources,,[use_x11_xrandr="no"])
 +    if test "x$use_x11_xrandr" = "xyes"; then
 +      AC_DEFINE([HAVE_RANDR],[1],[Define to 1 to include support for the X11 randr extension])
 +      AM_CONDITIONAL(USE_X11_RANDR, true)
 +    else
 +      LIBS="$libs_tmp"
 +    fi
      ;;
    *-apple-darwin*)
      AC_CHECK_HEADER(mach/mach_time.h,,AC_MSG_ERROR($msg_required_header_missing))
@@@ -284,6 -277,19 +291,19 @@@ els
    features="$features\n  TDA995x support :\t\t\tno"
  fi
  
+ ## mark Exynos support as available
+ if test "x$use_exynos" != "xno"; then
+   AC_DEFINE([HAVE_EXYNOS_API],[1],[Define to 1 to include Exynos support])
+   AM_CONDITIONAL(USE_EXYNOS_API, true)
+   features="$features\n  Exynos support :\t\t\tyes"
+   LIB_INFO="$LIB_INFO 'EXYNOS'"
+   CPPFLAGS="$CPPFLAGS $EXYNOS_CFLAGS"
+ else
+   AM_CONDITIONAL(USE_EXYNOS_API, false)
+   features="$features\n  EXYNOS support :\t\t\tno"
+ fi
  ## check if our build system is complete
  AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR($msg_required_header_missing))
  AC_CHECK_HEADER(ctype.h,,AC_MSG_ERROR($msg_required_header_missing))
diff --combined src/lib/Makefile.am
index 3ac5577961c373ae22b2c79cb9fae2664e04f0ab,dd6ade27e3092a52c36dbdd1fe078873e1b9eb5f..bd9598fdaeefe4256fce22cbbd34462368a232ef
@@@ -44,10 -44,6 +44,10 @@@ libcec_la_SOURCES += adapter/Pulse-Eigh
                       platform/posix/os-edid.cpp \
                       platform/adl/adl-edid.cpp \
                       platform/nvidia/nv-edid.cpp
 +if USE_X11_RANDR
 +libcec_la_SOURCES += platform/X11/randr-edid.cpp
 +endif
 +
  endif
  
  ## Raspberry Pi support
@@@ -63,5 -59,10 +63,10 @@@ libcec_la_SOURCES += adapter/TDA995x/TD
                       adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
  endif
  
+ ## Exynos support
+ if USE_EXYNOS_API
+ libcec_la_SOURCES += adapter/Exynos/ExynosCECAdapterDetection.cpp \
+                      adapter/Exynos/ExynosCECAdapterCommunication.cpp
+ endif
  
  libcec_la_LDFLAGS = @LIBS_LIBCEC@ -version-info @VERSION@