mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Rewrite test whether the compiler supports the non-fragile ABI once
more, so that it now reports the correct result. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@36936 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5fd8baaec0
commit
3500c55b55
3 changed files with 46 additions and 189 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-07-26 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* configure.ac: Rewrite test whether the compiler supports the
|
||||
non-fragile ABI once more, so that it now reports the correct
|
||||
result.
|
||||
* configure: Regenerated.
|
||||
|
||||
2013-07-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Version:
|
||||
|
|
215
configure
vendored
215
configure
vendored
|
@ -638,8 +638,6 @@ target
|
|||
target_cpu
|
||||
target_vendor
|
||||
target_os
|
||||
GREP
|
||||
EGREP
|
||||
OBJC_WITH_GC
|
||||
ac_cv_library_combo
|
||||
cc_cppprecomp
|
||||
|
@ -3715,169 +3713,6 @@ test -n "$target_alias" &&
|
|||
NONENONEs,x,x, &&
|
||||
program_prefix=${target_alias}-
|
||||
|
||||
# We may use egrep for some tests further down below
|
||||
{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
|
||||
echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_path_GREP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
# Extract the first word of "grep ggrep" to use in msg output
|
||||
if test -z "$GREP"; then
|
||||
set dummy grep ggrep; ac_prog_name=$2
|
||||
if test "${ac_cv_path_GREP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_path_GREP_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in grep ggrep; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
|
||||
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
|
||||
# Check for GNU ac_path_GREP and select it if it is found.
|
||||
# Check for GNU $ac_path_GREP
|
||||
case `"$ac_path_GREP" --version 2>&1` in
|
||||
*GNU*)
|
||||
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
echo 'GREP' >> "conftest.nl"
|
||||
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
ac_count=`expr $ac_count + 1`
|
||||
if test $ac_count -gt ${ac_path_GREP_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_GREP="$ac_path_GREP"
|
||||
ac_path_GREP_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
|
||||
|
||||
$ac_path_GREP_found && break 3
|
||||
done
|
||||
done
|
||||
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
|
||||
fi
|
||||
|
||||
GREP="$ac_cv_path_GREP"
|
||||
if test -z "$GREP"; then
|
||||
{ { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
|
||||
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
else
|
||||
ac_cv_path_GREP=$GREP
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
|
||||
echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
|
||||
GREP="$ac_cv_path_GREP"
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for egrep" >&5
|
||||
echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_path_EGREP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
|
||||
then ac_cv_path_EGREP="$GREP -E"
|
||||
else
|
||||
# Extract the first word of "egrep" to use in msg output
|
||||
if test -z "$EGREP"; then
|
||||
set dummy egrep; ac_prog_name=$2
|
||||
if test "${ac_cv_path_EGREP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_path_EGREP_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in egrep; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
|
||||
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
|
||||
# Check for GNU ac_path_EGREP and select it if it is found.
|
||||
# Check for GNU $ac_path_EGREP
|
||||
case `"$ac_path_EGREP" --version 2>&1` in
|
||||
*GNU*)
|
||||
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
echo 'EGREP' >> "conftest.nl"
|
||||
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
ac_count=`expr $ac_count + 1`
|
||||
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_EGREP="$ac_path_EGREP"
|
||||
ac_path_EGREP_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
|
||||
|
||||
$ac_path_EGREP_found && break 3
|
||||
done
|
||||
done
|
||||
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
|
||||
fi
|
||||
|
||||
EGREP="$ac_cv_path_EGREP"
|
||||
if test -z "$EGREP"; then
|
||||
{ { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
|
||||
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
else
|
||||
ac_cv_path_EGREP=$EGREP
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
|
||||
echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
|
||||
EGREP="$ac_cv_path_EGREP"
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check if objc should use garbage collection.
|
||||
|
@ -6398,28 +6233,44 @@ echo "$as_me: error: compiler doesn't support nonfragile ABI" >&2;}
|
|||
fi
|
||||
else
|
||||
if test x"$USE_NONFRAGILE_ABI" != x"no"; then
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
__has_feature(objc_nonfragile_abi)
|
||||
return __has_feature(objc_nonfragile_abi) ? 0 : 1;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "^1$" >/dev/null 2>&1; then
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
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_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
USE_NONFRAGILE_ABI=yes
|
||||
else
|
||||
USE_NONFRAGILE_ABI=no
|
||||
fi
|
||||
rm -f -r conftest*
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
USE_NONFRAGILE_ABI=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
if test x"$USE_NONFRAGILE_ABI" = x"yes"; then
|
||||
{ echo "$as_me:$LINENO: result: yes (compiler default)" >&5
|
||||
|
@ -7833,8 +7684,6 @@ target!$target$ac_delim
|
|||
target_cpu!$target_cpu$ac_delim
|
||||
target_vendor!$target_vendor$ac_delim
|
||||
target_os!$target_os$ac_delim
|
||||
GREP!$GREP$ac_delim
|
||||
EGREP!$EGREP$ac_delim
|
||||
OBJC_WITH_GC!$OBJC_WITH_GC$ac_delim
|
||||
ac_cv_library_combo!$ac_cv_library_combo$ac_delim
|
||||
cc_cppprecomp!$cc_cppprecomp$ac_delim
|
||||
|
@ -7870,6 +7719,8 @@ GNUSTEP_SYSTEM_DOC!$GNUSTEP_SYSTEM_DOC$ac_delim
|
|||
GNUSTEP_SYSTEM_DOC_INFO!$GNUSTEP_SYSTEM_DOC_INFO$ac_delim
|
||||
GNUSTEP_SYSTEM_DOC_MAN!$GNUSTEP_SYSTEM_DOC_MAN$ac_delim
|
||||
GNUSTEP_NETWORK_APPS!$GNUSTEP_NETWORK_APPS$ac_delim
|
||||
GNUSTEP_NETWORK_ADMIN_APPS!$GNUSTEP_NETWORK_ADMIN_APPS$ac_delim
|
||||
GNUSTEP_NETWORK_WEB_APPS!$GNUSTEP_NETWORK_WEB_APPS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
|
@ -7911,8 +7762,6 @@ _ACEOF
|
|||
ac_delim='%!_!# '
|
||||
for ac_last_try in false false false false false :; do
|
||||
cat >conf$$subs.sed <<_ACEOF
|
||||
GNUSTEP_NETWORK_ADMIN_APPS!$GNUSTEP_NETWORK_ADMIN_APPS$ac_delim
|
||||
GNUSTEP_NETWORK_WEB_APPS!$GNUSTEP_NETWORK_WEB_APPS$ac_delim
|
||||
GNUSTEP_NETWORK_TOOLS!$GNUSTEP_NETWORK_TOOLS$ac_delim
|
||||
GNUSTEP_NETWORK_ADMIN_TOOLS!$GNUSTEP_NETWORK_ADMIN_TOOLS$ac_delim
|
||||
GNUSTEP_NETWORK_LIBRARY!$GNUSTEP_NETWORK_LIBRARY$ac_delim
|
||||
|
@ -7986,7 +7835,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
|||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
13
configure.ac
13
configure.ac
|
@ -57,9 +57,6 @@ AC_PROG_CXX
|
|||
#AC_PROG_OBJCXX
|
||||
OBJCXX="${CXX}"
|
||||
|
||||
# We may use egrep for some tests further down below
|
||||
AC_PROG_EGREP
|
||||
|
||||
AC_CANONICAL_TARGET([])
|
||||
|
||||
|
||||
|
@ -1383,12 +1380,16 @@ return __has_feature(objc_nonfragile_abi) ? 0 : 1;
|
|||
fi
|
||||
else
|
||||
if test x"$USE_NONFRAGILE_ABI" != x"no"; then
|
||||
AC_EGREP_CPP([^1$], [
|
||||
AC_COMPILE_IFELSE([[
|
||||
int
|
||||
main()
|
||||
{
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
__has_feature(objc_nonfragile_abi)
|
||||
], USE_NONFRAGILE_ABI=yes, USE_NONFRAGILE_ABI=no)
|
||||
return __has_feature(objc_nonfragile_abi) ? 0 : 1;
|
||||
}
|
||||
]], USE_NONFRAGILE_ABI=yes, USE_NONFRAGILE_ABI=no)
|
||||
fi
|
||||
if test x"$USE_NONFRAGILE_ABI" = x"yes"; then
|
||||
AC_MSG_RESULT([yes (compiler default)])
|
||||
|
|
Loading…
Reference in a new issue