summaryrefslogtreecommitdiffstats
path: root/kscd/libwm/configure.in.in
diff options
context:
space:
mode:
Diffstat (limited to 'kscd/libwm/configure.in.in')
-rw-r--r--kscd/libwm/configure.in.in72
1 files changed, 72 insertions, 0 deletions
diff --git a/kscd/libwm/configure.in.in b/kscd/libwm/configure.in.in
new file mode 100644
index 00000000..a0ce3ab7
--- /dev/null
+++ b/kscd/libwm/configure.in.in
@@ -0,0 +1,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 +-------------------------------+