cec: added buttoncode for 'channels list' on samsung (0x96)
[deb_libcec.git] / configure.ac
CommitLineData
c9549d35 1AC_INIT([libcec], 1:5:0)
abbca718
LOK
2AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
3
4AC_PROG_CXX
5AC_PROG_LIBTOOL
6
42c02563 7has_libudev="yes"
3e703e8e 8case "${host}" in
9 *-*-linux*)
7f3029e0 10 PKG_CHECK_MODULES([UDEV],[libudev],,[has_libudev="no"]; AC_MSG_WARN("library 'udev' is missing - adapter detection will not be available"))
894e5deb 11 LIBS+=" -lrt"
3e703e8e 12 ;;
13 *-apple-darwin*)
42c02563 14 has_libudev="no";
3e703e8e 15 LIBS+="-framework CoreVideo -framework IOKit"
16 ;;
5458fd77
F
17 *-freebsd*)
18 has_libudev="no"
19 ;;
3e703e8e 20esac
21
42c02563
LOK
22if test "x$has_libudev" != "xno"; then
23 INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS"
24 AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"])
25 REQUIRES="udev"
26fi
27
c66708eb
LOK
28AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing"))
29
30libs_pre_dl=$LIBS
31 AC_SEARCH_LIBS(dlopen, [dl],
32 [test "$ac_cv_search_dlopen" = "none required" || LIBS_DL=$ac_cv_search_dlopen],
33 AC_MSG_ERROR("required library 'dl' is missing"))
34 AC_SUBST([LIBS_DL])
35LIBS=$libs_pre_dl
abbca718 36
0bb46307 37CXXFLAGS="-fPIC -Wall -Wextra -Wno-missing-field-initializers $CXXFLAGS"
7eb13cca 38
3e703e8e 39AC_SUBST(REQUIRES)
abbca718 40AC_CONFIG_FILES([src/lib/libcec.pc])
39b1216c 41AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile src/cec-config/Makefile])