1--- configure.orig 2023-06-06 18:00:27.000000000 -0400 2+++ configure 2023-12-31 18:27:23.031082000 -0500 3@@ -6786,7 +6786,7 @@ 4 # else 5 # error unknown platform triplet 6 # endif 7-#elif defined(__FreeBSD_kernel__) 8+#elif defined(__FreeBSD_kernel__) || defined(__MidnightBSD_kernel__) 9 # if defined(__LP64__) 10 x86_64-kfreebsd-gnu 11 # elif defined(__i386__) 12@@ -6844,8 +6844,10 @@ 13 MULTIARCH="" ;; #( 14 FreeBSD*) : 15 MULTIARCH="" ;; #( 16+ MidnightBSD*) : 17+ MULTIARCH="" ;; #( 18 *) : 19- MULTIARCH=$($CC --print-multiarch 2>/dev/null) 20+ MULTIARCH= 21 ;; 22 esac 23 24@@ -7389,7 +7391,7 @@ 25 PY3LIBRARY=libpython3.so 26 fi 27 ;; 28- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) 29+ MidnightBSD*|Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) 30 LDLIBRARY='libpython$(LDVERSION).so' 31 BLDLIBRARY='-L. -lpython$(LDVERSION)' 32 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} 33@@ -8336,7 +8338,7 @@ 34 35 if test "$Py_LTO" = 'true' ; then 36 case $CC in 37- *clang*) 38+ *clang*|cc) 39 LDFLAGS_NOLTO="-fno-lto" 40 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 41 printf %s "checking whether C compiler accepts -flto=thin... " >&6; } 42@@ -12181,7 +12183,7 @@ 43 Linux*|GNU*|QNX*|VxWorks*|Haiku*) 44 LDSHARED='$(CC) -shared' 45 LDCXXSHARED='$(CXX) -shared';; 46- FreeBSD*) 47+ MidnightBSD*|FreeBSD*) 48 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] 49 then 50 LDSHARED='$(CC) -shared' 51@@ -12272,7 +12274,7 @@ 52 CCSHARED="-fPIC" 53 54 fi;; 55- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; 56+ MidnightBSD*|FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; 57 Haiku*) CCSHARED="-fPIC";; 58 OpenUNIX*|UnixWare*) 59 if test "$GCC" = "yes" 60@@ -12331,7 +12333,7 @@ 61 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; 62 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; 63 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; 64- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) 65+ MidnightBSD*|FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) 66 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] 67 then 68 LINKFORSHARED="-Wl,--export-dynamic" 69@@ -14777,7 +14779,7 @@ 70 fi 71 72 case $ac_sys_system in #( 73- FreeBSD*) : 74+ MidnightBSD*|FreeBSD*) : 75 76 if test -n "$PKG_CONFIG" && \ 77 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 78@@ -26302,7 +26304,7 @@ 79 py_cv_module__scproxy=n/a 80 py_cv_module_nis=n/a 81 ;; #( 82- FreeBSD*) : 83+ MidnightBSD*|FreeBSD*) : 84 85 86 py_cv_module__scproxy=n/a 87