diff options
author | rumko <rumko> | 2011-12-29 16:19:25 +0000 |
---|---|---|
committer | rumko <rumko> | 2011-12-29 16:19:25 +0000 |
commit | b03494f7038742621d6d3be3a7ab7bb395c64964 (patch) | |
tree | 8e8f99338be25586cc8fa119b755075eb44dd6d8 /audio/libaudiofile | |
parent | 809c98ff29408869a3887a94e595e9b0af4c7d23 (diff) | |
download | pkgsrc-b03494f7038742621d6d3be3a7ab7bb395c64964.tar.gz |
Add configure check for libm
Fixes build for DragonFly BSD.
Provided by Matthias Rampke through PR pkg/45757
Diffstat (limited to 'audio/libaudiofile')
-rw-r--r-- | audio/libaudiofile/Makefile | 4 | ||||
-rw-r--r-- | audio/libaudiofile/distinfo | 5 | ||||
-rw-r--r-- | audio/libaudiofile/patches/patch-configure | 70 | ||||
-rw-r--r-- | audio/libaudiofile/patches/patch-configure.ac | 16 |
4 files changed, 83 insertions, 12 deletions
diff --git a/audio/libaudiofile/Makefile b/audio/libaudiofile/Makefile index 0ad4ea49227..9d629ec2506 100644 --- a/audio/libaudiofile/Makefile +++ b/audio/libaudiofile/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.53 2011/12/22 07:47:43 sbd Exp $ +# $NetBSD: Makefile,v 1.54 2011/12/29 16:19:25 rumko Exp $ DISTNAME= audiofile-0.3.2 PKGNAME= lib${DISTNAME} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= audio MASTER_SITES= http://www.68k.org/~michael/audiofile/ diff --git a/audio/libaudiofile/distinfo b/audio/libaudiofile/distinfo index e19de6baf85..d8c95c26921 100644 --- a/audio/libaudiofile/distinfo +++ b/audio/libaudiofile/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.18 2011/11/30 20:52:46 wiz Exp $ +$NetBSD: distinfo,v 1.19 2011/12/29 16:19:25 rumko Exp $ SHA1 (audiofile-0.3.2.tar.gz) = fb55a3c9153475daa8932d3626797e033d149c1d RMD160 (audiofile-0.3.2.tar.gz) = b55598dd1d5a960599b485c966ef39dda2384c40 Size (audiofile-0.3.2.tar.gz) = 722101 bytes -SHA1 (patch-configure) = 4e45468433bd0ee11b907ad117938f24b6a2b798 +SHA1 (patch-configure) = 947b6bd6981685ba6aaf978c23c898824c7fe117 +SHA1 (patch-configure.ac) = 50051941f2b7096af0e432f7252c56cda29a430e diff --git a/audio/libaudiofile/patches/patch-configure b/audio/libaudiofile/patches/patch-configure index 9fcd6635a31..51b711bbf95 100644 --- a/audio/libaudiofile/patches/patch-configure +++ b/audio/libaudiofile/patches/patch-configure @@ -1,11 +1,65 @@ -$NetBSD: patch-configure,v 1.3 2011/11/30 20:52:46 wiz Exp $ +$NetBSD: patch-configure,v 1.4 2011/12/29 16:19:25 rumko Exp $ Fix unportable test(1) construct. Accepted by upstream, will be in next release. ---- configure.orig 2011-11-29 18:15:23.000000000 +0000 +Check for libm so it is included if need be. + +--- configure.orig 2011-12-29 13:09:11.633992000 +0000 +++ configure -@@ -15246,7 +15246,7 @@ else +@@ -14689,6 +14689,51 @@ fi + + done + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 ++$as_echo_n "checking for sqrt in -lm... " >&6; } ++if ${ac_cv_lib_m_sqrt+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lm $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char sqrt (); ++int ++main () ++{ ++return sqrt (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_m_sqrt=yes ++else ++ ac_cv_lib_m_sqrt=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 ++$as_echo "$ac_cv_lib_m_sqrt" >&6; } ++if test "x$ac_cv_lib_m_sqrt" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBM 1 ++_ACEOF ++ ++ LIBS="-lm $LIBS" ++ ++fi ++ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 + $as_echo_n "checking for an ANSI C-conforming const... " >&6; } +@@ -15246,7 +15291,7 @@ else enable_werror=no fi @@ -14,7 +68,7 @@ Accepted by upstream, will be in next release. ENABLE_WERROR_TRUE= ENABLE_WERROR_FALSE='#' else -@@ -15255,7 +15255,7 @@ else +@@ -15255,7 +15300,7 @@ else fi @@ -23,7 +77,7 @@ Accepted by upstream, will be in next release. WERROR_CFLAGS="-Werror" fi -@@ -15267,7 +15267,7 @@ else +@@ -15267,7 +15312,7 @@ else enable_coverage=no fi @@ -32,7 +86,7 @@ Accepted by upstream, will be in next release. ENABLE_COVERAGE_TRUE= ENABLE_COVERAGE_FALSE='#' else -@@ -15276,7 +15276,7 @@ else +@@ -15276,7 +15321,7 @@ else fi @@ -41,7 +95,7 @@ Accepted by upstream, will be in next release. COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage" COVERAGE_LIBS="-lgcov" -@@ -15380,7 +15380,7 @@ else +@@ -15380,7 +15425,7 @@ else enable_valgrind=no fi @@ -50,7 +104,7 @@ Accepted by upstream, will be in next release. ENABLE_VALGRIND_TRUE= ENABLE_VALGRIND_FALSE='#' else -@@ -15389,7 +15389,7 @@ else +@@ -15389,7 +15434,7 @@ else fi diff --git a/audio/libaudiofile/patches/patch-configure.ac b/audio/libaudiofile/patches/patch-configure.ac new file mode 100644 index 00000000000..b0b319ce6d4 --- /dev/null +++ b/audio/libaudiofile/patches/patch-configure.ac @@ -0,0 +1,16 @@ +$NetBSD: patch-configure.ac,v 1.1 2011/12/29 16:19:25 rumko Exp $ + +Check for libm so it is included if need be. + +--- configure.ac.orig 2011-11-29 06:55:00.000000000 +0000 ++++ configure.ac +@@ -22,6 +22,9 @@ dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS(fcntl.h unistd.h) + ++dnl Checks for libraries ++AC_CHECK_LIB([m],[sqrt]) ++ + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + AC_C_BIGENDIAN |