Semantic fix. Should prevent people from whining that their Turion 64 are 'incorrectly' detected as k8. >:|

This commit is contained in:
grinvader
2005-10-27 23:00:15 +00:00
parent 69cb866762
commit a81505b672
2 changed files with 17 additions and 17 deletions

View File

@@ -237,21 +237,21 @@ dnl -- End libpng autoconf macro
dnl ----
dnl -- Begin custom cpu detection autoconf macro
dnl -- Begin custom arch detection autoconf macro
dnl Copyright (c) 2005 Nach, grinvader
dnl Under the GPL License
dnl When copying, include from Begin to End custom cpu detection autoconf macro,
dnl When copying, include from Begin to End custom arch detection autoconf macro,
dnl including those tags, so others can easily copy it too.
dnl
dnl AM_CPU_DETECT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl AM_ARCH_DETECT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Reads the first entry in /proc/cpuinfo or uses cpuid to grab what is needed,
dnl outputs CPU_INFO
AC_DEFUN([AM_CPU_DETECT],
dnl outputs ARCH_INFO
AC_DEFUN([AM_ARCH_DETECT],
[
CPU_INFO=""
ARCH_INFO=""
AC_MSG_CHECKING(for cpu info)
AC_ARG_ENABLE(cpucheck, [ --disable-cpucheck Do not try to autodetect cpu ],,enable_cpucheck=yes)
AC_ARG_ENABLE(cpucheck, [ --disable-cpucheck Do not try to autodetect cpu architecture ],,enable_cpucheck=yes)
if test x$enable_cpucheck != xno; then
AC_TRY_RUN([
@@ -544,7 +544,7 @@ if test x$enable_cpucheck != xno; then
else { cpu = "i386"; }
}
if ((fp = fopen("conf.cpuchk", "a")))
if ((fp = fopen("conf.archchk", "a")))
{
fprintf(fp, "%s", cpu);
fclose(fp);
@@ -558,18 +558,18 @@ if test x$enable_cpucheck != xno; then
if test x$cpu_found = xyes; then
AC_MSG_RESULT(found)
CPU_INFO=$(<conf.cpuchk)
ARCH_INFO=$(<conf.archchk)
ifelse([$1], , :, [$1])
rm conf.cpuchk
rm conf.archchk
else
AC_MSG_RESULT(not found)
ifelse([$2], , :, [$2])
fi
AC_SUBST(CPU_INFO)
AC_SUBST(ARCH_INFO)
else
AC_MSG_RESULT(disabled by user)
fi
])
dnl -- End custom cpu detection autoconf macro
dnl -- End custom arch detection autoconf macro

View File

@@ -132,10 +132,10 @@ else
NFLAGS="$NFLAGS -O1"
fi
AM_CPU_DETECT()
AM_ARCH_DETECT()
AC_MSG_CHECKING(which processor arch to optimize for)
if test x$CPU_INFO = x ; then
AC_MSG_CHECKING(which cpu architecture to optimize for)
if test x$ARCH_INFO = x ; then
case "$target" in
x86_64-*-* | x86_64-*-*-*)
AC_MSG_RESULT(guessing x86-64)
@@ -161,8 +161,8 @@ else
;;
esac
else
AC_MSG_RESULT($CPU_INFO)
CFLAGS="$CFLAGS -march=$CPU_INFO"
AC_MSG_RESULT($ARCH_INFO)
CFLAGS="$CFLAGS -march=$ARCH_INFO"
fi
fi
CXXFLAGS="$CFLAGS -fno-rtti"