Commit | Line | Data |
---|---|---|
94d98b71 | 1 | AC_INIT([libcec], 1:2:0) |
abbca718 LOK |
2 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
3 | ||
4 | AC_PROG_CXX | |
5 | AC_PROG_LIBTOOL | |
6 | ||
3e703e8e | 7 | case "${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 | ;; | |
15 | esac | |
16 | ||
c66708eb LOK |
17 | AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing")) |
18 | ||
19 | libs_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]) | |
24 | LIBS=$libs_pre_dl | |
abbca718 | 25 | |
7eb13cca LOK |
26 | CXXFLAGS="-fPIC -Wall -Wextra $CXXFLAGS" |
27 | ||
3e703e8e | 28 | AC_SUBST(REQUIRES) |
abbca718 | 29 | AC_CONFIG_FILES([src/lib/libcec.pc]) |
c3f9951c | 30 | AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile]) |