summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2020-05-18 13:17:22 (GMT)
committerGitHub <noreply@github.com>2020-05-18 13:17:22 (GMT)
commit0da546665075aefbb476e192ed64122d340164f4 (patch)
tree7b8ab1370800158880c8bbd210ac36956c768ad7 /configure.ac
parentc444108dd62672f2b41539bcc8f15da44501f405 (diff)
downloadcpython-0da546665075aefbb476e192ed64122d340164f4.zip
cpython-0da546665075aefbb476e192ed64122d340164f4.tar.gz
cpython-0da546665075aefbb476e192ed64122d340164f4.tar.bz2
bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)
Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc. Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 497d7c1..d269c85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -663,6 +663,25 @@ AC_PROG_SED
AC_SUBST(CXX)
AC_SUBST(MAINCC)
+
+if test "$ac_sys_system" = "Darwin"
+then
+ # MacOSX requires an Objective C compiler to
+ # build some Mac-specific code.
+ AC_PROG_OBJC
+ AC_PROG_OBJCXX
+ AC_SUBST(OBJC)
+ AC_SUBST(OBJCXX)
+ SCPROXY=
+ NOSCPROXY=#
+else
+ SCPROXY=#
+ NOSCPROXY=
+fi
+
+AC_SUBST(SCPROXY)
+AC_SUBST(NOSCPROXY)
+
AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
AC_ARG_WITH(cxx_main,
AS_HELP_STRING([--with-cxx-main@<:@=COMPILER@:>@],