diff --git a/configure.ac b/configure.ac index 03f8a8095..aa2289bac 100644 --- a/configure.ac +++ b/configure.ac @@ -34,8 +34,13 @@ if test "$TREMOR" = "yes"; then TUXBOX_APPS_LIB_PKGCONFIG(VORBISIDEC,vorbisidec) AC_DEFINE(USE_TREMOR,1,use libvorbisidec/tremor library) fi + +if test "$TREMOR_STATIC" = "yes"; then + # hack to get the static lib location from the pkg-config data + VORBISIDEC_LIBS="$(echo $VORBISIDEC_LIBS | sed 's@-L@@; s@ -l.*@/libvorbisidec.a@;')" +fi + AM_CONDITIONAL(USE_TREMOR, test "$TREMOR" = "yes") -AM_CONDITIONAL(USE_TREMOR_STATIC, test "$TREMOR_STATIC" = "yes") TUXBOX_APPS_LIB_CONFIG(CURL,curl-config) TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config) diff --git a/src/Makefile.am b/src/Makefile.am index 6001aa602..5d416bcbb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,14 +25,7 @@ INCLUDES += -I$(top_srcdir)/lib/libtriple endif if USE_TREMOR -if USE_TREMOR_STATIC -# i feel a guilty pleasure for those ugly hacks... -VORBISLIBS_TMP1 = $(subst -L,,@VORBISIDEC_LIBS@) -VORBISLIBS_TMP2 = $(subst -lvorbisidec,,$(VORBISLIBS_TMP1)) -VORBISLIBS = $(strip $(VORBISLIBS_TMP2))/libvorbisidec.a -else VORBISLIBS = @VORBISIDEC_LIBS@ -endif else VORBISLIBS = -lvorbisfile -lvorbis -logg endif