Improve last change based on suggestions by David Chisnall.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@35602 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2012-09-24 10:35:19 +00:00
parent 3221812e13
commit 3511ce32d0
3 changed files with 25 additions and 57 deletions

View file

@ -1,3 +1,9 @@
2012-09-24 Niels Grewe <niels.grewe@halbordnung.de>
* configure.ac: Improve last change based on suggestions by David
Chisnall.
* configure: Regenerate.
2012-09-24 Niels Grewe <niels.grewe@halbordnung.de>
* configure.ac: Also try to detect whether the nonfragile ABI is the

56
configure vendored
View file

@ -6342,7 +6342,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "${enable_objc_nonfragile_abi+set}" = set; then
enableval=$enable_objc_nonfragile_abi; USE_NONFRAGILE_ABI=$enableval
else
USE_NONFRAGILE_ABI=no
USE_NONFRAGILE_ABI=unset
fi
@ -6425,53 +6425,15 @@ echo "$as_me: error: compiler doesn't support nonfragile ABI" >&2;}
{ (exit 1); exit 1; }; }
fi
else
if test "$cross_compiling" = yes; then
USE_NONFRAGILE_ABI=no
else
cat >conftest.$ac_ext <<_ACEOF
int
main()
{
#ifndef __has_feature
#define __has_feature(x) 0
#endif
return __has_feature(objc_nonfragile_abi) ? 0 : 1;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
USE_NONFRAGILE_ABI=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
USE_NONFRAGILE_ABI=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test x$USE_NONFRAGILE_ABI != xno; then
default_nonfragile=`echo -e '#ifndef __has_feature\n#define __has_feature(x) 0\n#endif\n__has_feature(objc_nonfragile_abi)'|$CC $CFLAGS -E -x objective-c - -o - |tail -1`
if test x$default_nonfragile = x1; then
USE_NONFRAGILE_ABI=yes;
else
USE_NONFRAGILE_ABI=no;
fi
fi
if test x$USE_NONFRAGILE_ABI = xyes; then
{ echo "$as_me:$LINENO: result: yes (compiler default)" >&5
echo "${ECHO_T}yes (compiler default)" >&6; }

View file

@ -1349,7 +1349,7 @@ AC_ARG_ENABLE(objc-nonfragile-abi, [
to use non-fragile instance variables provided by clang and libobjc2.
],
USE_NONFRAGILE_ABI=$enableval,
USE_NONFRAGILE_ABI=no)
USE_NONFRAGILE_ABI=unset)
AC_MSG_CHECKING(whether we should use the nonfragile ABI)
if test x"$USE_NONFRAGILE_ABI" = x"yes"; then
@ -1379,15 +1379,15 @@ return __has_feature(objc_nonfragile_abi) ? 0 : 1;
AC_MSG_ERROR([compiler doesn't support nonfragile ABI])
fi
else
AC_RUN_IFELSE([[
int
main()
{
#ifndef __has_feature
#define __has_feature(x) 0
#endif
return __has_feature(objc_nonfragile_abi) ? 0 : 1;
}]], USE_NONFRAGILE_ABI=yes, USE_NONFRAGILE_ABI=no, USE_NONFRAGILE_ABI=no)
if test x$USE_NONFRAGILE_ABI != xno; then
default_nonfragile=`echo -e '#ifndef __has_feature\n#define __has_feature(x) 0\n#endif\n__has_feature(objc_nonfragile_abi)'|$CC $CFLAGS -E -x objective-c - -o - |tail -1`
if test x$default_nonfragile = x1; then
USE_NONFRAGILE_ABI=yes;
else
USE_NONFRAGILE_ABI=no;
fi
fi
if test x$USE_NONFRAGILE_ABI = xyes; then
AC_MSG_RESULT([yes (compiler default)])
else