Olivier Naudan | b28313f | 2012-04-16 08:10:18 -0400 | [diff] [blame] | 1 | dnl check for sidplay |
| 2 | |
| 3 | AC_DEFUN([GST_PATH_SIDPLAY], |
| 4 | [ |
| 5 | AC_MSG_CHECKING([for libsidplay 1.36.x]) |
| 6 | |
| 7 | AC_LANG_PUSH(C++) |
| 8 | |
| 9 | AC_CHECK_HEADER(sidplay/player.h, HAVE_SIDPLAY="yes", HAVE_SIDPLAY="no") |
| 10 | |
| 11 | if test $HAVE_SIDPLAY = "yes"; then |
| 12 | SIDPLAY_LIBS="-lsidplay" |
| 13 | |
| 14 | AC_MSG_CHECKING([whether -lsidplay works]) |
| 15 | ac_libs_safe=$LIBS |
| 16 | |
| 17 | LIBS="-lsidplay" |
| 18 | |
| 19 | AC_TRY_RUN([ |
| 20 | #include <sidplay/player.h> |
| 21 | int main() |
| 22 | { sidTune tune = sidTune(0); } |
| 23 | ], |
| 24 | HAVE_SIDPLAY="yes", |
| 25 | HAVE_SIDPLAY="no", |
| 26 | HAVE_SIDPLAY="no") |
| 27 | |
| 28 | LIBS="$ac_libs_safe" |
| 29 | |
| 30 | AC_MSG_RESULT([$HAVE_SIDPLAY]) |
| 31 | fi |
| 32 | |
| 33 | SIDPLAY_CFLAGS= |
| 34 | SIDPLAY_LIBS="-lsidplay" |
| 35 | AC_SUBST(SIDPLAY_CFLAGS) |
| 36 | AC_SUBST(SIDPLAY_LIBS) |
| 37 | |
| 38 | AC_LANG_POP(C++) |
| 39 | ]) |