X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=configure.ac;h=e1468648632302caee8433777ca8e76c7c69710f;hb=58c1f6f50ae4a5483e43fc9ec80233508adfe099;hp=883d414ac3e2172f527dfeea734c62166ae08d09;hpb=c3f9951c6d37ad59e09305ad34dbbe8f8892f726;p=deb_libcec.git diff --git a/configure.ac b/configure.ac index 883d414..e146864 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,30 @@ -AC_INIT([libcec], 0:2:0) +AC_INIT([libcec], 1:0: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 + +CXXFLAGS="-fPIC -Wall -Wextra $CXXFLAGS" + +AC_SUBST(REQUIRES) AC_CONFIG_FILES([src/lib/libcec.pc]) AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile])