$NetBSD: patch-configure,v 1.6 2018/05/27 15:24:32 tsutsui Exp $

Enable PIC on NetBSD, even on i386 to avoid text relocations.

--- configure.orig	2018-02-12 00:29:18.000000000 +0000
+++ configure
@@ -4940,6 +4940,7 @@ case $target_os in
         ;;
     netbsd)
         disable symver
+        enable pic
         oss_indev_extralibs="-lossaudio"
         oss_outdev_extralibs="-lossaudio"
         enabled gcc || check_ldflags -Wl,-zmuldefs
@@ -5360,10 +5361,13 @@ check_cc <<EOF && enable attribute_may_a
 union { int x; } __attribute__((may_alias)) x;
 EOF
 
-check_cc <<EOF || die "endian test failed"
-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
+check_exec <<EOF || enable bigendian
+int main()
+{
+ long one = 1;
+ return !(*((char *)(&one)));
+}
 EOF
-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
 check_cc <<EOF && enable const_nan
 #include <math.h>
