cs configure: support SDK options

For example, enable a 32-bit Mac OS build.
This commit is contained in:
Matthew Flatt 2018-10-20 19:30:19 -06:00
parent 3591a685fc
commit de98529c13
12 changed files with 392 additions and 160 deletions

View File

@ -684,7 +684,7 @@ bundle-from-server:
$(USER_RACKET) -l setup/unixstyle-install bundle racket bundle/racket
$(USER_RACKET) -l setup/winstrip bundle/racket
$(USER_RACKET) -l setup/winvers-change bundle/racket
$(USER_RACKET) -l distro-build/unpack-collects $(UNPACK_COLLECTS_FLAGS) http://$(SVR_PRT)/$(SERVER_COLLECTS_PATH)
$(USER_RACKET) -l- distro-build/unpack-collects $(UNPACK_COLLECTS_FLAGS) http://$(SVR_PRT)/$(SERVER_COLLECTS_PATH)
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(REQUIRED_PKGS)
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(PKGS)
$(USER_RACKET) -l setup/unixstyle-install post-adjust "$(SOURCE_MODE)" "$(PKG_SOURCE_MODE)" racket bundle/racket

10
racket/src/ac/sdk_arg.m4 Normal file
View File

@ -0,0 +1,10 @@
AC_ARG_ENABLE(sdk, [ --enable-sdk=<path> use Mac OS 10.4 SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-sdk5=<path> use Mac OS 10.5 SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-sdk6=<path> use Mac OS 10.6 SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-ios=<path> use iOS SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-sysroot=<path> use sysroot directory (e.g., for Android)])
AC_ARG_ENABLE(xonx, [ --enable-xonx use Unix style (e.g., use Gtk) for Mac OS])
AC_ARG_ENABLE(macprefix, [ --enable-macprefix allow --prefix with a Mac OS install])
AC_ARG_ENABLE(libfw, [ --enable-libfw install Mac OS frameworks to /Library/Frameworks])
AC_ARG_ENABLE(userfw, [ --enable-userfw install Mac OS frameworks to ~/Library/Frameworks])
AC_ARG_ENABLE(mac64, [ --enable-mac64 allow 64-bit Mac OS build (enabled by default)], , enable_mac64=yes)

54
racket/src/ac/sdk_mac.m4 Normal file
View File

@ -0,0 +1,54 @@
if test "${enable_sdk}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
need_cpp_in_extras=yes
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
need_ld_in_extras=yes
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
need_cc_in_extras=yes
if test "$ORIG_CC_FOR_BUILD" = "" ; then
CC_FOR_BUILD="$CC"
fi
fi
if test "${enable_sdk5}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk5} -mmacosx-version-min=10.5"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk5} -mmacosx-version-min=10.5"
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
if test "${enable_sdk6}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk6} -mmacosx-version-min=10.6"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk6} -mmacosx-version-min=10.6"
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
# Force 32-bit build unless mac64 is enabled:
if test "${enable_mac64}" != "yes" ; then
if test "$host_cpu" != "powerpc" ; then
if test "${ORIG_CC}" = "" ; then
PREFLAGS="${PREFLAGS} -m32"
CPPFLAGS="${CPPFLAGS} -m32"
LDFLAGS="${LDFLAGS} -m32"
# To make the libffi build work, we have to fold -m32 into CC
# instead of CFLAGS:
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
need_cc_in_extras=no
fi
fi
fi

39
racket/src/ac/sdk_show.m4 Normal file
View File

@ -0,0 +1,39 @@
show_explicitly_disabled "${enable_mac64}" "64-bit Mac OS"
show_explicitly_enabled "${enable_libfw}" "Frameworks-to-system"
show_explicitly_enabled "${enable_userfw}" "Frameworks-to-user"
if test "${enable_sdk}" != "" ; then
if test "${enable_sdk5}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-sdk5"
fi
if test "${enable_sdk6}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-sdk6"
fi
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-ios"
fi
echo "=== Using Mac OS 10.4 SDK directory ${enable_sdk}"
fi
if test "${enable_sdk5}" != "" ; then
if test "${enable_sdk6}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk5 and --enable-sdk6"
fi
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk5 and --enable-ios"
fi
echo "=== Using Mac OS 10.5 SDK directory ${enable_sdk}"
fi
if test "${enable_sdk6}" != "" ; then
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk6 and --enable-ios"
fi
echo "=== Using Mac OS 10.6 SDK directory ${enable_sdk6}"
fi
if test "${enable_ios}" != "" ; then
echo "=== Using ios SDK directory ${enable_ios}"
fi
if test "${enable_sysroot}" != "" ; then
echo "=== Using sysroot directory ${enable_sysroot}"
fi

View File

@ -1,3 +0,0 @@
AC_ARG_ENABLE(xonx, [ --enable-xonx use Unix style (e.g., use Gtk) for Mac OS])
AC_ARG_ENABLE(macprefix, [ --enable-macprefix allow --prefix with a Mac OS install])

View File

@ -665,8 +665,12 @@ enable_origtree
enable_pkgscope
enable_docs
enable_usersetup
enable_sdk
enable_xonx
enable_macprefix
enable_libfw
enable_userfw
enable_mac64
'
ac_precious_vars='build_alias
host_alias
@ -1278,8 +1282,16 @@ Optional Features:
--enable-pkgscope=<s> set `raco pkg' default: installation, user, or shared
--enable-docs build docs on install (enabled by default)
--enable-usersetup setup user-specific files on install
--enable-sdk=<path> use Mac OS 10.4 SDK directory
--enable-sdk5=<path> use Mac OS 10.5 SDK directory
--enable-sdk6=<path> use Mac OS 10.6 SDK directory
--enable-ios=<path> use iOS SDK directory
--enable-sysroot=<path> use sysroot directory (e.g., for Android)
--enable-xonx use Unix style (e.g., use Gtk) for Mac OS
--enable-macprefix allow --prefix with a Mac OS install
--enable-libfw install Mac OS frameworks to /Library/Frameworks
--enable-userfw install Mac OS frameworks to ~/Library/Frameworks
--enable-mac64 allow 64-bit Mac OS build (enabled by default)
Report bugs to the package provider.
_ACEOF
@ -1879,6 +1891,30 @@ if test "${enable_usersetup+set}" = set; then :
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-xonx was given.
if test "${enable_xonx+set}" = set; then :
@ -1890,6 +1926,23 @@ if test "${enable_macprefix+set}" = set; then :
enableval=$enable_macprefix;
fi
# Check whether --enable-libfw was given.
if test "${enable_libfw+set}" = set; then :
enableval=$enable_libfw;
fi
# Check whether --enable-userfw was given.
if test "${enable_userfw+set}" = set; then :
enableval=$enable_userfw;
fi
# Check whether --enable-mac64 was given.
if test "${enable_mac64+set}" = set; then :
enableval=$enable_mac64;
else
enable_mac64=yes
fi

View File

@ -821,6 +821,7 @@ enable_sdk
enable_xonx
enable_macprefix
enable_libfw
enable_userfw
enable_mac64
enable_csdefault
enable_cgcdefault
@ -2745,7 +2746,6 @@ if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-xonx was given.
if test "${enable_xonx+set}" = set; then :
enableval=$enable_xonx;
@ -2756,15 +2756,14 @@ if test "${enable_macprefix+set}" = set; then :
enableval=$enable_macprefix;
fi
# Check whether --enable-libfw was given.
if test "${enable_libfw+set}" = set; then :
enableval=$enable_libfw;
fi
# Check whether --enable-libfw was given.
if test "${enable_libfw+set}" = set; then :
enableval=$enable_libfw;
# Check whether --enable-userfw was given.
if test "${enable_userfw+set}" = set; then :
enableval=$enable_userfw;
fi
# Check whether --enable-mac64 was given.
@ -2775,6 +2774,7 @@ else
fi
# Check whether --enable-csdefault was given.
if test "${enable_csdefault+set}" = set; then :
enableval=$enable_csdefault;
@ -3243,6 +3243,7 @@ if test "${enable_sysroot}" != "" ; then
echo "=== Using sysroot directory ${enable_sysroot}"
fi
if test "${enable_racket}" != "" ; then
if test "${enable_racket}" = "auto" ; then
echo "=== Creating and using local Racket executable"
@ -4858,7 +4859,7 @@ $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
;;
darwin*)
if test "${enable_sdk}" != "" ; then
if test "${enable_sdk}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
if test "${CC}" = "gcc" ; then
@ -4897,6 +4898,23 @@ $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
# Force 32-bit build unless mac64 is enabled:
if test "${enable_mac64}" != "yes" ; then
if test "$host_cpu" != "powerpc" ; then
if test "${ORIG_CC}" = "" ; then
PREFLAGS="${PREFLAGS} -m32"
CPPFLAGS="${CPPFLAGS} -m32"
LDFLAGS="${LDFLAGS} -m32"
# To make the libffi build work, we have to fold -m32 into CC
# instead of CFLAGS:
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
need_cc_in_extras=no
fi
fi
fi
case "$host_cpu" in
i386|x86_64)
enable_parallel_by_default=yes
@ -4920,21 +4938,6 @@ $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
SO_SUFFIX=.dylib
# Force 32-bit build unless mac64 is enabled:
if test "${enable_mac64}" != "yes" ; then
if test "$host_cpu" != "powerpc" ; then
if test "${ORIG_CC}" = "" ; then
PREFLAGS="${PREFLAGS} -m32"
CPPFLAGS="${CPPFLAGS} -m32"
LDFLAGS="${LDFLAGS} -m32"
# To make the libffi build work, we have to fold -m32 into CC
# instead of CFLAGS:
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
need_cc_in_extras=no
fi
fi
fi
if test "${need_cc_in_extras}" = "yes" ; then
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"'"'
fi

View File

@ -738,8 +738,12 @@ enable_usersetup
enable_racket
enable_scheme
enable_mach
enable_sdk
enable_xonx
enable_macprefix
enable_libfw
enable_userfw
enable_mac64
enable_csdefault
enable_csonly
enable_parent
@ -1368,8 +1372,16 @@ Optional Features:
--enable-racket=<path> use <path> as Racket to build; or "auto" to create
--enable-scheme=<path> Chez Scheme build directory at <path>
--enable-mach=<mac> Use Chez Scheme machine type <mach>
--enable-sdk=<path> use Mac OS 10.4 SDK directory
--enable-sdk5=<path> use Mac OS 10.5 SDK directory
--enable-sdk6=<path> use Mac OS 10.6 SDK directory
--enable-ios=<path> use iOS SDK directory
--enable-sysroot=<path> use sysroot directory (e.g., for Android)
--enable-xonx use Unix style (e.g., use Gtk) for Mac OS
--enable-macprefix allow --prefix with a Mac OS install
--enable-libfw install Mac OS frameworks to /Library/Frameworks
--enable-userfw install Mac OS frameworks to ~/Library/Frameworks
--enable-mac64 allow 64-bit Mac OS build (enabled by default)
--enable-csdefault use CS as default build
--enable-csonly build CS only
--enable-parent Create "../Makefile" (internal use)
@ -2308,6 +2320,30 @@ if test "${enable_mach+set}" = set; then :
enableval=$enable_mach;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-sdk was given.
if test "${enable_sdk+set}" = set; then :
enableval=$enable_sdk;
fi
# Check whether --enable-xonx was given.
if test "${enable_xonx+set}" = set; then :
@ -2319,6 +2355,23 @@ if test "${enable_macprefix+set}" = set; then :
enableval=$enable_macprefix;
fi
# Check whether --enable-libfw was given.
if test "${enable_libfw+set}" = set; then :
enableval=$enable_libfw;
fi
# Check whether --enable-userfw was given.
if test "${enable_userfw+set}" = set; then :
enableval=$enable_userfw;
fi
# Check whether --enable-mac64 was given.
if test "${enable_mac64+set}" = set; then :
enableval=$enable_mac64;
else
enable_mac64=yes
fi
# Check whether --enable-csdefault was given.
if test "${enable_csdefault+set}" = set; then :
@ -2336,6 +2389,33 @@ if test "${enable_parent+set}" = set; then :
fi
enable_quartz=no
if test "${enable_xonx}" = "yes" ; then
enable_quartz=no
else
case "$host_os" in
darwin*)
enable_quartz=yes
if test "${enable_origtree}" != "no" ; then
enable_origtree=yes
fi
if test "${prefix}" != "NONE" ; then
if test "${enable_macprefix}" != "yes" ; then
echo "ERROR: --prefix not allowed for a Mac OS build, unless either"
echo " --enable-xonx is supplied (to create a Unix-style"
echo " build), or "
echo " --enable-macprefix is supplied (to allow a Mac-style"
echo " installation, even though --prefix is normally used"
echo " for Unix-style installations)"
exit 1
fi
fi
;;
esac
fi
show_explicitly_disabled()
{
if test "$1" = "no" ; then
@ -2368,30 +2448,44 @@ show_explicitly_set "${enable_racket}" "Racket"
show_explicitly_set "${enable_scheme}" "Chez Scheme build directory"
show_explicitly_set "${enable_mach}" "machine type"
show_explicitly_disabled "${enable_mac64}" "64-bit Mac OS"
enable_quartz=no
if test "${enable_xonx}" = "yes" ; then
enable_quartz=no
else
case "$host_os" in
darwin*)
enable_quartz=yes
if test "${enable_origtree}" != "no" ; then
enable_origtree=yes
fi
if test "${prefix}" != "NONE" ; then
if test "${enable_macprefix}" != "yes" ; then
echo "ERROR: --prefix not allowed for a Mac OS build, unless either"
echo " --enable-xonx is supplied (to create a Unix-style"
echo " build), or "
echo " --enable-macprefix is supplied (to allow a Mac-style"
echo " installation, even though --prefix is normally used"
echo " for Unix-style installations)"
exit 1
fi
fi
;;
esac
show_explicitly_enabled "${enable_libfw}" "Frameworks-to-system"
show_explicitly_enabled "${enable_userfw}" "Frameworks-to-user"
if test "${enable_sdk}" != "" ; then
if test "${enable_sdk5}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-sdk5"
fi
if test "${enable_sdk6}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-sdk6"
fi
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-ios"
fi
echo "=== Using Mac OS 10.4 SDK directory ${enable_sdk}"
fi
if test "${enable_sdk5}" != "" ; then
if test "${enable_sdk6}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk5 and --enable-sdk6"
fi
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk5 and --enable-ios"
fi
echo "=== Using Mac OS 10.5 SDK directory ${enable_sdk}"
fi
if test "${enable_sdk6}" != "" ; then
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk6 and --enable-ios"
fi
echo "=== Using Mac OS 10.6 SDK directory ${enable_sdk6}"
fi
if test "${enable_ios}" != "" ; then
echo "=== Using ios SDK directory ${enable_ios}"
fi
if test "${enable_sysroot}" != "" ; then
echo "=== Using sysroot directory ${enable_sysroot}"
fi
@ -2429,6 +2523,8 @@ fi
SUB_CONFIGURE_EXTRAS=
############## Install targets ################
PREFIX_PATH_RELATIVE=/../..
@ -3509,6 +3605,9 @@ fi
############## platform tests ################
MACH_HOST_CPU="${host_cpu}"
extra_scheme_config_args=
case "$host_os" in
solaris2*)
MACH_OS=s2
@ -3556,6 +3655,62 @@ case "$host_os" in
CPPFLAGS="${CPPFLAGS} -DRACKET_XONX"
fi
if test "${enable_sdk}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
need_cpp_in_extras=yes
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
need_ld_in_extras=yes
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
need_cc_in_extras=yes
if test "$ORIG_CC_FOR_BUILD" = "" ; then
CC_FOR_BUILD="$CC"
fi
fi
if test "${enable_sdk5}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk5} -mmacosx-version-min=10.5"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk5} -mmacosx-version-min=10.5"
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
if test "${enable_sdk6}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk6} -mmacosx-version-min=10.6"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk6} -mmacosx-version-min=10.6"
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
# Force 32-bit build unless mac64 is enabled:
if test "${enable_mac64}" != "yes" ; then
if test "$host_cpu" != "powerpc" ; then
if test "${ORIG_CC}" = "" ; then
PREFLAGS="${PREFLAGS} -m32"
CPPFLAGS="${CPPFLAGS} -m32"
LDFLAGS="${LDFLAGS} -m32"
# To make the libffi build work, we have to fold -m32 into CC
# instead of CFLAGS:
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
need_cc_in_extras=no
fi
fi
fi
if test "${enable_libfw}" = "yes" ; then
FRAMEWORK_INSTALL_DIR=/Library/Frameworks
FRAMEWORK_REL_INSTALL=no
@ -3574,6 +3729,11 @@ case "$host_os" in
fi
fi
if test "${enable_mac64}" == "no"; then
MACH_HOST_CPU="x86"
extra_scheme_config_args="--32"
fi
# -pthread is not needed and triggers a warning
use_flag_pthread=no
;;
@ -3604,7 +3764,7 @@ if test "${enable_pthread}" = "yes" ; then
thread_config_arg="--threads"
fi
case "$host_cpu" in
case "$MACH_HOST_CPU" in
x86_64)
MACH="${thread_prefix}a6${MACH_OS}"
;;
@ -3635,7 +3795,7 @@ if test "${enable_mach}" != "" ; then
MACH="${enable_mach}"
fi
SCHEME_CONFIG_ARGS="--machine=${MACH} ${thread_config_arg}"
SCHEME_CONFIG_ARGS="--machine=${MACH} ${thread_config_arg} ${extra_scheme_config_args}"
if test "${enable_compress}" = "yes" ; then
COMPRESS_COMP="--compress"
@ -5541,7 +5701,7 @@ fi
mkdir -p rktio
abssrcdir=`(cd ${srcdir}; pwd)`
echo "=== configuring in rktio (${abssrcdir}/../../rktio)"
cd rktio; ${abssrcdir}/../../rktio/configure
cd rktio; eval "${abssrcdir}/../../rktio/configure ${SUB_CONFIGURE_EXTRAS}"
# From "../ac/path.m4":
show_path_results

View File

@ -13,9 +13,9 @@ AC_CANONICAL_SYSTEM
AC_DISABLE_OPTION_CHECKING
m4_include(../ac/path_arg.m4)
m4_include(../ac/xonx_arg.m4)
m4_include(../ac/sdk_arg.m4)
m4_include(../ac/xonx.m4)
m4_include(../ac/sdk.m4)
m4_include(../ac/path_pkgscope.m4)

View File

@ -21,11 +21,13 @@ m4_include(../ac/path_arg.m4)
AC_ARG_ENABLE(racket, [ --enable-racket=<path> use <path> as Racket to build; or "auto" to create])
AC_ARG_ENABLE(scheme, [ --enable-scheme=<path> Chez Scheme build directory at <path>])
AC_ARG_ENABLE(mach, [ --enable-mach=<mac> Use Chez Scheme machine type <mach>])
m4_include(../ac/xonx_arg.m4)
m4_include(../ac/sdk_arg.m4)
AC_ARG_ENABLE(csdefault, [ --enable-csdefault use CS as default build])
AC_ARG_ENABLE(csonly, [ --enable-csonly build CS only])
AC_ARG_ENABLE(parent, [ --enable-parent Create "../Makefile" (internal use)])
m4_include(../ac/sdk.m4)
show_explicitly_disabled()
{
if test "$1" = "no" ; then
@ -58,7 +60,7 @@ show_explicitly_set "${enable_racket}" "Racket"
show_explicitly_set "${enable_scheme}" "Chez Scheme build directory"
show_explicitly_set "${enable_mach}" "machine type"
m4_include(../ac/xonx.m4)
m4_include(../ac/sdk_show.m4)
if test "${enable_iconv}" = "" ; then
enable_iconv=yes
@ -70,6 +72,8 @@ fi
m4_include(../ac/path_pkgscope.m4)
SUB_CONFIGURE_EXTRAS=
############## Install targets ################
PREFIX_PATH_RELATIVE=/../..
@ -109,6 +113,9 @@ AC_CHECK_LIB(dl, dlopen)
############## platform tests ################
MACH_HOST_CPU="${host_cpu}"
extra_scheme_config_args=
case "$host_os" in
solaris2*)
MACH_OS=s2
@ -156,6 +163,8 @@ case "$host_os" in
CPPFLAGS="${CPPFLAGS} -DRACKET_XONX"
fi
m4_include(../ac/sdk_mac.m4)
if test "${enable_libfw}" = "yes" ; then
FRAMEWORK_INSTALL_DIR=/Library/Frameworks
FRAMEWORK_REL_INSTALL=no
@ -174,6 +183,11 @@ case "$host_os" in
fi
fi
if test "${enable_mac64}" == "no"; then
MACH_HOST_CPU="x86"
extra_scheme_config_args="--32"
fi
# -pthread is not needed and triggers a warning
use_flag_pthread=no
;;
@ -204,7 +218,7 @@ if test "${enable_pthread}" = "yes" ; then
thread_config_arg="--threads"
fi
case "$host_cpu" in
case "$MACH_HOST_CPU" in
x86_64)
MACH="${thread_prefix}a6${MACH_OS}"
;;
@ -235,7 +249,7 @@ if test "${enable_mach}" != "" ; then
MACH="${enable_mach}"
fi
SCHEME_CONFIG_ARGS="--machine=${MACH} ${thread_config_arg}"
SCHEME_CONFIG_ARGS="--machine=${MACH} ${thread_config_arg} ${extra_scheme_config_args}"
if test "${enable_compress}" = "yes" ; then
COMPRESS_COMP="--compress"
@ -407,7 +421,7 @@ AC_OUTPUT($makefiles)
mkdir -p rktio
abssrcdir=`(cd ${srcdir}; pwd)`
echo "=== configuring in rktio (${abssrcdir}/../../rktio)"
cd rktio; ${abssrcdir}/../../rktio/configure
cd rktio; eval "${abssrcdir}/../../rktio/configure ${SUB_CONFIGURE_EXTRAS}"
# From "../ac/path.m4":
show_path_results

View File

@ -54,15 +54,7 @@ AC_ARG_ENABLE(libs, [ --enable-libs install static libraries (enab
AC_ARG_ENABLE(libffi, [ --enable-libffi use installed libffi (enabled by default for Unix)], , enable_libffi=default)
AC_ARG_ENABLE(sdk, [ --enable-sdk=<path> use Mac OS 10.4 SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-sdk5=<path> use Mac OS 10.5 SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-sdk6=<path> use Mac OS 10.6 SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-ios=<path> use iOS SDK directory])
AC_ARG_ENABLE(sdk, [ --enable-sysroot=<path> use sysroot directory (e.g., for Android)])
m4_include(../ac/xonx_arg.m4)
AC_ARG_ENABLE(libfw, [ --enable-libfw install Mac OS frameworks to /Library/Frameworks])
AC_ARG_ENABLE(libfw, [ --enable-userfw install Mac OS frameworks to ~/Library/Frameworks])
AC_ARG_ENABLE(mac64, [ --enable-mac64 allow 64-bit Mac OS build (enabled by default)], , enable_mac64=yes)
m4_include(../ac/sdk_arg.m4)
AC_ARG_ENABLE(csdefault, [ --enable-csdefault use CS as default build])
AC_ARG_ENABLE(cgcdefault, [ --enable-cgcdefault use CGC as default build (NOT RECOMMENDED)])
@ -138,7 +130,7 @@ if test "${enable_shared}" = "yes" ; then
esac
fi
m4_include(../ac/xonx.m4)
m4_include(../ac/sdk.m4)
if test "${enable_iconv}" = "" ; then
enable_iconv=yes
@ -237,45 +229,7 @@ show_explicitly_disabled "${enable_strip}" "Debug-symbol stripping"
show_explicitly_enabled "${enable_libs}" "Installation of static libraries (if any)"
show_explicitly_disabled "${enable_libs}" "Installation of static libraries (if any)"
show_explicitly_disabled "${enable_mac64}" "64-bit Mac OS"
show_explicitly_enabled "${enable_libfw}" "Frameworks-to-system"
show_explicitly_enabled "${enable_userfw}" "Frameworks-to-user"
if test "${enable_sdk}" != "" ; then
if test "${enable_sdk5}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-sdk5"
fi
if test "${enable_sdk6}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-sdk6"
fi
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk and --enable-ios"
fi
echo "=== Using Mac OS 10.4 SDK directory ${enable_sdk}"
fi
if test "${enable_sdk5}" != "" ; then
if test "${enable_sdk6}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk5 and --enable-sdk6"
fi
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk5 and --enable-ios"
fi
echo "=== Using Mac OS 10.5 SDK directory ${enable_sdk}"
fi
if test "${enable_sdk6}" != "" ; then
if test "${enable_ios}" != "" ; then
echo "ERROR: cannot specify both --enable-sdk6 and --enable-ios"
fi
echo "=== Using Mac OS 10.6 SDK directory ${enable_sdk6}"
fi
if test "${enable_ios}" != "" ; then
echo "=== Using ios SDK directory ${enable_ios}"
fi
if test "${enable_sysroot}" != "" ; then
echo "=== Using sysroot directory ${enable_sysroot}"
fi
m4_include(../ac/sdk_show.m4)
if test "${enable_racket}" != "" ; then
if test "${enable_racket}" = "auto" ; then
@ -719,44 +673,7 @@ case "$host_os" in
;;
darwin*)
if test "${enable_sdk}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
need_cpp_in_extras=yes
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
need_ld_in_extras=yes
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
need_cc_in_extras=yes
if test "$ORIG_CC_FOR_BUILD" = "" ; then
CC_FOR_BUILD="$CC"
fi
fi
if test "${enable_sdk5}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk5} -mmacosx-version-min=10.5"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk5} -mmacosx-version-min=10.5"
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
if test "${enable_sdk6}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk6} -mmacosx-version-min=10.6"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk6} -mmacosx-version-min=10.6"
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CPPFLAGS="'"'"${PREFLAGS}"'"'
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} LDFLAGS="'"'"${LDFLAGS}"'"'
fi
m4_include(../ac/sdk_mac.m4)
case "$host_cpu" in
i386|x86_64)
@ -781,21 +698,6 @@ case "$host_os" in
SO_SUFFIX=.dylib
# Force 32-bit build unless mac64 is enabled:
if test "${enable_mac64}" != "yes" ; then
if test "$host_cpu" != "powerpc" ; then
if test "${ORIG_CC}" = "" ; then
PREFLAGS="${PREFLAGS} -m32"
CPPFLAGS="${CPPFLAGS} -m32"
LDFLAGS="${LDFLAGS} -m32"
# To make the libffi build work, we have to fold -m32 into CC
# instead of CFLAGS:
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
need_cc_in_extras=no
fi
fi
fi
if test "${need_cc_in_extras}" = "yes" ; then
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"'"'
fi