AM_CONDITIONAL([BUILD_PCM_PLUGIN_ASYM], [test x$build_pcm_asym = xyes])
AM_CONDITIONAL([BUILD_PCM_PLUGIN_IEC958], [test x$build_pcm_iec958 = xyes])
AM_CONDITIONAL([BUILD_PCM_PLUGIN_SOFTVOL], [test x$build_pcm_softvol = xyes])
+AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTERNAL], [test x$build_pcm_extplug = xyes -o x$build_pcm_ioplug = xyes])
AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTPLUG], [test x$build_pcm_extplug = xyes])
AM_CONDITIONAL([BUILD_PCM_PLUGIN_IOPLUG], [test x$build_pcm_ioplug = xyes])
AM_CONDITIONAL([BUILD_PCM_PLUGIN_MMAP_EMUL], [test x$build_pcm_mmap_emul = xyes])
test "$build_hwdep" = "yes" && echo "#include <alsa/hwdep.h>" >> include/asoundlib.h
echo "#include <alsa/control.h>" >> include/asoundlib.h
test "$build_mixer" = "yes" && echo "#include <alsa/mixer.h>" >> include/asoundlib.h
+test "$build_seq" = "yes" && echo "#include <alsa/ump_msg.h>" >> include/asoundlib.h
test "$build_seq" = "yes" && echo "#include <alsa/seq_event.h>" >> include/asoundlib.h
test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h
test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h
if BUILD_PCM_PLUGIN_RATE
alsainclude_HEADERS += pcm_rate.h
endif
-if BUILD_PCM_PLUGIN_EXTPLUG
-alsainclude_HEADERS += pcm_external.h pcm_extplug.h
-endif
-if BUILD_PCM_PLUGIN_IOPLUG
-if !BUILD_PCM_PLUGIN_EXTPLUG
-alsainclude_HEADERS += pcm_external.h
-endif
-alsainclude_HEADERS += pcm_ioplug.h
+if BUILD_PCM_PLUGIN_EXTERNAL
+# FIXME: pcm_external.h includes both pcm_extplug.h and pcm_ioplug.h
+alsainclude_HEADERS += pcm_external.h pcm_extplug.h pcm_ioplug.h
endif
+#if BUILD_PCM_PLUGIN_EXTPLUG
+#alsainclude_HEADERS += pcm_extplug.h
+#endif
+#if BUILD_PCM_PLUGIN_IOPLUG
+#alsainclude_HEADERS += pcm_ioplug.h
+#endif
endif
if BUILD_RAWMIDI
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/asoundef.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_ASOUNDEF_H
#define __ALSA_ASOUNDEF_H
#include <poll.h>
#include <errno.h>
#include <stdarg.h>
+#include <stdint.h>
+#include <time.h>
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_CONF_H
#define __ALSA_CONF_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/control.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_CONTROL_H
#define __ALSA_CONTROL_H
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+
#ifndef __ALSA_CONTROL_EXTERNAL_H
#define __ALSA_CONTROL_EXTERNAL_H
-#include "control.h"
+#ifndef __ASOUNDLIB_LOCAL
+#include <alsa/asoundlib.h>
+#endif
#ifdef __cplusplus
extern "C" {
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/error.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_ERROR_H
#define __ALSA_ERROR_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/global.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_GLOBAL_H_
#define __ALSA_GLOBAL_H_
-/* for timeval and timespec */
-#include <time.h>
-
#ifdef __cplusplus
extern "C" {
#endif
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/hwdep.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_HWDEP_H
#define __ALSA_HWDEP_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/input.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_INPUT_H
#define __ALSA_INPUT_H
#include <string.h>
#include <fcntl.h>
#include <assert.h>
+#include <stdint.h>
+/* for timeval and timespec */
+#include <time.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#elif defined(HAVE_SYS_ENDIAN_H)
#include "hwdep.h"
#include "control.h"
#include "mixer.h"
+#include "ump_msg.h"
#include "seq_event.h"
#include "seq.h"
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/mixer.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_MIXER_H
#define __ALSA_MIXER_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/input.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_OUTPUT_H
#define __ALSA_OUTPUT_H
-#include <stdarg.h>
-
#ifdef __cplusplus
extern "C" {
#endif
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/pcm.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_PCM_H
#define __ALSA_PCM_H
extern "C" {
#endif
-#include <stdint.h>
-
/**
* \defgroup PCM PCM Interface
* See the \ref pcm page for more details.
#ifndef __ALSA_PCM_EXTERNAL_H
#define __ALSA_PCM_EXTERNAL_H
-#include "pcm.h"
+#ifndef __ASOUNDLIB_LOCAL
+#include <alsa/asoundlib.h>
+#endif
#ifdef __cplusplus
extern "C" {
*
*/
+#ifndef __ALSA_PCM_EXTERNAL_H
+#warning "use #include <alsa/pcm_external.h>, <alsa/pcm_extplug.h> should not be used directly"
+#include <alsa/pcm_external.h>
+#endif
+
#ifndef __ALSA_PCM_EXTPLUG_H
#define __ALSA_PCM_EXTPLUG_H
*
*/
+#ifndef __ALSA_PCM_EXTERNAL_H
+#warning "use #include <alsa/pcm_external.h>, <alsa/pcm_ioplug.h> should not be used directly"
+#include <alsa/pcm_external.h>
+#endif
+
#ifndef __ALSA_PCM_IOPLUG_H
#define __ALSA_PCM_IOPLUG_H
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#error "use #include <alsa/asoundlib.h>, <alsa/pcm_old.h> should not be used directly"
+#endif
+
/*
* Old ALSA 0.9.x API
*/
#ifndef __ALSA_PCM_RATE_H
#define __ALSA_PCM_RATE_H
+#ifndef __ASOUNDLIB_LOCAL
+#include <alsa/asoundlib.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/rawmidi.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_RAWMIDI_H
#define __ALSA_RAWMIDI_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/seq.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_SEQ_H
#define __ALSA_SEQ_H
-#include "ump.h"
-
#ifdef __cplusplus
extern "C" {
#endif
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/seq_event.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_SEQ_EVENT_H
#define __ALSA_SEQ_EVENT_H
-#include "ump_msg.h"
-
/**
* \defgroup SeqEvents Sequencer Event Definitions
* Sequencer Event Definitions
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/seq_midi_event.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_SEQ_MIDI_EVENT_H
#define __ALSA_SEQ_MIDI_EVENT_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/seqmid.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_SEQMID_H
#define __ALSA_SEQMID_H
*
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/timer.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_TIMER_H
#define __ALSA_TIMER_H
* API library for ALSA rawmidi/UMP interface
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/ump.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_UMP_H
#define __ALSA_UMP_H
-#include "rawmidi.h"
-
#ifdef __cplusplus
extern "C" {
#endif
* API library for ALSA rawmidi/UMP interface
*/
+#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
+/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
+#warning "use #include <alsa/asoundlib.h>, <alsa/ump_msg.h> should not be used directly"
+#include <alsa/asoundlib.h>
+#endif
+
#ifndef __ALSA_UMP_MSG_H
#define __ALSA_UMP_MSG_H
-#include <stdint.h>
-
#ifdef __cplusplus
extern "C" {
#endif