cec: updated changelog and version numbers for v1.4.0
[deb_libcec.git] / configure.ac
1 AC_INIT([libcec], 1:4:0)
2 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
3
4 AM_SILENT_RULES([yes])
5
6 AC_PROG_CXX
7 AC_PROG_LIBTOOL
8
9 has_libudev="yes"
10 case "${host}" in
11 *-*-linux*)
12 PKG_CHECK_MODULES([UDEV],[libudev],,[has_libudev="no";AC_MSG_WARN("library 'udev' is missing - adapter detection will not be available")])
13 ;;
14 *-apple-darwin*)
15 has_libudev="no";
16 LIBS+="-framework CoreVideo -framework IOKit"
17 ;;
18 esac
19
20 if 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"
24 fi
25
26 AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing"))
27
28 libs_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])
33 LIBS=$libs_pre_dl
34
35 CXXFLAGS="-fPIC -Wall -Wextra -Wno-missing-field-initializers $CXXFLAGS"
36
37 AC_SUBST(REQUIRES)
38 AC_CONFIG_FILES([src/lib/libcec.pc])
39 AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile])