]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fix undefined references in namehint.c
authorTakashi Iwai <tiwai@suse.de>
Tue, 3 Jul 2007 18:22:21 +0000 (20:22 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 3 Jul 2007 18:22:21 +0000 (20:22 +0200)
Fixed undefined references in namehint.c when not all components are
selected via configure options.

configure.in
src/control/namehint.c

index 77ebdcdca99d20204afcc286e5a12d74a041d874..2952fc79f1db1d50d663d70fd45d71e072ca1472 100644 (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
index 4101134180b41eb4cd536b3c8965aa040c26b22e..7d843ba160e56a412b63aff1bee57fbed1fe5e50 100644 (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;
        }