diff configure @ 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	Wed Dec 16 05:59:11 2020 +0000
+++ b/configure	Thu Dec 17 02:44:49 2020 +0000
@@ -716,7 +716,6 @@
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -744,6 +743,7 @@
 with_deprecated
 with_arch
 with_sdk
+with_minver
 with_x
 with_glib_prefix
 with_glib_exec_prefix
@@ -811,7 +811,6 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1064,15 +1063,6 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1210,7 +1200,7 @@
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir runstatedir
+		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1363,7 +1353,6 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1412,6 +1401,7 @@
   --with-deprecated       specify this to build with deprecated functions
   --with-arch             specify MacOS architecture: one of modern, classic, 32bit, intel, arm, powerpc
   --with-sdk              specify this to build with an alternate MacOS SDK location
+  --with-minver           specify this to build with a minimum MacOS version
   --with-x                use the X Window System
   --with-glib-prefix=PFX  Prefix where GLIB is installed (optional)
   --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)
@@ -3728,6 +3718,15 @@
 
 
 
+# Check whether --with-minver was given.
+if test "${with_minver+set}" = set; then :
+  withval=$with_minver; with_minver=$withval
+else
+  with_minver=no
+fi
+
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4689,6 +4688,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