Skip to content

Commit

Permalink
Do not use taglib-config.
Browse files Browse the repository at this point in the history
Instead, make use of pkg-config unconditionally, since it's pretty much
available everywhere.

Besides, taglib-config does not distinguish from the archive to link
with and a path to search it for, which would all be (wrongly) picked up
by the LDFLAGS variable, because file related options matter to the
linker (the archives must be listed after the object files).

This was prompted by Jasen Price (issue #34). Upcoming commit will
really fix this.
  • Loading branch information
Tiago Cunha committed Jan 29, 2013
1 parent df525b7 commit 8e58405
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,20 @@ echo
/bin/echo -n "CHECKING BUILD DEPENDENCY: TagLib... "
HaveTaglib=0

# Prefer taglib-config, try that first
if [[ 0 -eq ${HaveTaglib} ]];
# Check for taglib
result=`which pkg-config > /dev/null 2>&1`
if [[ 0 -eq $? ]];
then
result=`which taglib-config > /dev/null 2>&1`
if [[ 0 -eq $? ]];
result=`pkg-config --exists taglib`
if [[ "$?" == "0" ]];
then
echo "FOUND (via taglib-config)"
echo "FOUND"
HaveTaglib=1
TAGLIB_BLOCK="
# taglib library detected by taglib-config
TAGLIB_CFLAGS=\`taglib-config --cflags\`
TAGLIB_LDFLAGS=\`taglib-config --libs\` -ltag_c
"
fi
fi

# Try pkg-config
if [[ 0 -eq ${HaveTaglib} ]];
then
result=`which pkg-config > /dev/null 2>&1`
if [[ 0 -eq $? ]];
then
result=`pkg-config --exists taglib`
if [[ "$?" == "0" ]];
then
echo "FOUND (via pkg-config)"
HaveTaglib=1
TAGLIB_BLOCK="
# taglib library detected by pkg-config
TAGLIB_CFLAGS=\`pkg-config taglib --cflags\`
TAGLIB_LDFLAGS=\`pkg-config taglib --libs\` -ltag_c
"
fi
fi
fi

Expand Down

0 comments on commit 8e58405

Please sign in to comment.