 -				../src/thirdparty/utf8proc/utf8proc.c \
 -				../src/thirdparty/utf8proc/utf8proc.h \
  				../src/thirdparty/lib_hash/sha2.c \
--				../src/thirdparty/lib_hash/sha2.h \
+ 				../src/thirdparty/lib_hash/sha2.h \
 -				../src/thirdparty/protobuf-c/protobuf-c.c \
 -				../src/thirdparty/protobuf-c/protobuf-c.h \
 -				../src/thirdparty/zvbi/bcd.h \

+PKG_CHECK_MODULES([libprotobuf], [libprotobuf-c])
+PKG_CHECK_MODULES([libutf8proc], [libutf8proc])
+PKG_CHECK_MODULES([zlib], [zlib])
+PKG_CHECK_MODULES([zvbi], [zvbi-0.2])
+
 # Checks for header files.
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h termios.h unistd.h wchar.h])

 				../src/lib_ccx/ccx_common_common.h \
 				../src/lib_ccx/ccx_common_option.h \
 				../src/lib_ccx/utility.h \
@@ -229,99 +126,28 @@
 				../src/lib_ccx/ts_tables_epg.c \
 				../src/lib_ccx/wtv_constants.h \
 				../src/lib_ccx/wtv_functions.c \
