summaryrefslogtreecommitdiffstats
path: root/kscd/libwm/configure.in.in
blob: a0ce3ab72bbd1960d1d6b8047911dc23752aab39 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
dnl +-------------------------------+
dnl |   Checks for LIBWORKMAN       |
dnl +-------------------------------+
AC_MSG_CHECKING(for CDDA)

AC_ARG_WITH(kscd-cdda, [  --with-kscd-cdda             build CDDA support in kscd [default=yes]],
[
  if test $withval = yes; then
    libwm_with_cdda=yes
  else
    libwm_with_cdda=no
  fi
],libwm_with_cdda=yes)

if test "$libwm_with_cdda" = "yes"; then
case $host in
  *-*-linux*)
  AC_CHECK_HEADERS(pthread.h)
  AC_TRY_COMPILE(
  [
#ifndef __GNUC__
#define __GNUC__ 1
#endif
/* needed for vanilla kernel headers, which do provide __u64 only
   for ansi */
#undef __STRICT_ANSI__
/* needed for non-ansi kernel headers */
#define asm __asm__
#define inline __inline__
#include <linux/types.h>
#include <linux/cdrom.h>
#undef asm
#undef inline
  ],[
#if defined(__linux__)
ioctl(1, CDROMREADAUDIO, 0);
#else
  #error platform?
#endif
  ],, libwm_with_cdda=no)
  ;;
  *-*-sunos*)
  AC_CHECK_HEADERS(pthread.h)
  AC_TRY_COMPILE(
  [
#include <sys/types.h>
#include <sys/cdio.h>
  ],[
#if defined(__sun) || defined(sun)
ioctl(1, CDROMCDDA, 0);
#else
  #error platform?
#endif
  ],, libwm_with_cdda=no)
  ;;
  *)
      libwm_with_cdda=no
  ;;
esac
fi

if test "$libwm_with_cdda" = "yes"; then
    AC_DEFINE(BUILD_CDDA, 1, [Define if you will CDDA support in kscd])
fi
AM_CONDITIONAL(libwm_with_cdda, test "$libwm_with_cdda" = "yes")

AC_MSG_RESULT($libwm_with_cdda)


dnl +-------------------------------+
dnl | End LIBWORKMAN checks         |
dnl +-------------------------------+