2 AC_INIT([libcec], [1:7:0], [http://libcec.pulse-eight.com/])
3 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8 # search for pthread, required by all targets
9 AC_SEARCH_LIBS([pthread_create],[pthread],,
10 AC_MSG_ERROR("required library 'pthread' is missing"))
12 # search for dlopen, required by all targets
13 AC_SEARCH_LIBS([dlopen], [dl],
14 [test "$ac_cv_search_dlopen" = "none required" || LIBS_DL=$ac_cv_search_dlopen],
15 AC_MSG_ERROR("required library 'dl' is missing"))
18 # platform specific libs, required by all targets
31 # search for udev and lockdev, only required by libCEC
35 PKG_CHECK_MODULES([UDEV],[libudev],,
36 [has_libudev="no"]; AC_MSG_WARN("library 'udev' is missing - adapter detection will not be available"))
38 AC_CHECK_HEADER(lockdev.h,,
39 AC_MSG_ERROR("required library 'liblockdev' is missing"))
45 LIBS+="-framework CoreVideo -framework IOKit"
52 # mark udev as available if it was found, so we can include adapter autodetection code
53 if test "x$has_libudev" != "xno"; then
54 INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS"
55 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"])
62 CXXFLAGS="-fPIC -Wall -Wextra -Wno-missing-field-initializers $CXXFLAGS"
66 AC_SUBST([LIBS_LIBCEC])
67 AC_CONFIG_FILES([src/lib/libcec.pc])
68 AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile src/cec-config/Makefile])