[vlc-devel] commit: configure: use pkg-config to detect libcaca (Pierre Ynard )

git version control git at videolan.org
Sat Dec 12 18:51:51 CET 2009


vlc | branch: 1.0-bugfix | Pierre Ynard <linkfanel at yahoo.fr> | Sat Dec 12 18:49:58 2009 +0100| [0f4eb0b46596dde5e5dc3450df5c83b7ca91bec3] | committer: Pierre Ynard 

configure: use pkg-config to detect libcaca

... instead of caca-config that breaks cross-compilation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f4eb0b46596dde5e5dc3450df5c83b7ca91bec3
---

 configure.ac |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index dfe2665..2570a8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4687,19 +4687,10 @@ AC_ARG_ENABLE(caca,
   [  --enable-caca           libcaca output (default disabled)])
 if test "${enable_caca}" = "yes"
 then
-  CACA_PATH="${PATH}"
-  AC_ARG_WITH(caca-config-path,
-    [    --with-caca-config-path=PATH caca-config path (default search in \$PATH)],
-    [ if test "${with_caca_config_path}" != "no"
-      then
-        CACA_PATH="${with_caca_config_path}:${PATH}"
-      fi ])
-  AC_PATH_PROG(CACA_CONFIG, caca-config, no, ${CACA_PATH})
-  if test "${CACA_CONFIG}" != "no"
-  then
+  PKG_CHECK_MODULES(CACA, caca, [
+    VLC_ADD_LIBS([caca],[$CACA_LIBS])
+    VLC_ADD_CFLAGS([caca],[$CACA_CFLAGS])
     VLC_ADD_PLUGIN([caca])
-    VLC_ADD_CFLAGS([caca],[`${CACA_CONFIG} --cflags`])
-    VLC_ADD_LIBS([caca],[`${CACA_CONFIG} --plugin-libs`])
     AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <caca.h>
                                         caca_event_t ev;]],
                                         [[ev.type = 0;]]
@@ -4707,7 +4698,7 @@ then
                        [],
       [AC_DEFINE(CACA_EVENT_OPAQUE, [1], ["Define if struct caca_event is opaque and must not be accessed directly"])]
     )
-  fi
+  ], [])
 fi
 
 dnl




More information about the vlc-devel mailing list