Fix undefined references in namehint.c

Fixed undefined references in namehint.c when not all components are
selected via configure options.
This commit is contained in:
Takashi Iwai 2007-07-03 20:22:21 +02:00
parent e4c80614e9
commit 40415cd180
2 changed files with 9 additions and 0 deletions

View file

@ -358,6 +358,9 @@ fi
if test "$build_rawmidi" = "yes"; then
AC_DEFINE([BUILD_RAWMIDI], "1", [Build raw MIDI component])
fi
if test "$build_hwdep" = "yes"; then
AC_DEFINE([BUILD_HWDEP], "1", [Build hwdep component])
fi
if test "$build_seq" = "yes"; then
AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
fi

View file

@ -90,6 +90,7 @@ static int get_dev_name1(struct hint_list *list, char **res)
if (list->device < 0)
return 0;
switch (list->iface) {
#ifdef BUILD_HWDEP
case SND_CTL_ELEM_IFACE_HWDEP:
{
snd_hwdep_info_t *info;
@ -100,6 +101,8 @@ static int get_dev_name1(struct hint_list *list, char **res)
*res = strdup(snd_hwdep_info_get_name(info));
return 0;
}
#endif
#ifdef BUILD_PCM
case SND_CTL_ELEM_IFACE_PCM:
{
snd_pcm_info_t *info;
@ -118,6 +121,8 @@ static int get_dev_name1(struct hint_list *list, char **res)
*res = strdup(snd_pcm_info_get_name(info));
return 0;
}
#endif
#ifdef BUILD_RAWMIDI
case SND_CTL_ELEM_IFACE_RAWMIDI:
{
snd_rawmidi_info_t *info;
@ -129,6 +134,7 @@ static int get_dev_name1(struct hint_list *list, char **res)
*res = strdup(snd_rawmidi_info_get_name(info));
return 0;
}
#endif
default:
return 0;
}