--- configure.orig	2012-06-06 21:58:57.000000000 +1000
+++ configure	2018-07-12 01:19:43.000000000 +1000
@@ -1022,8 +1022,6 @@
   --enable-profile        turn on profiling
   --enable-64bit          turn on 64bit build
   --enable-sfio           turn on sfio build
-  --enable-mac_legacy     build legacy (carbon, ...) binaries (Mac), unsupported
-  --enable-universal      build universal binaries (Mac), unsupported
   --enable-large_files    enable support for files large than 2GB
   --enable-xplink         xplink and dynamic linking (z/OS USS)
   --enable-tiffwrite      enable write support for tifflib
@@ -1044,7 +1042,6 @@
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-pdflibname=name  set file name of generated library default=pdf
   --with-libm=name        set math library option default=-lm
-  --with-macarch=architecture  Mac OSX architecture to build for, unsupported.
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
@@ -3658,37 +3655,7 @@
 	MATHLIB=""
 	with_gnu_ld=yes
 
-	# choose if we do a legacy build (carbon, ...)
-        # Check whether --enable-mac_legacy or --disable-mac_legacy was given.
-if test "${enable_mac_legacy+set}" = set; then
-  enableval="$enable_mac_legacy"
-  if test "$enableval" = "yes" ; then
-	    ENABLE_MAC_LEGACY="yes"
-	    PLATFORM_ID="MacOSX"
-	fi
-fi;
-
-	# selecet correct SDK for build
-	# and set min Mac Version we want to be compatible for
-	if test "$ENABLE_MAC_LEGACY" = "yes"; then
-	    CPPFLAGS="$CPPFLAGS -DPDF_MAC_LEGACY"
-	    DEVSDK="/Developer/SDKs/MacOSX10.4u.sdk"
-	    MAC_LDFLAGS="$MAC_LDFLAGS -mmacosx-version-min=10.2"
-	    # add Framework ApplicationServices
-	    LEGACY_ID="-10.4"
-	else
-	    case $ac_sys_vers in
-	    9.*)
-		DEVSDK="/Developer/SDKs/MacOSX10.5.sdk" ;;
-	    10.*)
-		DEVSDK="/Developer/SDKs/MacOSX10.6.sdk"
-	    ;;
-	    esac
-	fi
-	CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
 	LDFLAGS="$LDFLAGS -framework ApplicationServices"
-	MAC_CFLAGS="$MAC_CFLAGS -isysroot $DEVSDK"
-	MAC_LDFLAGS="$MAC_LDFLAGS -Wl,-syslibroot,$DEVSDK"
 
 	# set PLATFROM ID
 	# will be completed in pc_config.h (32/64 ppc/intel)
@@ -3699,85 +3666,6 @@
 	    PLATFORM="-DPDF_MAC_PLATFORM=\\\"\"Mac OS X$LEGACY_ID\"\\\"";;
 	esac
 
-	# Build Universal Binaries ?
-        # Check whether --enable-universal or --disable-universal was given.
-if test "${enable_universal+set}" = set; then
-  enableval="$enable_universal"
-  if test "$enableval" = "yes" ; then
-	    WITH_UNIVERSAL=yes
-	fi
-fi;
-
-	# set --arch flags
-
-# Check whether --with-macarch or --without-macarch was given.
-if test "${with_macarch+set}" = set; then
-  withval="$with_macarch"
-  MAC_ARCH="$withval"
-else
-  MAC_ARCH=default
-fi;
-	echo "$as_me:$LINENO: checking Mac build Architecture" >&5
-echo $ECHO_N "checking Mac build Architecture... $ECHO_C" >&6
-	case $MAC_ARCH in
-	    i386)
-		MAC_CFLAGS="$MAC_CFLAGS -arch i386"
-		MAC_LDFLAGS="$MAC_LDFLAGS -arch i386"
-	    ;;
-	    x86_64)
-		# we do 64 bit builds >= 10.5 only
-		case $ac_sys_vers in
-		9.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch x86_64"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch x86_64"
-		;;
-		10.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch x86_64"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch x86_64"
-		;;
-		esac
-	    ;;
-	    ppc)
-		# not on 10.6
-		case $ac_sys_vers in
-		8.*| 9.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch ppc"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch ppc"
-		;;
-		esac
-	    ;;
-	    ppc64)
-		# we do 64 bit builds on 10.5 only
-		case $ac_sys_vers in
-		9.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch ppc64"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch ppc64"
-		;;
-		esac
-	    ;;
-	    universal)
-		case $ac_sys_vers in
-		8.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch i386 -arch ppc"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch i386 -arch ppc"
-		;;
-		9.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch i386 -arch ppc -arch ppc64 -arch x86_64"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch i386 -arch ppc -arch ppc64 -arch x86_64"
-		;;
-		10.*)
-		    MAC_CFLAGS="$MAC_CFLAGS -arch i386 -arch x86_64"
-		    MAC_LDFLAGS="$MAC_LDFLAGS -arch i386 -arch x86_64"
-		;;
-		esac
-	    ;;
-	    *) echo"unknown architecture (--with-macarch)"
-	    ;;
-	esac
-
-
-	echo "$as_me:$LINENO: result: $MAC_CFLAGS $MAC_LDFLAGS" >&5
-echo "${ECHO_T}$MAC_CFLAGS $MAC_LDFLAGS" >&6
 	;;
 
         linux|Linux*)
@@ -19866,7 +19754,7 @@
 	if test "$PYTHONBIN" = "nope" ; then
 	    WITH_PYTHON=no
 	else
-	    PYTHONLIBDIR=`cat << EOF | python
+	    PYTHONLIBDIR=`cat << EOF | $PYTHONBIN
 import sys
 import string
 print string.join(filter(lambda x: -1 != string.find(x, 'dynload'), sys.path))
