Commit | Line | Data |
---|---|---|
e6b4a29e | 1 | AC_INIT([libcec], 1:4:0) |
abbca718 LOK |
2 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
3 | ||
491bc106 LOK |
4 | AM_SILENT_RULES([yes]) |
5 | ||
abbca718 LOK |
6 | AC_PROG_CXX |
7 | AC_PROG_LIBTOOL | |
8 | ||
42c02563 | 9 | has_libudev="yes" |
3e703e8e | 10 | case "${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 | ;; | |
18 | esac | |
19 | ||
42c02563 LOK |
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 | ||
c66708eb LOK |
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 | |
abbca718 | 34 | |
0bb46307 | 35 | CXXFLAGS="-fPIC -Wall -Wextra -Wno-missing-field-initializers $CXXFLAGS" |
7eb13cca | 36 | |
3e703e8e | 37 | AC_SUBST(REQUIRES) |
abbca718 | 38 | AC_CONFIG_FILES([src/lib/libcec.pc]) |
c3f9951c | 39 | AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile]) |