summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-06-01 11:32:15 -0700
committerTom Hacohen <tom@stosb.com>2016-06-02 11:35:05 +0100
commit36f15d761a2d39fc81c38a9db7b13d1d571ef453 (patch)
treed2e5da2b9b7d7974c59a23ad866b49632c1809a9 /m4
parente649307d92325862f1f5fdad5c8e94cfd0cd2f71 (diff)
emotion: integrate generic legacy vlc support in the build system.
Diffstat (limited to 'm4')
-rw-r--r--m4/emotion_generic_players.m437
1 files changed, 37 insertions, 0 deletions
diff --git a/m4/emotion_generic_players.m4 b/m4/emotion_generic_players.m4
new file mode 100644
index 0000000..d852dba
--- /dev/null
+++ b/m4/emotion_generic_players.m4
@@ -0,0 +1,37 @@
1dnl EMOTION_GENERIC_PLAYER(NAME, DEFAULT_STATE, [PKG_CONFIG_DEPS])
2dnl Does the following:
3dnl * AC_ARG_WITH(NAME)
4dnl * define with_name to yes or no
5dnl * PKG_CHECK_MODULES(NAME, PKG_CONFIG_DEPS)
6dnl * AC_DEFINE([HAVE_NAME])
7dnl * AM_CONDITIONAL([HAVE_NAME])
8AC_DEFUN([EMOTION_GENERIC_PLAYER],
9[dnl
10m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
11m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
12
13AC_ARG_WITH([DOWN],
14 [AC_HELP_STRING([--with-]m4_defn([DOWN]),
15 [build generic player ]m4_defn([UP])[. @<:@default=$2@:>@])],
16 [], [with_]m4_defn([DOWN])[="$2"])
17
18if test "${with_[]m4_defn([DOWN])}" = "yes"; then
19 m4_ifval([$3], [dnl
20 PKG_CHECK_MODULES(m4_defn([UP]), [$3])
21 ], [dnl
22 m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}"
23 m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}"
24 AC_SUBST(m4_defn([UP])[_LIBS])
25 AC_SUBST(m4_defn([UP])[_CFLAGS])
26 ])
27
28 AC_SEARCH_LIBS([shm_open], [rt], [], [AC_MSG_ERROR([unable to find the shm_open() function])])
29 if test "${ac_cv_search_shm_open}" != "none required"; then
30 m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${ac_cv_search_shm_open}"
31 fi
32fi
33AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$with_[]m4_defn([DOWN])" = "yes"])
34
35m4_popdef([UP])dnl
36m4_popdef([DOWN])dnl
37])