diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index b09bd19bab..d21731fb8c 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro @@ -29,12 +29,12 @@ RBBASE_DIR = $$replace(RBBASE_DIR,/rbutil/rbutilqt,) message("Rockbox Base dir: "$$RBBASE_DIR) -# check for system speex. Add a custom rule for pre-building librbspeex if not found. -LIBSPEEX = $$system(pkg-config --silence-errors --libs speex) +# check for system speex. Add a custom rule for pre-building librbspeex if not +# found. Newer versions of speex are split up into libspeex and libspeexdsp, +# and some distributions package them separately. Check for both and fall back +# to librbspeex if not found. +LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp) !static:!isEmpty(LIBSPEEX) { - # newer versions of speex are split up into libspeex and libspeexdsp. - # avoid checking twice if libspeex is missing. - LIBSPEEX += $$system(pkg-config --silence-errors --libs speexdsp) LIBS += $$LIBSPEEX } # custom rules for rockbox-specific libs diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile index 6385c8a869..780fff2472 100644 --- a/tools/rbspeex/Makefile +++ b/tools/rbspeex/Makefile @@ -29,10 +29,7 @@ endif # don't try to use the systems libspeex when building a static binary. ifndef STATIC -SYS_SPEEX = $(shell pkg-config --silence-errors --libs speex) -ifneq ($(SYS_SPEEX),) -SYS_SPEEX += $(shell pkg-config --silence-errors --libs speexdsp) -endif +SYS_SPEEX = $(shell pkg-config --silence-errors --libs speex speexdsp) endif # fall back to our own librbspeex if no suitable found.