gst-sid.m4 687 Bytes
Newer Older
1
dnl check for sidplay
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
2

3
AC_DEFUN([GST_PATH_SIDPLAY],
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
4
[
5
AC_MSG_CHECKING([for libsidplay 1.36.x])
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
6

7
AC_LANG_PUSH(C++)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
8

9
AC_CHECK_HEADER(sidplay/player.h, HAVE_SIDPLAY="yes", HAVE_SIDPLAY="no")
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
10

11 12
if test $HAVE_SIDPLAY = "yes"; then
  SIDPLAY_LIBS="-lsidplay"
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
13

14 15
  AC_MSG_CHECKING([whether -lsidplay works])
  ac_libs_safe=$LIBS
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
16

17
  LIBS="-lsidplay"
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
18 19 20 21

  AC_TRY_RUN([
    #include <sidplay/player.h>
    int main()
22
    { sidTune tune = sidTune(0);  }
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
23
    ],
24 25 26 27 28
    HAVE_SIDPLAY="yes",
    HAVE_SIDPLAY="no",
    HAVE_SIDPLAY="no")

  LIBS="$ac_libs_safe"
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
29

30
  AC_MSG_RESULT([$HAVE_SIDPLAY])
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
31
fi
32 33 34 35

SIDPLAY_CFLAGS=
SIDPLAY_LIBS="-lsidplay"
AC_SUBST(SIDPLAY_CFLAGS)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
36 37
AC_SUBST(SIDPLAY_LIBS)

38 39
AC_LANG_POP(C++)
])