summaryrefslogtreecommitdiff
path: root/lang/mawk/patches
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-09-30 21:47:14 +0000
committerseb <seb@pkgsrc.org>2003-09-30 21:47:14 +0000
commita36cb52f042238b8f983670ef00d7984b24c7589 (patch)
tree598760f6aea1eb5e3b001f8abae005b696176cf7 /lang/mawk/patches
parent81617eaef32433f7b5db71aa4da1a3334ea6d548 (diff)
downloadpkgsrc-a36cb52f042238b8f983670ef00d7984b24c7589.tar.gz
Fix build with GCC 3.3.1: don't hunt for libm with log() but with floor().
While here set TEST_TARGET even if the submake all target includes the test ones.
Diffstat (limited to 'lang/mawk/patches')
-rw-r--r--lang/mawk/patches/patch-ac18
-rw-r--r--lang/mawk/patches/patch-ad76
2 files changed, 94 insertions, 0 deletions
diff --git a/lang/mawk/patches/patch-ac b/lang/mawk/patches/patch-ac
new file mode 100644
index 00000000000..89c2bcdd081
--- /dev/null
+++ b/lang/mawk/patches/patch-ac
@@ -0,0 +1,18 @@
+$NetBSD: patch-ac,v 1.1 2003/09/30 21:47:14 seb Exp $
+
+--- mawk.ac.m4.orig 1996-09-04 23:40:34.000000000 +0000
++++ mawk.ac.m4
+@@ -46,10 +46,10 @@ define(MIKE, brennan@whidbey.com)
+ dnl
+ define(LOOK_FOR_MATH_LIBRARY,[
+ if test "${MATHLIB+set}" != set ; then
+-AC_CHECK_LIB(m,log,[MATHLIB=-lm ; LIBS="$LIBS -lm"],
++AC_CHECK_LIB(m,floor,[MATHLIB=-lm ; LIBS="$LIBS -lm"],
+ [# maybe don't need separate math library
+-AC_CHECK_FUNC(log, log=yes)
+-if test "$log$" = yes
++AC_CHECK_FUNC(floor, floor=yes)
++if test "$floor$" = yes
+ then
+ MATHLIB='' # evidently don't need one
+ else
diff --git a/lang/mawk/patches/patch-ad b/lang/mawk/patches/patch-ad
new file mode 100644
index 00000000000..5518542c966
--- /dev/null
+++ b/lang/mawk/patches/patch-ad
@@ -0,0 +1,76 @@
+$NetBSD: patch-ad,v 1.1 2003/09/30 21:47:14 seb Exp $
+
+--- configure.orig 1996-09-04 23:43:01.000000000 +0000
++++ configure
+@@ -529,7 +529,7 @@ cat > conftest.$ac_ext <<EOF
+
+ int main() { return 0; }
+ int t() {
+-log()
++floor()
+ ; return 0; }
+ EOF
+ if eval $ac_link; then
+@@ -549,18 +549,18 @@ if eval "test \"`echo '$ac_cv_lib_'m`\"
+ else
+ echo "$ac_t""no" 1>&6
+ # maybe don't need separate math library
+-echo $ac_n "checking for log""... $ac_c" 1>&6
+-if eval "test \"`echo '$''{'ac_cv_func_log'+set}'`\" = set"; then
++echo $ac_n "checking for floor""... $ac_c" 1>&6
++if eval "test \"`echo '$''{'ac_cv_func_floor'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+ #line 558 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char log(); below. */
++ which can conflict with char floor(); below. */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error. */
+-char log();
++char floor();
+
+ int main() { return 0; }
+ int t() {
+@@ -568,32 +568,32 @@ int t() {
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_log) || defined (__stub___log)
++#if defined (__stub_floor) || defined (__stub___floor)
+ choke me
+ #else
+-log();
++floor();
+ #endif
+
+ ; return 0; }
+ EOF
+ if eval $ac_link; then
+ rm -rf conftest*
+- eval "ac_cv_func_log=yes"
++ eval "ac_cv_func_floor=yes"
+ else
+ rm -rf conftest*
+- eval "ac_cv_func_log=no"
++ eval "ac_cv_func_floor=no"
+ fi
+ rm -f conftest*
+
+ fi
+-if eval "test \"`echo '$ac_cv_func_'log`\" = yes"; then
++if eval "test \"`echo '$ac_cv_func_'floor`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+- log=yes
++ floor=yes
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+-if test "$log$" = yes
++if test "$floor$" = yes
+ then
+ MATHLIB='' # evidently don't need one
+ else