Missing C Functions
[deb_libcec.git] / configure.ac
CommitLineData
94d98b71 1AC_INIT([libcec], 1:2:0)
abbca718
LOK
2AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
3
4AC_PROG_CXX
5AC_PROG_LIBTOOL
6
3e703e8e 7case "${host}" in
8 *-*-linux*)
c66708eb 9 AC_SEARCH_LIBS([udev_new], [udev],, AC_MSG_ERROR("required library 'udev' is missing"))
3e703e8e 10 REQUIRES="udev"
11 ;;
12 *-apple-darwin*)
13 LIBS+="-framework CoreVideo -framework IOKit"
14 ;;
15esac
16
c66708eb
LOK
17AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing"))
18
19libs_pre_dl=$LIBS
20 AC_SEARCH_LIBS(dlopen, [dl],
21 [test "$ac_cv_search_dlopen" = "none required" || LIBS_DL=$ac_cv_search_dlopen],
22 AC_MSG_ERROR("required library 'dl' is missing"))
23 AC_SUBST([LIBS_DL])
24LIBS=$libs_pre_dl
abbca718 25
7eb13cca
LOK
26CXXFLAGS="-fPIC -Wall -Wextra $CXXFLAGS"
27
3e703e8e 28AC_SUBST(REQUIRES)
abbca718 29AC_CONFIG_FILES([src/lib/libcec.pc])
c3f9951c 30AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile])