# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1593544661 0 # Node ID 55c6587f269cf84569353a2a5b7a464c242a4ef1 # Parent 2fb132a1d1fa93187ba29e3f325ec0d6df507261 Mac: Add --with-sdk option to configure to specify an alternate MacOS SDK location. diff -r 2fb132a1d1fa -r 55c6587f269c configure --- a/configure Tue Jun 30 18:26:01 2020 +0000 +++ b/configure Tue Jun 30 19:17:41 2020 +0000 @@ -738,6 +738,7 @@ with_gtk2 with_deprecated with_arch +with_sdk with_x with_glib_prefix with_glib_exec_prefix @@ -1388,7 +1389,8 @@ --with-dwcompat specify this to build the optional dwcompat library --with-gtk2 specify this to build with GTK+ 2.x if available --with-deprecated specify this to build with deprecated functions - --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386 + --with-arch specify MacOS architecture: one of all, 32bit, 64bit, intel, arm, ppc, ppc64, x86_64, i386 + --with-sdk specify this to build with an alternate MacOS SDK location --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) @@ -3689,6 +3691,15 @@ +# Check whether --with-sdk was given. +if test "${with_sdk+set}" = set; then : + withval=$with_sdk; with_sdk=$withval +else + with_sdk=no +fi + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4643,6 +4654,13 @@ ARCH="-arch $with_arch" ;; esac + case "$with_sdk" in + no) + ;; + *) + CC="$CC -isysroot$with_sdk" + ;; + esac SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names" SOSUFFIX=dylib DW_DIR=mac diff -r 2fb132a1d1fa -r 55c6587f269c configure.in --- a/configure.in Tue Jun 30 18:26:01 2020 +0000 +++ b/configure.in Tue Jun 30 19:17:41 2020 +0000 @@ -64,11 +64,18 @@ dnl ---------------------- check for '--with-arch' switch ----------------- AC_ARG_WITH(arch, - [ --with-arch specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386], + [ --with-arch specify MacOS architecture: one of all, 32bit, 64bit, intel, arm, ppc, ppc64, x86_64, i386], [with_arch=$withval], [with_arch=no], ) +dnl ---------------------- check for '--with-sdk' switch ----------------- +AC_ARG_WITH(sdk, + [ --with-sdk specify this to build with an alternate MacOS SDK location], + [with_sdk=$withval], + [with_sdk=no], +) + AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS(unistd.h) @@ -141,6 +148,13 @@ ARCH="-arch $with_arch" ;; esac + case "$with_sdk" in + no) + ;; + *) + CC="$CC -isysroot$with_sdk" + ;; + esac SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names" SOSUFFIX=dylib DW_DIR=mac