X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=configure.ac;h=124c013c0ee7cf69a752d9ad508fb0982da108ef;hb=b9eea66dd7e19a4baf9e89f4fd6b3c2f281ba7a7;hp=dffe00b64805765160ae9fb5262c1fa2db1e5ea7;hpb=7eb13cca43e722f2bfd20064daf580ea65411cf5;p=deb_libcec.git diff --git a/configure.ac b/configure.ac index dffe00b..124c013 100644 --- a/configure.ac +++ b/configure.ac @@ -1,14 +1,35 @@ -AC_INIT([libcec], 0:4:0) +AC_INIT([libcec], 0:8:0) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AC_PROG_CXX AC_PROG_LIBTOOL -AC_CHECK_LIB([rt], [main],, AC_MSG_ERROR("required library 'rt' is missing")) -AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR("required library 'pthread' is missing")) -AC_CHECK_LIB([udev], [main],, AC_MSG_ERROR("required library 'udev' is missing")) +case "${host}" in + *-*-linux*) + AC_SEARCH_LIBS([udev_new], [udev],, AC_MSG_ERROR("required library 'udev' is missing")) + REQUIRES="udev" + ;; + *-apple-darwin*) + LIBS+="-framework CoreVideo -framework IOKit" + ;; +esac + +AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing")) + +libs_pre_dl=$LIBS + AC_SEARCH_LIBS(dlopen, [dl], + [test "$ac_cv_search_dlopen" = "none required" || LIBS_DL=$ac_cv_search_dlopen], + AC_MSG_ERROR("required library 'dl' is missing")) + AC_SUBST([LIBS_DL]) +LIBS=$libs_pre_dl + +AC_LANG_PUSH([C++]) +AC_CHECK_HEADERS([boost/shared_ptr.hpp], [], + [AC_MSG_ERROR(You need the Boost libraries.)]) +AC_LANG_POP([C++]) CXXFLAGS="-fPIC -Wall -Wextra $CXXFLAGS" +AC_SUBST(REQUIRES) AC_CONFIG_FILES([src/lib/libcec.pc]) AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile])