configure: fix --disable-mac64
mode as cross-compile mode
This commit is contained in:
parent
8c5d580d5a
commit
d5930a18c6
36
racket/src/ac/iconv.m4
Normal file
36
racket/src/ac/iconv.m4
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
iconv_lib_flag=""
|
||||||
|
if test "${skip_iconv_check}" = "no" ; then
|
||||||
|
if test "${enable_iconv}" = "yes" ; then
|
||||||
|
AC_CHECK_HEADER(iconv.h, enable_iconv=yes, enable_iconv=no)
|
||||||
|
if test "${enable_iconv}" = "yes" ; then
|
||||||
|
# Does it all work, now?
|
||||||
|
AC_TRY_LINK(
|
||||||
|
[#include <iconv.h>]
|
||||||
|
[#include <langinfo.h>],
|
||||||
|
[ iconv_open("UTF-8", "UTF-8");]
|
||||||
|
return 0;
|
||||||
|
, enable_iconv=yes, enable_iconv=no)
|
||||||
|
if test "${enable_iconv}" = "no" ; then
|
||||||
|
# Try adding -liconv ?
|
||||||
|
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
||||||
|
ORIG_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -liconv"
|
||||||
|
AC_TRY_LINK(
|
||||||
|
[#include <iconv.h>]
|
||||||
|
[#include <langinfo.h>],
|
||||||
|
[ iconv_open("UTF-8", "UTF-8");]
|
||||||
|
return 0;
|
||||||
|
, enable_iconv=yes, enable_iconv=no)
|
||||||
|
if test "${enable_iconv}" = "no" ; then
|
||||||
|
LIBS="$ORIG_LIBS"
|
||||||
|
else
|
||||||
|
iconv_lib_flag=" -liconv"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ msg="iconv is usable" ]
|
||||||
|
AC_MSG_CHECKING($msg)
|
||||||
|
iconv_usage_result="$enable_iconv$iconv_lib_flag"
|
||||||
|
AC_MSG_RESULT($iconv_usage_result)
|
||||||
|
fi
|
|
@ -66,7 +66,12 @@
|
||||||
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
|
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
|
||||||
fi
|
fi
|
||||||
need_cc_in_extras=no
|
need_cc_in_extras=no
|
||||||
|
if test "$build_cpu" = "x86_64" ; then
|
||||||
|
# AG_PROC_CC has already decided that we weren't
|
||||||
|
# cross compiling, so change that decision
|
||||||
|
cross_compiling=yes
|
||||||
|
echo may be cross compiling after all
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
6
racket/src/ac/valid_sizeof.m4
Normal file
6
racket/src/ac/valid_sizeof.m4
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
if test "${ac_cv_sizeof_void_p}" != "4" ; then
|
||||||
|
if test "${ac_cv_sizeof_void_p}" != "8" ; then
|
||||||
|
echo "Something has gone wrong getting the pointer size; see config.log"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -5025,12 +5025,17 @@ $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
|
||||||
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
|
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
|
||||||
fi
|
fi
|
||||||
need_cc_in_extras=no
|
need_cc_in_extras=no
|
||||||
|
if test "$build_cpu" = "x86_64" ; then
|
||||||
|
# AG_PROC_CC has already decided that we weren't
|
||||||
|
# cross compiling, so change that decision
|
||||||
|
cross_compiling=yes
|
||||||
|
echo may be cross compiling after all
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i386|x86_64)
|
i386|x86_64)
|
||||||
enable_parallel_by_default=yes
|
enable_parallel_by_default=yes
|
||||||
|
@ -5673,53 +5678,53 @@ fi
|
||||||
|
|
||||||
if test "${enable_iconv}" = "yes" ; then
|
if test "${enable_iconv}" = "yes" ; then
|
||||||
# Does it all work, now?
|
# Does it all work, now?
|
||||||
if test "$cross_compiling" = yes; then :
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
enable_iconv=yes
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
int main() {
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
iconv_open("UTF-8", "UTF-8");
|
iconv_open("UTF-8", "UTF-8");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
enable_iconv=yes
|
enable_iconv=yes
|
||||||
else
|
else
|
||||||
enable_iconv=no
|
enable_iconv=no
|
||||||
fi
|
fi
|
||||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
if test "${enable_iconv}" = "no" ; then
|
||||||
# Try adding -liconv ?
|
# Try adding -liconv ?
|
||||||
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
||||||
ORIG_LIBS="$LIBS"
|
ORIG_LIBS="$LIBS"
|
||||||
LIBS="$LIBS -liconv"
|
LIBS="$LIBS -liconv"
|
||||||
if test "$cross_compiling" = yes; then :
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
enable_iconv=yes
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
int main() {
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
iconv_open("UTF-8", "UTF-8");
|
iconv_open("UTF-8", "UTF-8");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
enable_iconv=yes
|
enable_iconv=yes
|
||||||
else
|
else
|
||||||
enable_iconv=no
|
enable_iconv=no
|
||||||
fi
|
fi
|
||||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
if test "${enable_iconv}" = "no" ; then
|
||||||
LIBS="$ORIG_LIBS"
|
LIBS="$ORIG_LIBS"
|
||||||
else
|
else
|
||||||
|
@ -5736,6 +5741,7 @@ $as_echo_n "checking $msg... " >&6; }
|
||||||
$as_echo "$iconv_usage_result" >&6; }
|
$as_echo "$iconv_usage_result" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "${check_for_mprotect}" = "yes" ; then
|
if test "${check_for_mprotect}" = "yes" ; then
|
||||||
msg="for mmap and mprotect"
|
msg="for mmap and mprotect"
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $msg" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $msg" >&5
|
||||||
|
@ -6180,6 +6186,14 @@ _ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test "${ac_cv_sizeof_void_p}" != "4" ; then
|
||||||
|
if test "${ac_cv_sizeof_void_p}" != "8" ; then
|
||||||
|
echo "Something has gone wrong getting the pointer size; see config.log"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
|
ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
|
||||||
if test "x$ac_cv_type_intptr_t" = xyes; then :
|
if test "x$ac_cv_type_intptr_t" = xyes; then :
|
||||||
|
|
61
racket/src/cs/c/configure
vendored
61
racket/src/cs/c/configure
vendored
|
@ -4690,12 +4690,17 @@ fi
|
||||||
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
|
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CC="'"'"${CC}"' -m32"'
|
||||||
fi
|
fi
|
||||||
need_cc_in_extras=no
|
need_cc_in_extras=no
|
||||||
|
if test "$build_cpu" = "x86_64" ; then
|
||||||
|
# AG_PROC_CC has already decided that we weren't
|
||||||
|
# cross compiling, so change that decision
|
||||||
|
cross_compiling=yes
|
||||||
|
echo may be cross compiling after all
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "${enable_libfw}" = "yes" ; then
|
if test "${enable_libfw}" = "yes" ; then
|
||||||
FRAMEWORK_INSTALL_DIR=/Library/Frameworks
|
FRAMEWORK_INSTALL_DIR=/Library/Frameworks
|
||||||
FRAMEWORK_REL_INSTALL=no
|
FRAMEWORK_REL_INSTALL=no
|
||||||
|
@ -5073,53 +5078,53 @@ fi
|
||||||
|
|
||||||
if test "${enable_iconv}" = "yes" ; then
|
if test "${enable_iconv}" = "yes" ; then
|
||||||
# Does it all work, now?
|
# Does it all work, now?
|
||||||
if test "$cross_compiling" = yes; then :
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
enable_iconv=yes
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
int main() {
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
iconv_open("UTF-8", "UTF-8");
|
iconv_open("UTF-8", "UTF-8");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
enable_iconv=yes
|
enable_iconv=yes
|
||||||
else
|
else
|
||||||
enable_iconv=no
|
enable_iconv=no
|
||||||
fi
|
fi
|
||||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
if test "${enable_iconv}" = "no" ; then
|
||||||
# Try adding -liconv ?
|
# Try adding -liconv ?
|
||||||
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
||||||
ORIG_LIBS="$LIBS"
|
ORIG_LIBS="$LIBS"
|
||||||
LIBS="$LIBS -liconv"
|
LIBS="$LIBS -liconv"
|
||||||
if test "$cross_compiling" = yes; then :
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
enable_iconv=yes
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
int main() {
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
iconv_open("UTF-8", "UTF-8");
|
iconv_open("UTF-8", "UTF-8");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
enable_iconv=yes
|
enable_iconv=yes
|
||||||
else
|
else
|
||||||
enable_iconv=no
|
enable_iconv=no
|
||||||
fi
|
fi
|
||||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
if test "${enable_iconv}" = "no" ; then
|
||||||
LIBS="$ORIG_LIBS"
|
LIBS="$ORIG_LIBS"
|
||||||
else
|
else
|
||||||
|
@ -5135,6 +5140,7 @@ $as_echo_n "checking $msg... " >&6; }
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $iconv_usage_result" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $iconv_usage_result" >&5
|
||||||
$as_echo "$iconv_usage_result" >&6; }
|
$as_echo "$iconv_usage_result" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
if test "${enable_iconv}" = "no" ; then
|
||||||
|
|
||||||
$as_echo "#define RKTIO_NO_ICONV 1" >>confdefs.h
|
$as_echo "#define RKTIO_NO_ICONV 1" >>confdefs.h
|
||||||
|
@ -5317,6 +5323,7 @@ if test "${ac_cv_sizeof_void_p}" != "4" ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
############## subconfigure ################
|
############## subconfigure ################
|
||||||
|
|
||||||
# Before libtool setup
|
# Before libtool setup
|
||||||
|
|
|
@ -481,44 +481,7 @@ fi
|
||||||
|
|
||||||
AC_LANG_C
|
AC_LANG_C
|
||||||
|
|
||||||
iconv_lib_flag=""
|
m4_include(../ac/iconv.m4)
|
||||||
if test "${skip_iconv_check}" = "no" ; then
|
|
||||||
if test "${enable_iconv}" = "yes" ; then
|
|
||||||
AC_CHECK_HEADER(iconv.h, enable_iconv=yes, enable_iconv=no)
|
|
||||||
if test "${enable_iconv}" = "yes" ; then
|
|
||||||
# Does it all work, now?
|
|
||||||
AC_TRY_RUN(
|
|
||||||
[ #include <iconv.h>]
|
|
||||||
[ #include <langinfo.h>]
|
|
||||||
int main() {
|
|
||||||
[ iconv_open("UTF-8", "UTF-8");]
|
|
||||||
return 0;
|
|
||||||
}, enable_iconv=yes, enable_iconv=no, enable_iconv=yes)
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
|
||||||
# Try adding -liconv ?
|
|
||||||
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
|
||||||
ORIG_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS -liconv"
|
|
||||||
AC_TRY_RUN(
|
|
||||||
[ #include <iconv.h>]
|
|
||||||
[ #include <langinfo.h>]
|
|
||||||
int main() {
|
|
||||||
[ iconv_open("UTF-8", "UTF-8");]
|
|
||||||
return 0;
|
|
||||||
}, enable_iconv=yes, enable_iconv=no, enable_iconv=yes)
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
|
||||||
LIBS="$ORIG_LIBS"
|
|
||||||
else
|
|
||||||
iconv_lib_flag=" -liconv"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
[ msg="iconv is usable" ]
|
|
||||||
AC_MSG_CHECKING($msg)
|
|
||||||
iconv_usage_result="$enable_iconv$iconv_lib_flag"
|
|
||||||
AC_MSG_RESULT($iconv_usage_result)
|
|
||||||
fi
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
if test "${enable_iconv}" = "no" ; then
|
||||||
AC_DEFINE(RKTIO_NO_ICONV,1,[Do not use iconv])
|
AC_DEFINE(RKTIO_NO_ICONV,1,[Do not use iconv])
|
||||||
fi
|
fi
|
||||||
|
@ -608,12 +571,7 @@ fi
|
||||||
|
|
||||||
AC_CHECK_SIZEOF([void *])
|
AC_CHECK_SIZEOF([void *])
|
||||||
|
|
||||||
if test "${ac_cv_sizeof_void_p}" != "4" ; then
|
m4_include(../ac/valid_sizeof.m4)
|
||||||
if test "${ac_cv_sizeof_void_p}" != "8" ; then
|
|
||||||
echo "Something has gone wrong getting the pointer size; see config.log"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
############## subconfigure ################
|
############## subconfigure ################
|
||||||
|
|
||||||
|
|
|
@ -883,44 +883,7 @@ AC_MSG_RESULT($using_gnu_cpp)
|
||||||
|
|
||||||
# Although rktio takes care of iconv, we need to know whether
|
# Although rktio takes care of iconv, we need to know whether
|
||||||
# to link to it
|
# to link to it
|
||||||
iconv_lib_flag=""
|
m4_include(../ac/iconv.m4)
|
||||||
if test "${skip_iconv_check}" = "no" ; then
|
|
||||||
if test "${enable_iconv}" = "yes" ; then
|
|
||||||
AC_CHECK_HEADER(iconv.h, enable_iconv=yes, enable_iconv=no)
|
|
||||||
if test "${enable_iconv}" = "yes" ; then
|
|
||||||
# Does it all work, now?
|
|
||||||
AC_TRY_RUN(
|
|
||||||
[ #include <iconv.h>]
|
|
||||||
[ #include <langinfo.h>]
|
|
||||||
int main() {
|
|
||||||
[ iconv_open("UTF-8", "UTF-8");]
|
|
||||||
return 0;
|
|
||||||
}, enable_iconv=yes, enable_iconv=no, enable_iconv=yes)
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
|
||||||
# Try adding -liconv ?
|
|
||||||
# We did not use AC_CHECK_LIB because iconv is sometimes macro-renamed
|
|
||||||
ORIG_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS -liconv"
|
|
||||||
AC_TRY_RUN(
|
|
||||||
[ #include <iconv.h>]
|
|
||||||
[ #include <langinfo.h>]
|
|
||||||
int main() {
|
|
||||||
[ iconv_open("UTF-8", "UTF-8");]
|
|
||||||
return 0;
|
|
||||||
}, enable_iconv=yes, enable_iconv=no, enable_iconv=yes)
|
|
||||||
if test "${enable_iconv}" = "no" ; then
|
|
||||||
LIBS="$ORIG_LIBS"
|
|
||||||
else
|
|
||||||
iconv_lib_flag=" -liconv"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
[ msg="iconv is usable" ]
|
|
||||||
AC_MSG_CHECKING($msg)
|
|
||||||
iconv_usage_result="$enable_iconv$iconv_lib_flag"
|
|
||||||
AC_MSG_RESULT($iconv_usage_result)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${check_for_mprotect}" = "yes" ; then
|
if test "${check_for_mprotect}" = "yes" ; then
|
||||||
[ msg="for mmap and mprotect" ]
|
[ msg="for mmap and mprotect" ]
|
||||||
|
@ -1045,6 +1008,8 @@ AC_CHECK_SIZEOF(long long)
|
||||||
AC_CHECK_SIZEOF([void *])
|
AC_CHECK_SIZEOF([void *])
|
||||||
AC_CHECK_SIZEOF(bool, unused, [#include <stdbool.h>])
|
AC_CHECK_SIZEOF(bool, unused, [#include <stdbool.h>])
|
||||||
|
|
||||||
|
m4_include(../ac/valid_sizeof.m4)
|
||||||
|
|
||||||
AC_TYPE_INTPTR_T
|
AC_TYPE_INTPTR_T
|
||||||
AC_TYPE_UINTPTR_T
|
AC_TYPE_UINTPTR_T
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user