Replace the tortuous test with PKG_CHECK_MODULES and hope it does the right thing.
Unified · Split
| @@ -479,12 +479,9 @@ if test "$GCC" = "yes"; then · 478 unmodified lines | ||
| 479 | 479 | fi |
| 480 | 480 | |
| 481 | 481 | |
| 482 | −# Check for FLAC libraries | |
| 483 | −# Note passing in OGG_VORBIS_LIBS. That is because FLAC has optional | |
| 484 | −# support for OGG and if OGG libraries are found on this | |
| 485 | −# system then its highly likely to be compiled into FLAC | |
| 486 | −# and will require these at link time. | |
| 487 | −AC_OPTIONAL_FORMAT(flac, FLAC, [AC_CHECK_HEADER(FLAC/all.h, [AC_CHECK_DECL(FLAC_API_VERSION_CURRENT, [AC_CHECK_LIB(FLAC, FLAC__stream_encoder_new, FLAC_LIBS="-lFLAC $FLAC_LIBS $OGG_VORBIS_LIBS",using_flac=no, $FLAC_LIBS $OGG_VORBIS_LIBS)], using_flac=no, [#include <FLAC/all.h>])], using_flac=no)], using_flac=no) | |
| 482 | +dnl Check for FLAC library | |
| 483 | +AC_OPTIONAL_FORMAT(flac, FLAC, | |
| 484 | + [PKG_CHECK_MODULES([FLAC], [flac], [], [using_flac=no])]) | |
| 488 | 485 | |
| 489 | 486 | |
| 490 | 487 | dnl When enable_dl_amrbw, do not let add libraries to be linked in |