Discussion:
[PATCH 01/17] configure: fix FLAC include path
Johannes Weißl
2011-05-05 15:20:01 UTC
Permalink
pkg-config outputs e.g. -I/usr/pkg/include/FLAC, but programs using flac
are supposed to include e.g. <FLAC/export.h>. This patch strips the
wrong "FLAC" suffix from the include path.

Upstream bugreport:
http://lists.xiph.org/pipermail/flac-dev/2011-March/002943.html
---
configure | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 7e2773a..aa73669 100755
--- a/configure
+++ b/configure
@@ -146,7 +146,12 @@ check_mpc()

check_flac()
{
- pkg_config FLAC "flac" "" "-lFLAC -lm" && return 0
+ if pkg_config FLAC "flac" "" "-lFLAC -lm"
+ then
+ # Make sure the FLAC_CFLAGS value is sane, strip trailing '/FLAC'.
+ FLAC_CFLAGS=`echo $FLAC_CFLAGS | sed "s/FLAC$//"`
+ return 0
+ fi
check_library FLAC "" "-lFLAC -lvorbisfile -lm"
return $?
}
--
1.7.5
Loading...