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