diff configure.in @ 2220:4020bdb806dc

Mac: Add --with-minver option for specifying the minimum MacOS version. Also add a list of build recommendations for platform and feature support. So you can pick the broadest platform support with the features you desire.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 17 Dec 2020 02:44:49 +0000
parents 6cdb907755cb
children 5c981407b0f3
line wrap: on
line diff
--- a/configure.in	Wed Dec 16 05:59:11 2020 +0000
+++ b/configure.in	Thu Dec 17 02:44:49 2020 +0000
@@ -76,6 +76,13 @@
    [with_sdk=no],
 )
 
+dnl ---------------------- check for '--with-minver' switch -----------------
+AC_ARG_WITH(minver,
+   [  --with-minver           specify this to build with a minimum MacOS version],
+   [with_minver=$withval],
+   [with_minver=no],
+)
+
 AC_HEADER_STDC
 AC_HEADER_DIRENT
 AC_CHECK_HEADERS(unistd.h)
@@ -155,6 +162,14 @@
             CC="$CC -isysroot$with_sdk"
             ;;
       esac
+      case "$with_minver" in
+         no)
+            ;;
+         *)
+            CFLAGS="$CFLAGS -mmacosx-version-min=$with_minver"
+            LIBS="$LIBS -mmacosx-version-min=$with_minver"
+            ;;
+      esac
       SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names"
       SOSUFFIX=dylib
       DW_DIR=mac