summaryrefslogtreecommitdiff
path: root/m4/gst-sid.m4
blob: 0af8f3aa7619d136b169e2939f2a377799e4cf59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
dnl check for sidplay

AC_DEFUN([GST_PATH_SIDPLAY],
[
AC_MSG_CHECKING([for libsidplay])

AC_LANG_PUSH(C++)

AC_CHECK_HEADER(sidplay/player.h, HAVE_SIDPLAY="yes", HAVE_SIDPLAY="no")

if test $HAVE_SIDPLAY = "yes"; then
  SIDPLAY_LIBS="-lsidplay"

  AC_MSG_CHECKING([whether -lsidplay works])
  ac_libs_safe=$LIBS

  LIBS="-lsidplay"

  AC_TRY_RUN([
    #include <sidplay/player.h>
    int main()
    { sidTune tune = sidTune(0);  }
    ],
    HAVE_SIDPLAY="yes",
    HAVE_SIDPLAY="no",
    HAVE_SIDPLAY="no")

  LIBS="$ac_libs_safe"

  AC_MSG_RESULT([$HAVE_SIDPLAY])
fi

SIDPLAY_CFLAGS=
SIDPLAY_LIBS="-lsidplay"
AC_SUBST(SIDPLAY_CFLAGS)
AC_SUBST(SIDPLAY_LIBS)

AC_LANG_POP(C++)
])