+## define the build info
+LIB_INFO="host: ${host}, features:"
+
+features="Configured features:\n Pulse-Eight CEC Adapter :\t\tyes"
+LIB_INFO="$LIB_INFO 'P8 USB'"
+AC_DEFINE([HAVE_P8_USB],[1],[Define to 1 to include support for the Pulse-Eight USB-CEC Adapter])
+AM_CONDITIONAL(USE_P8_USB, true)
+
+if test "x$use_lockdev" = "xyes"; then
+ AC_DEFINE([HAVE_LOCKDEV],[1],[Define to 1 if liblockdev is installed])
+fi
+
+## mark adapter detection as available if the required deps were found
+if test "x$use_adapter_detection" = "xyes"; then
+ ## mark udev as available if it was found
+ if test "x$use_udev" = "xyes"; then
+ INCLUDES="$INCLUDES $UDEV_CFLAGS"
+ LIBS="$LIBS $UDEV_LIBS"
+ AC_DEFINE([HAVE_LIBUDEV],[1],[Define to 1 if libudev is installed])
+ REQUIRES="$REQUIRES udev"
+ fi
+
+ AC_DEFINE([HAVE_P8_USB_DETECT],[1],[Define to 1 to include autodetection support for the Pulse-Eight USB-CEC Adapter])
+ AM_CONDITIONAL(USE_P8_USB_DETECT, true)
+
+ features="$features\n Pulse-Eight CEC Adapter detection :\tyes"
+ LIB_INFO="$LIB_INFO 'P8 USB detect'"
+else
+ AM_CONDITIONAL(USE_P8_USB_DETECT, false)
+ features="$features\n Pulse-Eight CEC Adapter detection :\tno"
+fi
+
+## mark RPi support as available if the required headers and libs were found
+if test "x$use_rpi" != "xno"; then
+ AC_DEFINE([HAVE_RPI_API],[1],[Define to 1 to include RPi support])
+ AM_CONDITIONAL(USE_RPI_API, true)
+ features="$features\n Raspberry Pi support :\t\tyes"
+ LIB_INFO="$LIB_INFO 'RPi'"
+else
+ AM_CONDITIONAL(USE_RPI_API, false)
+ features="$features\n Raspberry Pi support :\t\tno"
+fi
+
+## mark TDA995x support as available
+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 TDA995x support :\t\t\tyes"
+ LIB_INFO="$LIB_INFO 'TDA995x'"
+ CPPFLAGS="$CPPFLAGS $TDA995X_CFLAGS"
+else
+ AM_CONDITIONAL(USE_TDA995X_API, false)
+ 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))
+AC_CHECK_HEADER(dlfcn.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(errno.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(fcntl.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(functional,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(locale,,AC_DEFINE([SS_NO_LOCALE],[1],[Define to 1 to exclude locale support]))
+AC_CHECK_HEADER(map,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(netdb.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(poll.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(queue,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(semaphore.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(set,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(stdarg.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(stdint.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(stdio.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(stdlib.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(string,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(string.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(termios.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(unistd.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(vector,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(wchar.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(wctype.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(arpa/inet.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(netinet/in.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(netinet/tcp.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(sys/socket.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(sys/time.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_HEADER(sys/types.h,,AC_MSG_ERROR($msg_required_header_missing))
+AC_CHECK_FUNCS([close fcntl select write read shutdown send recv memset sprintf getaddrinfo getsockopt setsockopt connect poll sched_yield open strerror tcsetattr tcgetattr cfsetispeed cfsetospeed bind freeaddrinfo listen accept socket])
+
+## add the build date to LIB_INFO
+AC_CHECK_PROG(HAVE_GIT, git, yes)
+if test "x$HAVE_GIT" = "xyes"; then
+ revision=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h" HEAD)
+fi
+if test "x$revision" != "x"; then
+ LIB_INFO="$LIB_INFO, git revision: ${revision}"
+fi
+
+AC_CHECK_PROG(HAVE_DATE, date, yes)
+if test "x$HAVE_DATE" = "xyes"; then
+ LIB_INFO="$LIB_INFO, compiled on: `date -u`"
+else
+ LIB_INFO="$LIB_INFO, compiled on: (unknown date)"
+fi
+
+## add the name of the user who built libCEC to LIB_INFO
+AC_CHECK_PROG(HAVE_WHOAMI, whoami, yes)
+if test "x$HAVE_WHOAMI" = "xyes" ; then
+ LIB_INFO="$LIB_INFO by `whoami`"
+else
+ LIB_INFO="$LIB_INFO by (unknown user)"
+fi
+
+## add the hostname of the build host of libCEC to LIB_INFO
+AC_CHECK_PROG(HAVE_HOSTNAME, hostname, yes)
+if test "x$HAVE_HOSTNAME" = "xyes"; then
+ LIB_INFO="$LIB_INFO@`hostname -f`"
+fi
+
+## add the system info of the build host of libCEC to LIB_INFO
+AC_CHECK_PROG(HAVE_UNAME, uname, yes)
+if test "x$HAVE_UNAME" = "xyes"; then
+ LIB_INFO="$LIB_INFO on `uname -s` `uname -r` (`uname -m`)"