Don't solely rely on babeltrace pkg-config for detection
authorYannick Brosseau <yannick.brosseau@gmail.com>
Thu, 30 May 2013 18:40:49 +0000 (14:40 -0400)
committerYannick Brosseau <yannick.brosseau@gmail.com>
Thu, 30 May 2013 18:40:49 +0000 (14:40 -0400)
The babeltrace.pc file is not yet reliably available on all distribution

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
configure.ac

index 59338a27d567f08e3182b9a222d6256fbde86243..817a46d9ce779d17e81e60ef172d6bbf9a41a136 100644 (file)
@@ -109,7 +109,16 @@ PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
 pkg_modules="gobject-2.0 >= 2.0.0"
 PKG_CHECK_MODULES(GOBJECT, [$pkg_modules])
 
-PKG_CHECK_MODULES(BABELTRACE, [babeltrace >= 1.1.0])
+PKG_CHECK_MODULES(BABELTRACE, [babeltrace >= 1.1.0], [], 
+                             [AC_CHECK_LIB([babeltrace], [bt_context_create], [],
+             [AC_MSG_ERROR([Cannot find the babeltrace library.])]
+             )
+
+# Check for libbabeltrace-ctf
+AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_iter_create], [],
+             [AC_MSG_ERROR([Cannot find the babeltrace-ctf library.])]
+             )
+])
 
 AC_CHECK_LIB([babeltrace], [bt_iter_equals_pos], 
                           [AC_DEFINE([HAVE_BT_ITER_EQUALS_POS],[],[Have equal function])], [])
This page took 0.024083 seconds and 4 git commands to generate.