freebsd-ports/audio/faac/files/patch-configure.in
Martin Wilke 18057130d3 1. fix portlint complaint about incorrect whitespace in CONFIGURE_ARGS
assignment
2. instead of unconditionally setting LIBS in CONFIGURE_ENV use automake logc
   to correctly set library dependencies for the case when external libmp4v2
   is used

Fix #2 also fixes build with non-base gcc: configure stage would pass LIBS
to all invocations of gcc and linking would fail because libmp4v2 is a C++
library, but non-base gcc (as opposed to g++) doesn't know where to look
for the correct libstdc++.

PR:		149765
Submitted by:	Andriy Gapon <avg@icyb.net.ua>
2011-03-18 09:44:41 +00:00

30 lines
1 KiB
Text

--- configure.in.orig 2010-08-18 15:41:30.584845747 +0300
+++ configure.in 2010-08-18 15:42:51.184443581 +0300
@@ -1,7 +1,7 @@
AC_PREREQ(2.50)
AC_INIT(FAAC, 1.28, faac-dev@lists.sourceforge.net)
AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(faac, 1.25)
AM_CONFIG_HEADER(config.h)
@@ -28,14 +28,17 @@ AC_CHECK_DECL(strcasecmp, MY_DEFINE(HAVE
AC_CHECK_LIB(gnugetopt, getopt_long)
AM_CONDITIONAL(WITH_MP4V2, false)
+AM_CONDITIONAL(WITH_EXT_MP4V2, false)
AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
external_mp4v2=no, -lstdc++),
- external_mp4v2=no, [#include <mp4.h>])
+ external_mp4v2=no, [#include <mp4v2/mp4v2.h>])
if test x$external_mp4v2 = xyes; then
AC_MSG_NOTICE([*** Building with external mp4v2 ***])
+ AM_CONDITIONAL(WITH_EXT_MP4V2, true)
+ MY_DEFINE(HAVE_LIBMP4V2)
else
if test x$WITHMP4V2 = xyes; then
AC_MSG_NOTICE([*** Building with internal mp4v2 ***])