mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Make the configure script behave more friendly when cross-compiling.
It now no longer unhelpfully fails because it cannot run foreign binaries during the configuration phase. Instead, the configuration values necessary are read from cross.config in this case. (This just codifies present defaults and adds sensible ones where they were still missing). Alternative files can be specified using the `--with-cross-compilation-info=' switch. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35449 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
785044ffb2
commit
d86ea96c56
4 changed files with 172 additions and 77 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2012-08-25 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* configure.ac: Allow a cross-compilation configuration to be
|
||||
specified using the `--with-cross-compilation-info=' switch.
|
||||
Tweak configure script to behave gracefully when
|
||||
cross-compiling.
|
||||
* configure: Regenerate.
|
||||
* cross.config: Add default values for cross-compilation.
|
||||
|
||||
Make the configure script behave more friendly when
|
||||
cross-compiling.
|
||||
|
||||
2012-08-16 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* configure.ac: Check for objc_root_class attribute
|
||||
|
|
127
configure
vendored
127
configure
vendored
|
@ -1406,6 +1406,12 @@ Optional Features:
|
|||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-cross-compilation-info=PATH
|
||||
Specify path to the configuration file that
|
||||
contains information for the configure script in
|
||||
case of cross compilation. This information
|
||||
replaces those obtained from running programmes
|
||||
during the configuration phase.
|
||||
--with-config-file=PATH Specify path to the GNUstep config file.
|
||||
This is the location to be used by the base
|
||||
library to locate path information at
|
||||
|
@ -2105,6 +2111,37 @@ test -n "$target_alias" &&
|
|||
NONENONEs,x,x, &&
|
||||
program_prefix=${target_alias}-
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Setup cross-compilation-information
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
|
||||
# Check whether --with-cross-compilation-info was given.
|
||||
if test "${with_cross_compilation_info+set}" = set; then
|
||||
withval=$with_cross_compilation_info; cross_result="$withval"
|
||||
else
|
||||
cross_result="no"
|
||||
|
||||
fi
|
||||
|
||||
CROSS_CONFIG="./cross.config"
|
||||
if test "$cross_result" != "no"
|
||||
then
|
||||
if test -f "$cross_result" && test -r "$cross_result"
|
||||
then
|
||||
CROSS_CONFIG="$cross_result"
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: \"Could not load cross-compilation variables from $cross_result\"" >&5
|
||||
echo "$as_me: error: \"Could not load cross-compilation variables from $cross_result\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
fi
|
||||
|
||||
# import information from the cross-config.
|
||||
. "$CROSS_CONFIG"
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Location of the GNUstep.conf config file (--with-config-file)
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -5227,7 +5264,7 @@ echo $ECHO_N "checking whether compiler supports UTF-8 constants in executable..
|
|||
# We are working in a latin1 locale so we can build a program containing
|
||||
# a latin1 pound character, and see if the executable has a utf-8 literal.
|
||||
if test "$cross_compiling" = yes; then
|
||||
utf8literal_ok=no
|
||||
utf8literal_ok="$cross_utf8literal_ok"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -5278,7 +5315,7 @@ echo "${ECHO_T}yes" >&6; };
|
|||
# given the appropriate flags to tell it what charactersets to use.
|
||||
CFLAGS="$CFLAGS -finput-charset=ISO-8859-1 -fexec-charset=UTF-8"
|
||||
if test "$cross_compiling" = yes; then
|
||||
utf8literal_ok=no
|
||||
utf8literal_ok="$cross_utf8literal_ok"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -6918,7 +6955,7 @@ CFLAGS="$saved_CFLAGS"
|
|||
{ echo "$as_me:$LINENO: checking whether SO_REUSEADDR is broken" >&5
|
||||
echo $ECHO_N "checking whether SO_REUSEADDR is broken... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
reuseaddr_ok=0
|
||||
reuseaddr_ok="$cross_reuseaddr_ok"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -14789,7 +14826,7 @@ if test "${gs_cv_objc_works+set}" = set; then
|
|||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
gs_cv_objc_works=yes
|
||||
gs_cv_objc_works="$cross_gs_cv_objc_works"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -14873,7 +14910,7 @@ echo $ECHO_N "checking if the compiler supports -fconstant-string-class... $ECHO
|
|||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
gs_cv_objc_compiler_supports_constant_string_class=no
|
||||
gs_cv_objc_compiler_supports_constant_string_class="$cross_gs_cv_objc_compiler_supports_constant_string_class"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -14965,7 +15002,7 @@ if test "${gs_cv_objc_load_method_worked+set}" = set; then
|
|||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
gs_cv_objc_load_method_worked=no
|
||||
gs_cv_objc_load_method_worked="$cross_gs_cv_objc_load_method_worked"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -15398,11 +15435,7 @@ if test "$nonfragile" = "yes"; then
|
|||
{ echo "$as_me:$LINENO: checking for non-fragile-abi support" >&5
|
||||
echo $ECHO_N "checking for non-fragile-abi support... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
non_fragile="$cross_non_fragile"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#include "$srcdir/config/config.non-fragile-ivars.m"
|
||||
|
@ -15648,11 +15681,7 @@ echo "${ECHO_T}$have_set_unexpected" >&6; }
|
|||
{ echo "$as_me:$LINENO: checking for _objc_unexpected_exception in runtime" >&5
|
||||
echo $ECHO_N "checking for _objc_unexpected_exception in runtime... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
have_unexpected="$cross_have_unexpected"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#include "$srcdir/config/config.unexpected.m"
|
||||
|
@ -15859,11 +15888,7 @@ fi
|
|||
{ echo "$as_me:$LINENO: checking for thread-safe +initialize in runtime" >&5
|
||||
echo $ECHO_N "checking for thread-safe +initialize in runtime... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
safe_initialize="$cross_safe_initialize"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#include "$srcdir/config/config.initialize.m"
|
||||
|
@ -15914,8 +15939,6 @@ fi
|
|||
{ echo "$as_me:$LINENO: result: $safe_initialize" >&5
|
||||
echo "${ECHO_T}$safe_initialize" >&6; }
|
||||
|
||||
|
||||
|
||||
LIBS="$saved_LIBS"
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
|
||||
|
@ -19453,11 +19476,7 @@ echo "${ECHO_T}no" >&6; }
|
|||
{ echo "$as_me:$LINENO: checking if poll supports devices" >&5
|
||||
echo $ECHO_N "checking if poll supports devices... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
have_poll="$cross_have_poll"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -19465,7 +19484,7 @@ _ACEOF
|
|||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include "$srcdir/config/config.poll-dev.c"
|
||||
#include "$srcdir/config/config.poll-dev.c"i
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
|
@ -19636,7 +19655,7 @@ done
|
|||
|
||||
if test $ac_cv_func_vsprintf = yes ; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
VSPRINTF_RETURNS_LENGTH=1
|
||||
VSPRINTF_RETURNS_LENGTH="$cross_VSPRINTF_RETURNS_LENGTH"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -19687,7 +19706,7 @@ _ACEOF
|
|||
fi
|
||||
if test $ac_cv_func_vasprintf = yes ; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
VASPRINTF_RETURNS_LENGTH=1
|
||||
VASPRINTF_RETURNS_LENGTH="$cross_VASPRINTF_RETURNS_LENGTH"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -22813,7 +22832,7 @@ done
|
|||
{ echo "$as_me:$LINENO: checking short/int needs to be word aligned" >&5
|
||||
echo $ECHO_N "checking short/int needs to be word aligned... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
NEED_WORD_ALIGNMENT=1
|
||||
NEED_WORD_ALIGNMENT="$cross_NEED_WORD_ALIGNMENT"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -23087,7 +23106,7 @@ fi
|
|||
|
||||
if test $register_printf = 1; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
working_register_printf=1
|
||||
working_register_printf="$cross_working_register_printf"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -23137,7 +23156,7 @@ cat >>confdefs.h <<\_ACEOF
|
|||
_ACEOF
|
||||
|
||||
if test "$cross_compiling" = yes; then
|
||||
wide_register_printf=1
|
||||
wide_register_printf="$cross_wide_register_printf"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -23315,7 +23334,7 @@ if test "${gs_cv_program_invocation_name_worked+set}" = set; then
|
|||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
gs_cv_program_invocation_name_worked=no
|
||||
gs_cv_program_invocation_name_worked="$cross_gs_cv_program_invocation_name_worked"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -24166,7 +24185,7 @@ _ACEOF
|
|||
{ echo "$as_me:$LINENO: checking /proc/$$/cmdline terminated by nul" >&5
|
||||
echo $ECHO_N "checking /proc/$$/cmdline terminated by nul... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
CMDLINE_TERMINATED=0
|
||||
CMDLINE_TERMINATED="$cross_CMDLINE_TERMINATED"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -24318,7 +24337,7 @@ if test "$ac_cv_lib_kvm_kvm_getenvv" = yes; then
|
|||
{ echo "$as_me:$LINENO: checking if we can access kernel memory" >&5
|
||||
echo $ECHO_N "checking if we can access kernel memory... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
have_kvm_env=0
|
||||
have_kvm_env="$cross_have_kvm_env"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -24943,13 +24962,9 @@ echo "$as_me: WARNING: ffi support seems to be missing on this system ... please
|
|||
fi
|
||||
fi
|
||||
|
||||
have_forward_hook=yes
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -x objective-c"
|
||||
|
||||
|
||||
|
||||
|
||||
have_forward_hook=yes
|
||||
{ echo "$as_me:$LINENO: checking for forwarding callback in runtime" >&5
|
||||
echo $ECHO_N "checking for forwarding callback in runtime... $ECHO_C" >&6; }
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
@ -25077,7 +25092,7 @@ _ACEOF
|
|||
fi
|
||||
LIBS="$ffi_LIBS $LIBS"
|
||||
if test "$cross_compiling" = yes; then
|
||||
ffi_ok="yes"
|
||||
ffi_ok="$cross_ffi_ok"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -25435,11 +25450,7 @@ if test $enable_iconv = yes; then
|
|||
{ echo "$as_me:$LINENO: checking iconv support" >&5
|
||||
echo $ECHO_N "checking iconv support... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
found_iconv="$cross_found_iconv_libc"
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#include <iconv.h>
|
||||
|
@ -25519,11 +25530,11 @@ esac
|
|||
old_LIBS="$LIBS"
|
||||
LIBS="-liconv $LIBS"
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
found_iconv="$cross_found_iconv_liconv";
|
||||
if test "$found_iconv" = "no"; then
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#include <iconv.h>
|
||||
|
@ -25583,11 +25594,11 @@ if test $found_iconv = no ; then
|
|||
old_LIBS="$LIBS"
|
||||
LIBS="-lgiconv $LIBS"
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
found_iconv="$cross_found_iconv_lgiconv";
|
||||
if test "$found_iconv" = "no"; then
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#include <giconv.h>
|
||||
|
|
82
configure.ac
82
configure.ac
|
@ -127,6 +127,36 @@ AC_CONFIG_HEADER(Headers/GNUstepBase/config.h)
|
|||
#--------------------------------------------------------------------
|
||||
AC_CANONICAL_TARGET([])
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Setup cross-compilation-information
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
AC_ARG_WITH(cross-compilation-info,
|
||||
[ --with-cross-compilation-info=PATH
|
||||
Specify path to the configuration file that
|
||||
contains information for the configure script in
|
||||
case of cross compilation. This information
|
||||
replaces those obtained from running programmes
|
||||
during the configuration phase.],
|
||||
cross_result="$withval",
|
||||
cross_result="no"
|
||||
)
|
||||
CROSS_CONFIG="./cross.config"
|
||||
if test "$cross_result" != "no"
|
||||
then
|
||||
if test -f "$cross_result" && test -r "$cross_result"
|
||||
then
|
||||
CROSS_CONFIG="$cross_result"
|
||||
else
|
||||
AC_MSG_ERROR(["Could not load cross-compilation variables from $cross_result"])
|
||||
fi
|
||||
fi
|
||||
|
||||
# import information from the cross-config.
|
||||
. "$CROSS_CONFIG"
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Location of the GNUstep.conf config file (--with-config-file)
|
||||
#---------------------------------------------------------------------
|
||||
|
@ -1051,7 +1081,7 @@ if test "$enable_unicodeconstants" != "no"; then
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.constant-string-encoding.c"],
|
||||
utf8literal_ok=yes,
|
||||
utf8literal_ok=no,
|
||||
utf8literal_ok=no)
|
||||
utf8literal_ok="$cross_utf8literal_ok")
|
||||
if test "$utf8literal_ok" = "yes"; then
|
||||
AC_MSG_RESULT([yes]);
|
||||
else
|
||||
|
@ -1061,7 +1091,7 @@ if test "$enable_unicodeconstants" != "no"; then
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.constant-string-encoding.c"],
|
||||
utf8literal_ok=yes,
|
||||
utf8literal_ok=no,
|
||||
utf8literal_ok=no)
|
||||
utf8literal_ok="$cross_utf8literal_ok")
|
||||
if test "$utf8literal_ok" = "yes"; then
|
||||
AC_MSG_RESULT([yes]);
|
||||
GS_EXEC_CHARSET=-fexec-charset=UTF-8
|
||||
|
@ -1353,7 +1383,7 @@ AC_MSG_CHECKING(whether SO_REUSEADDR is broken)
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.reuseaddr.c"],
|
||||
reuseaddr_ok=1,
|
||||
reuseaddr_ok=0,
|
||||
reuseaddr_ok=0)
|
||||
reuseaddr_ok="$cross_reuseaddr_ok")
|
||||
if test $reuseaddr_ok = 0; then
|
||||
AC_DEFINE(BROKEN_SO_REUSEADDR,1,
|
||||
[Define if SO_REUSEADDR is broken on this system])
|
||||
|
@ -1705,7 +1735,7 @@ AC_CACHE_VAL(gs_cv_objc_works,
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.objc.m"],
|
||||
gs_cv_objc_works=yes,
|
||||
gs_cv_objc_works=no,
|
||||
gs_cv_objc_works=yes)
|
||||
gs_cv_objc_works="$cross_gs_cv_objc_works")
|
||||
)
|
||||
if test $gs_cv_objc_works = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@ -1740,7 +1770,7 @@ else
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.constant-string-class.m"],
|
||||
gs_cv_objc_compiler_supports_constant_string_class=yes,
|
||||
gs_cv_objc_compiler_supports_constant_string_class=no,
|
||||
gs_cv_objc_compiler_supports_constant_string_class=no)
|
||||
gs_cv_objc_compiler_supports_constant_string_class="$cross_gs_cv_objc_compiler_supports_constant_string_class")
|
||||
)
|
||||
if test $gs_cv_objc_compiler_supports_constant_string_class = yes; then
|
||||
NX_CONST_STRING_OBJCFLAGS="-fconstant-string-class=NSConstantString"
|
||||
|
@ -1779,7 +1809,7 @@ AC_CACHE_VAL(gs_cv_objc_load_method_worked,
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.loadtest.m"],
|
||||
gs_cv_objc_load_method_worked=yes,
|
||||
gs_cv_objc_load_method_worked=no,
|
||||
gs_cv_objc_load_method_worked=no)
|
||||
gs_cv_objc_load_method_worked="$cross_gs_cv_objc_load_method_worked")
|
||||
)
|
||||
if test $gs_cv_objc_load_method_worked = yes; then
|
||||
AC_DEFINE(HAVE_LOAD_METHOD,1,
|
||||
|
@ -1835,7 +1865,8 @@ if test "$nonfragile" = "yes"; then
|
|||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
AC_MSG_CHECKING(for non-fragile-abi support)
|
||||
AC_RUN_IFELSE([#include "$srcdir/config/config.non-fragile-ivars.m"],
|
||||
non_fragile=yes, non_fragile=no)
|
||||
non_fragile=yes, non_fragile=no,
|
||||
non_fragile="$cross_non_fragile")
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
|
@ -1924,7 +1955,7 @@ AC_MSG_RESULT($have_set_unexpected)
|
|||
|
||||
AC_MSG_CHECKING(for _objc_unexpected_exception in runtime)
|
||||
AC_RUN_IFELSE([#include "$srcdir/config/config.unexpected.m"],
|
||||
have_unexpected=yes, have_unexpected=no)
|
||||
have_unexpected=yes, have_unexpected=no, have_unexpected="$cross_have_unexpected")
|
||||
if test $have_unexpected = yes; then
|
||||
AC_DEFINE(HAVE_UNEXPECTED,1,
|
||||
[Define if libobjc has the _objc_unexpected_exception callback])
|
||||
|
@ -1974,7 +2005,7 @@ AC_SUBST(HAVE_OBJC_SYNC_ENTER)
|
|||
|
||||
AC_MSG_CHECKING(for thread-safe +initialize in runtime)
|
||||
AC_RUN_IFELSE([#include "$srcdir/config/config.initialize.m"],
|
||||
safe_initialize=yes, safe_initialize=no)
|
||||
safe_initialize=yes, safe_initialize=no, safe_initialize="$cross_safe_initialize")
|
||||
if test $safe_initialize = yes; then
|
||||
AC_DEFINE(HAVE_INITIALIZE,1,
|
||||
[Define if libobjc has thread-safe +initialize support])
|
||||
|
@ -2108,7 +2139,7 @@ if test $ac_cv_header_poll_h = yes; then
|
|||
if test $have_poll = yes; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([if poll supports devices])
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.poll-dev.c"], ,have_poll=no, )
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.poll-dev.c"i], ,have_poll=no, have_poll="$cross_have_poll" )
|
||||
if test $have_poll = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_POLL_F,1, [ Define if poll is NOT emulated via select])
|
||||
|
@ -2128,7 +2159,7 @@ if test $ac_cv_func_vsprintf = yes ; then
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.vsprintf.c"],
|
||||
VSPRINTF_RETURNS_LENGTH=1,
|
||||
VSPRINTF_RETURNS_LENGTH=0,
|
||||
VSPRINTF_RETURNS_LENGTH=1)
|
||||
VSPRINTF_RETURNS_LENGTH="$cross_VSPRINTF_RETURNS_LENGTH")
|
||||
AC_DEFINE_UNQUOTED(VSPRINTF_RETURNS_LENGTH, $VSPRINTF_RETURNS_LENGTH,
|
||||
[Define if vsprintf returns the length printed])
|
||||
fi
|
||||
|
@ -2136,7 +2167,7 @@ if test $ac_cv_func_vasprintf = yes ; then
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.vasprintf.c"],
|
||||
VASPRINTF_RETURNS_LENGTH=1,
|
||||
VASPRINTF_RETURNS_LENGTH=0,
|
||||
VASPRINTF_RETURNS_LENGTH=1)
|
||||
VASPRINTF_RETURNS_LENGTH="$cross_VASPRINTF_RETURNS_LENGTH")
|
||||
AC_DEFINE_UNQUOTED(VASPRINTF_RETURNS_LENGTH, $VASPRINTF_RETURNS_LENGTH,
|
||||
[Define if vasprintf returns the length printed])
|
||||
fi
|
||||
|
@ -2316,7 +2347,7 @@ AC_MSG_CHECKING(short/int needs to be word aligned)
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.align.c"],
|
||||
NEED_WORD_ALIGNMENT=0,
|
||||
NEED_WORD_ALIGNMENT=1,
|
||||
NEED_WORD_ALIGNMENT=1)
|
||||
NEED_WORD_ALIGNMENT="$cross_NEED_WORD_ALIGNMENT")
|
||||
AC_DEFINE_UNQUOTED(NEED_WORD_ALIGNMENT, $NEED_WORD_ALIGNMENT,
|
||||
[Define if your system needs to have short/int word aligned])
|
||||
if test $NEED_WORD_ALIGNMENT = 1; then
|
||||
|
@ -2334,13 +2365,13 @@ register_printf=0)
|
|||
if test $register_printf = 1; then
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.printf.c"],
|
||||
working_register_printf=1, working_register_printf=0,
|
||||
working_register_printf=1)
|
||||
working_register_printf="$cross_working_register_printf")
|
||||
if test $working_register_printf = 1; then
|
||||
AC_DEFINE(HAVE_REGISTER_PRINTF_FUNCTION,1,
|
||||
[Define if you have the register_printf_function function])
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.wprintf.c"],
|
||||
wide_register_printf=1, wide_register_printf=0,
|
||||
wide_register_printf=1)
|
||||
wide_register_printf="$cross_wide_register_printf")
|
||||
if test $wide_register_printf = 1; then
|
||||
AC_DEFINE(HAVE_WIDE_PRINTF_FUNCTION,1,
|
||||
[Define if register_printf_function supports wide characters])
|
||||
|
@ -2368,7 +2399,8 @@ main (int argc, char *argv[])
|
|||
extern char *program_invocation_name;
|
||||
return (strcmp (program_invocation_name, argv[0]));
|
||||
}
|
||||
], gs_cv_program_invocation_name_worked=yes, gs_cv_program_invocation_name_worked=no, gs_cv_program_invocation_name_worked=no)])
|
||||
], gs_cv_program_invocation_name_worked=yes, gs_cv_program_invocation_name_worked=no,
|
||||
gs_cv_program_invocation_name_worked="$cross_gs_cv_program_invocation_name_worked")])
|
||||
if test $gs_cv_program_invocation_name_worked = yes; then
|
||||
AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME,1,
|
||||
[Define if your Lib C defines program_invocation_name])
|
||||
|
@ -2404,7 +2436,7 @@ AC_MSG_CHECKING(/proc/$$/cmdline terminated by nul)
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.proccmd.c"],
|
||||
CMDLINE_TERMINATED=1,
|
||||
CMDLINE_TERMINATED=0,
|
||||
CMDLINE_TERMINATED=0)
|
||||
CMDLINE_TERMINATED="$cross_CMDLINE_TERMINATED")
|
||||
AC_DEFINE_UNQUOTED(CMDLINE_TERMINATED, $CMDLINE_TERMINATED,
|
||||
[Define if your system terminates the final argument in /proc/$$/cmdline])
|
||||
if test $CMDLINE_TERMINATED = 1; then
|
||||
|
@ -2424,7 +2456,7 @@ if test "$ac_cv_lib_kvm_kvm_getenvv" = yes; then
|
|||
AC_TRY_RUN([#include "$srcdir/config/config.kvmopen.c"],
|
||||
have_kvm_env=1,
|
||||
have_kvm_env=0,
|
||||
have_kvm_env=0)
|
||||
have_kvm_env="$cross_have_kvm_env")
|
||||
if test $have_kvm_env = 1; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_KVM_ENV, 1,
|
||||
|
@ -2659,7 +2691,7 @@ if test $enable_libffi = yes; then
|
|||
fi
|
||||
LIBS="$ffi_LIBS $LIBS"
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.ffi.c"],
|
||||
ffi_ok="yes",ffi_ok="no",ffi_ok="yes")
|
||||
ffi_ok="yes",ffi_ok="no",ffi_ok="$cross_ffi_ok")
|
||||
if test $ffi_ok = yes; then
|
||||
AC_MSG_RESULT(libffi)
|
||||
if test $do_broken_libffi = yes; then
|
||||
|
@ -2761,6 +2793,8 @@ int main(int argc,char **argv)
|
|||
found_iconv=yes
|
||||
,
|
||||
found_iconv=no
|
||||
,
|
||||
found_iconv="$cross_found_iconv_libc",
|
||||
)
|
||||
|
||||
if test $found_iconv = no ; then
|
||||
|
@ -2787,6 +2821,11 @@ if test $found_iconv = no ; then
|
|||
,
|
||||
found_iconv=no
|
||||
LIBS="$old_LIBS"
|
||||
,
|
||||
found_iconv="$cross_found_iconv_liconv";
|
||||
if test "$found_iconv" = "no"; then
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -2806,6 +2845,11 @@ if test $found_iconv = no ; then
|
|||
,
|
||||
found_iconv=no
|
||||
LIBS="$old_LIBS"
|
||||
,
|
||||
found_iconv="$cross_found_iconv_lgiconv";
|
||||
if test "$found_iconv" = "no"; then
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
)
|
||||
fi
|
||||
|
||||
|
|
28
cross.config
Normal file
28
cross.config
Normal file
|
@ -0,0 +1,28 @@
|
|||
# This configuration file contains the default values for AC_TRY_RUN
|
||||
# or AC_RUN_IFELSE checks performed by the configure script.
|
||||
cross_utf8literal_ok=no
|
||||
cross_reuseaddr_ok=0
|
||||
cross_gs_cv_objc_works=yes
|
||||
cross_gs_cv_objc_compiler_supports_constant_string_class=no
|
||||
cross_gs_cv_objc_load_method_worked=no
|
||||
cross_have_poll=no
|
||||
cross_VSPRINTF_RETURNS_LENGTH=1
|
||||
cross_VASPRINTF_RETURNS_LENGTH=1
|
||||
cross_NEED_WORD_ALIGNMENT=1
|
||||
cross_working_register_printf=1
|
||||
cross_wide_register_printf=1
|
||||
cross_gs_cv_program_invocation_name_worked=no
|
||||
cross_CMDLINE_TERMINATED=0
|
||||
cross_have_kvm_env=0
|
||||
cross_ffi_ok=yes
|
||||
cross_non_fragile=no
|
||||
cross_have_unexpected=no
|
||||
cross_safe_initialize=no
|
||||
cross_found_iconv_libc=no
|
||||
cross_found_iconv_liconv=no
|
||||
cross_found_iconv_lgiconv=no
|
||||
|
||||
# Enable for true cross build
|
||||
if test "cross_compiling"="yes"; then
|
||||
ac_cv_func_setpgrp_void=yes
|
||||
fi
|
Loading…
Reference in a new issue