1#############################################################################
2##    Kwave                - cmake/KwaveOSSSupport.cmake
3##                           -------------------
4##    begin                : Sat Jun 02 2007
5##    copyright            : (C) 2007 by Thomas Eschenbacher
6##    email                : Thomas.Eschenbacher@gmx.de
7#############################################################################
8#
9#############################################################################
10#                                                                           #
11# Redistribution and use in source and binary forms, with or without        #
12# modification, are permitted provided that the following conditions        #
13# are met:                                                                  #
14#                                                                           #
15# 1. Redistributions of source code must retain the above copyright         #
16#    notice, this list of conditions and the following disclaimer.          #
17# 2. Redistributions in binary form must reproduce the above copyright      #
18#    notice, this list of conditions and the following disclaimer in the    #
19#    documentation and/or other materials provided with the distribution.   #
20#                                                                           #
21# For details see the accompanying cmake/COPYING-CMAKE-SCRIPTS file.        #
22#                                                                           #
23#############################################################################
24
25OPTION(WITH_OSS "enable playback/recording via OSS [default=on]" ON)
26
27IF (WITH_OSS)
28
29    SET(_oss_inc sys/ioctl.h fcntl.h sys/soundcard.h)
30    CHECK_INCLUDE_FILES("${_oss_inc}" HAVE_SYS_SOUNDCARD_H)
31
32    IF (HAVE_SYS_SOUNDCARD_H)
33        MESSAGE(STATUS "Enabled OSS for playback and recording")
34        SET(HAVE_OSS_SUPPORT  ON CACHE BOOL "enable OSS support")
35    ELSE (HAVE_SYS_SOUNDCARD_H)
36        MESSAGE(FATAL_ERROR "Your system lacks OSS support")
37    ENDIF (HAVE_SYS_SOUNDCARD_H)
38
39ENDIF (WITH_OSS)
40
41#############################################################################
42#############################################################################
43