[Originally posted to the Debian Bug Tracking System (BTS) by Thibaut VARENE <varenet@debian.org>: <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579025>]
In /usr/share/aclocal/libFLAC.m4:
if test "x$libFLAC_libraries" != "x" ; then
LIBFLAC_LIBDIR="$libFLAC_libraries"
elif test "x$libFLAC_prefix" != "x" ; then
LIBFLAC_LIBDIR="$libFLAC_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
LIBFLAC_LIBDIR="$libdir"
fi
LIBFLAC_LIBS="-L$LIBFLAC_LIBDIR -lFLAC $OGG_LIBS -lm"
In configure.ac, the usual:
AM_PATH_LIBFLAC( [], [echo "*****Coun't find FLAC library, disabling FLAC
support"; flac=false])
Result in Makefile when configure is called without arguments:
LIBFLAC_LIBS = -L -lFLAC -lm
Triggers the following error during build (at link time):
libtool: link: require no space between `-L' and `-lFLAC'
Fix: see /usr/share/aclocal/vorbis.m4 (from libvorbis-dev):
if test "x$vorbis_libraries" != "x" ; then
VORBIS_LIBS="-L$vorbis_libraries"
elif test "x$vorbis_prefix" = "xno" || test "x$vorbis_prefix" = "xyes" ;
then
VORBIS_LIBS=""
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_LIBS="-L$vorbis_prefix/lib"
elif test "x$prefix" != "xNONE"; then
VORBIS_LIBS="-L$prefix/lib"
fi
if test "x$vorbis_prefix" != "xno" ; then
VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
fi
This bug actually prevents packages using AM_PATH_LIBFLAC to build
HTH