pkgsrc/devel/swig/patches/patch-configure
jaapb 427292a812 Updated package to fix PR pkg/47709 - didn't fix all of the pre-existing
pkglint errors, but the problem described in the problem report is fixed.
2013-08-02 13:24:10 +00:00

44 lines
2.1 KiB
Text

$NetBSD: patch-configure,v 1.1 2013/08/02 13:24:10 jaapb Exp $
Correctly detect MZScheme, and use proper test operators
--- configure.orig 2013-08-01 16:04:48.000000000 +0000
+++ configure
@@ -8187,7 +8187,13 @@ fi
if test -n "$MZSCHEME"; then
{ echo "$as_me:$LINENO: checking for MzScheme dynext object" >&5
echo $ECHO_N "checking for MzScheme dynext object... $ECHO_C" >&6; }
+MZDYNOBJ=`$MZSCHEME --eval '(begin (require dynext/link) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (printf "~a" x)) (expand-for-link-variant (current-standard-link-libraries)))))' 2>/dev/null`
+if test -f "$MZDYNOBJ"; then
+:
+else
+# older versions (3.72 approx and earlier)
MZDYNOBJ=`$MZSCHEME --mute-banner --version --eval '(begin (require (lib "link.ss" "dynext")) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (display x) (display " ")) ((current-make-standard-link-libraries)))) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (display x) (display " ")) (expand-for-link-variant (current-standard-link-libraries)))))'`
+fi
{ echo "$as_me:$LINENO: result: $MZDYNOBJ" >&5
echo "${ECHO_T}$MZDYNOBJ" >&6; }
fi
@@ -8805,19 +8811,19 @@ echo $ECHO_N "checking for Ocaml version
isolate_b_regex='\([0-9]\+\).*'
for ver_part in $nodots_a ; do
b_ver_part=`echo "$ver_b" | sed -e 's/'"$isolate_b_regex"'/\1/'`
- if test \( "$ver_part" -lt "$b_ver_part" \) -a \( "x$condition" == "xequal" \) ; then
+ if test \( "$ver_part" -lt "$b_ver_part" \) -a \( "x$condition" = "xequal" \) ; then
condition=less
- elif test \( "$ver_part" -gt "$b_ver_part" \) -a \( "x$condition" == "xequal" \) ; then
+ elif test \( "$ver_part" -gt "$b_ver_part" \) -a \( "x$condition" = "xequal" \) ; then
condition=greater
fi
isolate_b_regex='[0-9]\+\.'"$isolate_b_regex"
done
- if test "x$condition" == "xequal" ; then
+ if test "x$condition" = "xequal" ; then
:
- elif test "x$condition" == "xless" ; then
+ elif test "x$condition" = "xless" ; then
:
- elif test "x$condition" == "xgreater" ; then
+ elif test "x$condition" = "xgreater" ; then
OCAMLLOC=_loc
fi