Skip to content
Snippets Groups Projects
Commit b7dd7b56 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use pkg-config for alsa.

Don't go digging around in the filesystem when you don't have to.
parent e8e32079
No related branches found
No related tags found
No related merge requests found
Pipeline #7778 passed
...@@ -205,7 +205,6 @@ endif ...@@ -205,7 +205,6 @@ endif
ifndef WITHOUT_PORTAUDIO ifndef WITHOUT_PORTAUDIO
PORTAUDIO_PATH ?= $(shell if [ -f /usr/local/include/portaudio.h ]; then echo /usr/local ; elif [ -f /usr/include/portaudio.h ] ; then echo /usr ; else echo NOTFOUND ; fi) PORTAUDIO_PATH ?= $(shell if [ -f /usr/local/include/portaudio.h ]; then echo /usr/local ; elif [ -f /usr/include/portaudio.h ] ; then echo /usr ; else echo NOTFOUND ; fi)
ifneq ($(PORTAUDIO_PATH),NOTFOUND) ifneq ($(PORTAUDIO_PATH),NOTFOUND)
XPDEV_CFLAGS += -DWITH_PORTAUDIO XPDEV_CFLAGS += -DWITH_PORTAUDIO
ifeq ($(os),linux) ifeq ($(os),linux)
...@@ -214,18 +213,16 @@ ifndef WITHOUT_PORTAUDIO ...@@ -214,18 +213,16 @@ ifndef WITHOUT_PORTAUDIO
endif endif
endif endif
endif endif
ifndef win ifndef win
ifndef WITHOUT_ALSA_SOUND ifndef WITHOUT_ALSA_SOUND
ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES) ifeq ($(shell command -v pkg-config > /dev/null && pkg-config --exists alsa && echo 'YES'),YES)
XPDEV-MT_CFLAGS += -DUSE_ALSA_SOUND XPDEV-MT_CFLAGS += -DUSE_ALSA_SOUND `pkg-config alsa --cflags`
XPDEV-MT_LIBS += -ldl ifeq ($(os),linux)
else XPDEV-MT_LIBS += -ldl
ifeq ($(shell if [ -f /usr/local/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES) endif
XPDEV-MT_CFLAGS += -DUSE_ALSA_SOUND endif
XPDEV-MT_LIBS += -ldl endif
endif
endif
endif
endif endif
ifndef NO_PULSEAUDIO ifndef NO_PULSEAUDIO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment