Add a function to specify stream chunk sizes in microseconds
[alure.git] / CMakeLists.txt
blobdcf73adae55460ea177267b4eb6cb457168e2c76
1 # CMakeLists.txt for ALURE
2 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
4 IF(COMMAND CMAKE_POLICY)
5     CMAKE_POLICY(SET CMP0003 NEW)
6 ENDIF(COMMAND CMAKE_POLICY)
8 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
10 INCLUDE(CheckCCompilerFlag)
11 INCLUDE(CheckCSourceCompiles)
12 INCLUDE(CheckFunctionExists)
13 INCLUDE(CheckIncludeFile)
14 INCLUDE(CheckIncludeFiles)
15 INCLUDE(CheckLibraryExists)
16 INCLUDE(CheckSharedLibraryExists)
17 INCLUDE(FindPkgConfig)
18 INCLUDE(UsePkgConfig)
19 INCLUDE(CheckFileOffsetBits)
21 PROJECT(ALURE)
23 IF(WIN32)
24     SET(LIBNAME ALURE32)
25 ELSE(WIN32)
26     SET(LIBNAME alure)
27 ENDIF(WIN32)
29 SET(LIB_MAJOR_VERSION "1")
30 SET(LIB_MINOR_VERSION "0")
31 SET(LIB_BUILD_VERSION "72")
32 SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_BUILD_VERSION}")
35 INCLUDE_DIRECTORIES(include "${ALURE_BINARY_DIR}")
38 OPTION(BUILD_SHARED "Build the shared version of the library" ON)
39 OPTION(BUILD_STATIC "Build the static version of the library" ON)
41 IF(NOT BUILD_SHARED AND NOT BUILD_STATIC)
42     MESSAGE(FATAL_ERROR "No libtype being built!")
43 ENDIF(NOT BUILD_SHARED AND NOT BUILD_STATIC)
45 IF(NOT CMAKE_BUILD_TYPE)
46     SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
47         "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
48         FORCE)
49 ENDIF(NOT CMAKE_BUILD_TYPE)
50 IF(NOT DEFINED CMAKE_DEBUG_POSTFIX)
51     SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING
52         "Library postfix for debug builds. Normally left blank."
53         FORCE)
54 ENDIF(NOT DEFINED CMAKE_DEBUG_POSTFIX)
57 CHECK_SHARED_LIBRARY_EXISTS(stdc++ memset "" HAS_STDCXX)
58 IF(HAS_STDCXX)
59     SET(EXTRA_LIBS stdc++ ${EXTRA_LIBS})
60 ENDIF(HAS_STDCXX)
62 CHECK_SHARED_LIBRARY_EXISTS(m pow "" HAS_LIBM)
63 IF(HAS_LIBM)
64     SET(EXTRA_LIBS m ${EXTRA_LIBS})
65 ENDIF(HAS_LIBM)
67 CHECK_FILE_OFFSET_BITS()
68 IF(_FILE_OFFSET_BITS)
69     ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS})
70     SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS})
71 ENDIF(_FILE_OFFSET_BITS)
73 CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
75 IF(MSVC)
76     # ???
77 ELSE(MSVC)
78     IF(NOT WIN32)
79         CHECK_C_SOURCE_COMPILES("int foo() __attribute__((constructor));
80                                  int main() {return 0;}" HAVE_GCC_CONSTRUCTOR)
82         CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAVE_GCC_VISIBILITY)
83         IF(HAVE_GCC_VISIBILITY)
84             ADD_DEFINITIONS(-fvisibility=hidden)
85         ENDIF(HAVE_GCC_VISIBILITY)
86     ENDIF(NOT WIN32)
88     CHECK_C_COMPILER_FLAG(-Wextra HAVE_WEXTRA)
89     IF(HAVE_WEXTRA)
90         ADD_DEFINITIONS(-Wextra)
91     ENDIF(HAVE_WEXTRA)
92     ADD_DEFINITIONS(-Wall)
94     CHECK_C_COMPILER_FLAG(-funswitch-loops HAVE_FUNSWITCH_LOOPS)
95     IF(HAVE_FUNSWITCH_LOOPS)
96         ADD_DEFINITIONS(-funswitch-loops)
97     ENDIF(HAVE_FUNSWITCH_LOOPS)
98 ENDIF(MSVC)
101 CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0500)
102 IF(NOT HAVE_WINDOWS_H)
103     CHECK_C_COMPILER_FLAG(-pthread HAVE_PTHREAD)
104     IF(HAVE_PTHREAD)
105         ADD_DEFINITIONS(-pthread)
106         SET(EXTRA_LIBS ${EXTRA_LIBS} -pthread)
107     ENDIF(HAVE_PTHREAD)
109     # We need pthreads outside of Windows
110     CHECK_INCLUDE_FILE(pthread.h HAVE_PTHREAD_H)
111     IF(NOT HAVE_PTHREAD_H)
112         MESSAGE(FATAL_ERROR "PThreads is required for non-Windows builds!")
113     ENDIF()
114     # Some systems need pthread_np.h to get recursive mutexes
115     CHECK_INCLUDE_FILES("pthread.h;pthread_np.h" HAVE_PTHREAD_NP_H)
117     # _GNU_SOURCE is needed on some systems for extra attributes, and
118     # _REENTRANT is needed for libc thread-safety
119     ADD_DEFINITIONS(-D_GNU_SOURCE=1)
120     CHECK_FUNCTION_EXISTS(pthread_create HAS_PTHREAD_CREATE)
121     IF(NOT HAS_PTHREAD_CREATE)
122         CHECK_SHARED_LIBRARY_EXISTS(pthread pthread_create "" HAVE_LIBPTHREAD)
123         IF(NOT HAVE_LIBPTHREAD)
124             MESSAGE(FATAL_ERROR "pthread_create not found on non-Windows target!")
125         ENDIF(NOT HAVE_LIBPTHREAD)
126         SET(EXTRA_LIBS pthread ${EXTRA_LIBS})
127     ENDIF(NOT HAS_PTHREAD_CREATE)
129     CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
130     IF(NOT HAVE_NANOSLEEP)
131         MESSAGE(FATAL_ERROR "No sleep function found!")
132     ENDIF(NOT HAVE_NANOSLEEP)
133 ENDIF(NOT HAVE_WINDOWS_H)
135 CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
136 CHECK_INCLUDE_FILE(sys/wait.h HAVE_SYS_WAIT_H)
137 CHECK_INCLUDE_FILE(signal.h HAVE_SIGNAL_H)
138 CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
140 IF(HAVE_DLFCN_H)
141     CHECK_SHARED_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
142     IF(HAVE_LIBDL)
143         SET(EXTRA_LIBS dl ${EXTRA_LIBS})
144     ENDIF(HAVE_LIBDL)
145 ENDIF(HAVE_DLFCN_H)
147 OPTION(DYNLOAD   "Dynamically load support libs at run-time" ON)
148 OPTION(SNDFILE   "SoundFile support (for various formats)" ON)
149 OPTION(VORBIS    "VorbisFile support (for Ogg Vorbis)"  ON)
150 OPTION(FLAC      "FLAC support (for FLAC and Ogg FLAC)" ON)
151 OPTION(MPG123    "MPG123 support (for MP1/MP2/MP3)" ON)
152 OPTION(DUMB      "DUMB support (for IT/XM/S3M/MOD)" ON)
154 IF(WIN32)
155     ADD_DEFINITIONS(-D_WIN32)
157     IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
158         SET(WIN_TYPE Win64)
159         SET(XBITS x64)
160     ELSE(CMAKE_SIZEOF_VOID_P MATCHES "8")
161         SET(WIN_TYPE Win32)
162         SET(XBITS x86)
163     ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
165     SET(OPENAL_SEARCH_PATHS
166         ENV ALSDK_DIR
167         ENV MINGDIR
168         "C:/Program Files/OpenAL 1.1 SDK"
169         "C:/Program Files (x86)/OpenAL 1.1 SDK"
170         "E:/Programs/Dev/OpenAL"
171         "E:/Program Files (x86)/OpenAL 1.1 SDK" )
173     FIND_PATH(OPENAL_INCLUDE_DIR al.h
174               PATHS ${OPENAL_SEARCH_PATHS}
175               PATH_SUFFIXES include include/AL )
176     IF(OPENAL_INCLUDE_DIR)
177         INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
178         FIND_LIBRARY(OPENAL_LIBRARIES OpenAL32
179                      PATHS ${OPENAL_SEARCH_PATHS}
180                      PATH_SUFFIXES lib libs/${WIN_TYPE} )
181     ENDIF(OPENAL_INCLUDE_DIR)
183     IF(NOT OPENAL_LIBRARIES)
184         MESSAGE(FATAL_ERROR "OpenAL not found!\nPlease try setting the ALSDK_DIR environment variable and try again.")
185     ENDIF(NOT OPENAL_LIBRARIES)
187     MESSAGE(STATUS "OpenAL include: ${OPENAL_INCLUDE_DIR}")
188     MESSAGE(STATUS "OpenAL lib: ${OPENAL_LIBRARIES}")
189 ELSE(WIN32)
190     IF(NOT HAVE_DLFCN_H OR NOT HAVE_LIBDL)
191         SET(DYNLOAD OFF)
192     ENDIF(NOT HAVE_DLFCN_H OR NOT HAVE_LIBDL)
194     PKG_CHECK_MODULES(OPENAL openal)
195     IF(NOT OPENAL_FOUND)
196         IF(APPLE)
197             CHECK_INCLUDE_FILE(OpenAL/al.h HAVE_OPENAL_AL_H)
198             IF(HAVE_OPENAL_AL_H)
199                 SET(OPENAL_LIBRARIES "-framework OpenAL")
200                 SET(HAS_OPENAL 1)
201             ENDIF(HAVE_OPENAL_AL_H)
202         ELSE(APPLE)
203             CHECK_INCLUDE_FILE(AL/al.h HAVE_AL_AL_H)
204             IF(HAVE_AL_AL_H)
205                 CHECK_SHARED_LIBRARY_EXISTS(openal alcOpenDevice "" HAS_OPENAL)
206                 IF(HAS_OPENAL)
207                     SET(OPENAL_LIBRARIES openal)
208                 ENDIF(HAS_OPENAL)
209             ENDIF(HAVE_AL_AL_H)
210         ENDIF(APPLE)
211         IF(NOT HAS_OPENAL)
212             MESSAGE(FATAL_ERROR "OpenAL not found!")
213         ENDIF(NOT HAS_OPENAL)
214     ELSE(NOT OPENAL_FOUND)
215         INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIRS})
216         LINK_DIRECTORIES(${OPENAL_LIBRARY_DIRS})
217     ENDIF(NOT OPENAL_FOUND)
218 ENDIF(WIN32)
220 # SndFile support
221 IF(SNDFILE)
222     PKG_CHECK_MODULES(SNDFILE sndfile)
223     IF(NOT SNDFILE_FOUND)
224         CHECK_INCLUDE_FILE(sndfile.h HAVE_SNDFILE_H)
225         IF(HAVE_SNDFILE_H)
226             CHECK_SHARED_LIBRARY_EXISTS(sndfile sf_open "" HAVE_LIBSNDFILE)
227             CHECK_SHARED_LIBRARY_EXISTS(libsndfile-1 sf_open "" HAVE_LIBSNDFILE1)
228             IF(DYNLOAD OR HAVE_LIBSNDFILE OR HAVE_LIBSNDFILE1)
229                 SET(HAS_SNDFILE 1)
230                 IF(HAVE_LIBSNDFILE)
231                     SET(SNDFILE_LIBRARIES "sndfile")
232                 ELSEIF(HAVE_LIBSNDFILE1)
233                     SET(SNDFILE_LIBRARIES "libsndfile-1")
234                 ENDIF(HAVE_LIBSNDFILE)
235             ENDIF(DYNLOAD OR HAVE_LIBSNDFILE OR HAVE_LIBSNDFILE1)
236         ENDIF(HAVE_SNDFILE_H)
237     ELSE(NOT SNDFILE_FOUND)
238         SET(HAS_SNDFILE 1)
239         INCLUDE_DIRECTORIES(${SNDFILE_INCLUDE_DIRS})
240         LINK_DIRECTORIES(${SNDFILE_LIBRARY_DIRS})
241     ENDIF(NOT SNDFILE_FOUND)
242 ELSE(SNDFILE)
243     SET(SNDFILE_LIBRARIES "")
244 ENDIF(SNDFILE)
246 # Vorbis support
247 IF(VORBIS)
248     PKG_CHECK_MODULES(VORBISFILE vorbisfile)
249     IF(NOT VORBISFILE_FOUND)
250         CHECK_INCLUDE_FILE(vorbis/vorbisfile.h HAVE_VORBIS_VORBISFILE_H)
251         IF(HAVE_VORBIS_VORBISFILE_H)
252             CHECK_SHARED_LIBRARY_EXISTS(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
253             IF(DYNLOAD OR HAVE_LIBVORBISFILE)
254                 SET(HAS_VORBISFILE 1)
255                 IF(HAVE_LIBVORBISFILE)
256                     SET(VORBISFILE_LIBRARIES "vorbisfile")
257                 ENDIF(HAVE_LIBVORBISFILE)
258             ENDIF(DYNLOAD OR HAVE_LIBVORBISFILE)
259         ENDIF(HAVE_VORBIS_VORBISFILE_H)
260     ELSE(NOT VORBISFILE_FOUND)
261         SET(HAS_VORBISFILE 1)
262         INCLUDE_DIRECTORIES(${VORBISFILE_INCLUDE_DIRS})
263         LINK_DIRECTORIES(${VORBISFILE_LIBRARY_DIRS})
264     ENDIF(NOT VORBISFILE_FOUND)
265 ELSE(VORBIS)
266     SET(VORBISFILE_LIBRARIES "")
267 ENDIF(VORBIS)
269 # FLAC support
270 IF(FLAC)
271     #PKG_CHECK_MODULES(LIBFLAC flac)
272     #IF(NOT LIBFLAC_FOUND)
273         CHECK_INCLUDE_FILE(FLAC/all.h HAVE_FLAC_ALL_H)
274         IF(HAVE_FLAC_ALL_H)
275             CHECK_SHARED_LIBRARY_EXISTS(FLAC FLAC__stream_decoder_new "" HAVE_LIBFLAC)
276             IF(DYNLOAD OR HAVE_LIBFLAC)
277                 SET(HAS_FLAC 1)
278                 IF(HAVE_LIBFLAC)
279                     SET(LIBFLAC_LIBRARIES "FLAC")
280                 ENDIF(HAVE_LIBFLAC)
281             ENDIF(DYNLOAD OR HAVE_LIBFLAC)
282         ENDIF(HAVE_FLAC_ALL_H)
283     #ELSE(NOT LIBFLAC)
284     #    SET(HAS_FLAC 1)
285     #    INCLUDE_DIRECTORIES(${LIBFLAC_INCLUDE_DIRS})
286     #    LINK_DIRECTORIES(${LIBFLAC_LIBRARY_DIRS})
287     #ENDIF(NOT LIBFLAC_FOUND)
288 ELSE(FLAC)
289     SET(LIBFLAC_LIBRARIES "")
290 ENDIF(FLAC)
292 # MPG123 support
293 IF(MPG123)
294     PKG_CHECK_MODULES(MPG123 libmpg123)
295     IF(NOT MPG123_FOUND)
296         CHECK_INCLUDE_FILE(mpg123.h HAVE_MPG123_H)
297         IF(HAVE_MPG123_H)
298             CHECK_SHARED_LIBRARY_EXISTS(mpg123 mpg123_init "" HAVE_LIBMPG123)
299             IF(DYNLOAD OR HAVE_LIBMPG123)
300                 SET(HAS_MPG123 1)
301                 IF(HAVE_LIBMPG123)
302                     SET(MPG123_LIBRARIES "mpg123")
303                 ENDIF(HAVE_LIBMPG123)
304             ENDIF(DYNLOAD OR HAVE_LIBMPG123)
305         ENDIF(HAVE_MPG123_H)
306     ELSE(NOT MPG123_FOUND)
307         SET(HAS_MPG123 1)
308         INCLUDE_DIRECTORIES(${MPG123_INCLUDE_DIRS})
309         LINK_DIRECTORIES(${MPG123_LIBRARY_DIRS})
310     ENDIF(NOT MPG123_FOUND)
311 ELSE(MPG123)
312     SET(MPG123_LIBRARIES "")
313 ENDIF(MPG123)
315 # DUMB support
316 IF(DUMB)
317     CHECK_INCLUDE_FILE(dumb.h HAVE_DUMB_H)
318     IF(HAVE_DUMB_H)
319         IF(HAS_LIBM)
320             CHECK_SHARED_LIBRARY_EXISTS("dumb;m" dumbfile_open_ex "" HAVE_LIBDUMB)
321         ELSE(HAS_LIBM)
322             CHECK_SHARED_LIBRARY_EXISTS(dumb dumbfile_open_ex "" HAVE_LIBDUMB)
323         ENDIF(HAS_LIBM)
324         IF(DYNLOAD OR HAVE_LIBDUMB)
325             SET(HAS_DUMB 1)
326             IF(HAVE_LIBDUMB)
327                 SET(DUMB_LIBRARIES dumb)
328             ENDIF(HAVE_LIBDUMB)
329         ENDIF(DYNLOAD OR HAVE_LIBDUMB)
330     ENDIF(HAVE_DUMB_H)
331 ELSE(DUMB)
332     SET(DUMB_LIBRARIES "")
333 ENDIF(DUMB)
336 IF(NOT DYNLOAD)
337     SET(EXTRA_LIBS ${SNDFILE_LIBRARIES} ${VORBISFILE_LIBRARIES} ${LIBFLAC_LIBRARIES} ${MPG123_LIBRARIES} ${DUMB_LIBRARIES} ${EXTRA_LIBS})
338 ELSE(NOT DYNLOAD)
339     ADD_DEFINITIONS(-DDYNLOAD=1)
340 ENDIF(NOT DYNLOAD)
342 # For alure.pc.in
343 SET(prefix ${CMAKE_INSTALL_PREFIX})
344 SET(exec_prefix "\${prefix}")
345 SET(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
346 SET(bindir "\${exec_prefix}/bin")
347 SET(includedir "\${prefix}/include")
348 SET(PKG_CONFIG_REQUIRES openal)
349 SET(PACKAGE_VERSION "${LIB_VERSION}")
351 # End configuration
352 CONFIGURE_FILE(
353     "${ALURE_SOURCE_DIR}/config.h.in"
354     "${ALURE_BINARY_DIR}/config.h")
355 CONFIGURE_FILE(
356     "${ALURE_SOURCE_DIR}/alure.pc.in"
357     "${ALURE_BINARY_DIR}/alure.pc"
358     @ONLY)
360 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
363 SET(ALURE_OBJS  src/alure.cpp
364                 src/buffer.cpp
365                 src/istream.cpp
366                 src/stream.cpp
367                 src/streamdec.cpp
368                 src/streamplay.cpp
371 IF(BUILD_SHARED)
372     #build a shared library
373     ADD_LIBRARY(${LIBNAME} SHARED ${ALURE_OBJS})
374     SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES DEFINE_SYMBOL ALURE_BUILD_LIBRARY
375                                                 VERSION ${LIB_VERSION}
376                                                 SOVERSION ${LIB_MAJOR_VERSION})
377     IF(WIN32)
378         SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES PREFIX "")
379     ENDIF(WIN32)
380     TARGET_LINK_LIBRARIES(${LIBNAME} ${OPENAL_LIBRARIES} ${EXTRA_LIBS})
382     INSTALL(TARGETS ${LIBNAME}
383             RUNTIME DESTINATION bin
384             LIBRARY DESTINATION lib${LIB_SUFFIX}
385             ARCHIVE DESTINATION lib${LIB_SUFFIX}
387 ENDIF(BUILD_SHARED)
388 IF(BUILD_STATIC)
389     #build a static library
390     ADD_LIBRARY(${LIBNAME}-static STATIC ${ALURE_OBJS})
391     SET_TARGET_PROPERTIES(${LIBNAME}-static PROPERTIES DEFINE_SYMBOL ALURE_BUILD_LIBRARY
392                                                        COMPILE_FLAGS -DALURE_STATIC_LIBRARY
393                                                        VERSION ${LIB_VERSION})
394     INSTALL(TARGETS ${LIBNAME}-static
395             RUNTIME DESTINATION bin
396             LIBRARY DESTINATION lib${LIB_SUFFIX}
397             ARCHIVE DESTINATION lib${LIB_SUFFIX}
399 ENDIF(BUILD_STATIC)
402 ADD_EXECUTABLE(alureplay examples/alureplay.c)
403 ADD_EXECUTABLE(alurestream examples/alurestream.c)
404 IF(BUILD_SHARED)
405     TARGET_LINK_LIBRARIES(alureplay ${LIBNAME} ${OPENAL_LIBRARIES} ${EXTRA_LIBS})
406     TARGET_LINK_LIBRARIES(alurestream ${LIBNAME} ${OPENAL_LIBRARIES} ${EXTRA_LIBS})
407 ELSE(BUILD_SHARED)
408     TARGET_LINK_LIBRARIES(alureplay ${LIBNAME}-static ${OPENAL_LIBRARIES} ${EXTRA_LIBS})
409     TARGET_LINK_LIBRARIES(alurestream ${LIBNAME}-static ${OPENAL_LIBRARIES} ${EXTRA_LIBS})
410 ENDIF(BUILD_SHARED)
413 FIND_PROGRAM(NATDOCS_BIN NaturalDocs)
414 IF(NATDOCS_BIN)
415     ADD_CUSTOM_TARGET(docs
416                       "${NATDOCS_BIN}" -i "${ALURE_SOURCE_DIR}/src" -o HTML "${ALURE_SOURCE_DIR}/docs/html" -p "${ALURE_SOURCE_DIR}/docs/naturaldocs" -s Default CustomStyle
417                       COMMENT "Building NaturalDocs documentation..." VERBATIM)
418 ELSE(NATDOCS_BIN)
419     MESSAGE(STATUS "\nNaturalDocs not found; building documentation is disabled")
420 ENDIF(NATDOCS_BIN)
423 #add an install target here
424 IF(APPLE)
425     SET(INCPATH OpenAL)
426 ELSE(APPLE)
427     SET(INCPATH AL)
428 ENDIF(APPLE)
430 INSTALL(DIRECTORY "${ALURE_SOURCE_DIR}/docs/html"
431         DESTINATION share/doc/alure
433 INSTALL(FILES include/AL/alure.h
434         DESTINATION "include/${INCPATH}"
436 INSTALL(FILES "${ALURE_BINARY_DIR}/alure.pc"
437         DESTINATION "lib${LIB_SUFFIX}/pkgconfig"
441 MESSAGE(STATUS "\n********************** Configured options **********************")
442 IF(BUILD_SHARED AND BUILD_STATIC)
443     MESSAGE(STATUS "Building shared, static library")
444 ELSEIF(BUILD_SHARED)
445     MESSAGE(STATUS "Building shared library")
446 ELSE(BUILD_SHARED AND BUILD_STATIC)
447     MESSAGE(STATUS "Building static library")
448 ENDIF(BUILD_SHARED AND BUILD_STATIC)
449 MESSAGE(STATUS "")
450 IF(HAS_SNDFILE)
451     MESSAGE(STATUS "SndFile support: enabled")
452 ELSE(HAS_SNDFILE)
453     MESSAGE(STATUS "SndFile support: disabled")
454 ENDIF(HAS_SNDFILE)
455 IF(HAS_VORBISFILE)
456     MESSAGE(STATUS "VorbisFile support: enabled")
457 ELSE(HAS_VORBISFILE)
458     MESSAGE(STATUS "VorbisFile support: disabled")
459 ENDIF(HAS_VORBISFILE)
460 IF(HAS_FLAC)
461     MESSAGE(STATUS "FLAC support: enabled")
462 ELSE(HAS_FLAC)
463     MESSAGE(STATUS "FLAC support: disabled")
464 ENDIF(HAS_FLAC)
465 IF(HAS_MPG123)
466     MESSAGE(STATUS "MPG123 support: enabled")
467 ELSE(HAS_MPG123)
468     MESSAGE(STATUS "MPG123 support: disabled")
469 ENDIF(HAS_MPG123)
470 IF(HAS_DUMB)
471     MESSAGE(STATUS "DUMB support: enabled")
472 ELSE(HAS_DUMB)
473     MESSAGE(STATUS "DUMB support: disabled")
474 ENDIF(HAS_DUMB)
475 MESSAGE(STATUS "")