mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
623c733895
Would you believe that I wrote all of this on a Mac? I just happen to be not using HFS for the partition I did this work on. Oops :) config/ac-macros/alloca.m4: mvdir config/ac-macros/character_sets.m4: mvdir config/ac-macros/check_cpu.m4: mvdir config/ac-macros/compiler_flag.m4: mvdir config/ac-macros/ha_archive.m4: mvdir config/ac-macros/ha_berkeley.m4: mvdir config/ac-macros/ha_example.m4: mvdir config/ac-macros/ha_innodb.m4: mvdir config/ac-macros/ha_isam.m4: mvdir config/ac-macros/ha_ndbcluster.m4: mvdir config/ac-macros/ha_tina.m4: mvdir config/ac-macros/large_file.m4: mvdir config/ac-macros/misc.m4: mvdir config/ac-macros/mysqlfs.m4: mvdir config/ac-macros/openssl.m4: mvdir config/ac-macros/readline.m4: mvdir config/ac-macros/sanity.m4: mvdir config/ac-macros/zlib.m4: mvdir configure.in: Fix silly little problem with case insensitive filesystems. Funny thing is that I wrote all this on a Mac, but I don't use HFS on that partition so I never noticed that it would be an issue. Oops :)
47 lines
1.3 KiB
Text
47 lines
1.3 KiB
Text
AC_DEFUN([MYSQL_CHECK_CPU],
|
|
[AC_CACHE_CHECK([if compiler supports optimizations for current cpu],
|
|
mysql_cv_cpu,[
|
|
|
|
ac_save_CFLAGS="$CFLAGS"
|
|
if test -r /proc/cpuinfo ; then
|
|
cpuinfo="cat /proc/cpuinfo"
|
|
cpu_family=`$cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
|
cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
|
fi
|
|
if test "$cpu_vendor" = "AuthenticAMD"; then
|
|
if test $cpu_family -ge 6; then
|
|
cpu_set="athlon pentiumpro k5 pentium i486 i386";
|
|
elif test $cpu_family -eq 5; then
|
|
cpu_set="k5 pentium i486 i386";
|
|
elif test $cpu_family -eq 4; then
|
|
cpu_set="i486 i386"
|
|
else
|
|
cpu_set="i386"
|
|
fi
|
|
elif test "$cpu_vendor" = "GenuineIntel"; then
|
|
if test $cpu_family -ge 6; then
|
|
cpu_set="pentiumpro pentium i486 i386";
|
|
elif test $cpu_family -eq 5; then
|
|
cpu_set="pentium i486 i386";
|
|
elif test $cpu_family -eq 4; then
|
|
cpu_set="i486 i386"
|
|
else
|
|
cpu_set="i386"
|
|
fi
|
|
fi
|
|
|
|
for ac_arg in $cpu_set;
|
|
do
|
|
CFLAGS="$ac_save_CFLAGS -mcpu=$ac_arg -march=$ac_arg -DCPU=$ac_arg"
|
|
AC_TRY_COMPILE([],[int i],mysql_cv_cpu=$ac_arg; break;, mysql_cv_cpu="unknown")
|
|
done
|
|
|
|
if test "$mysql_cv_cpu" = "unknown"
|
|
then
|
|
CFLAGS="$ac_save_CFLAGS"
|
|
AC_MSG_RESULT(none)
|
|
else
|
|
AC_MSG_RESULT($mysql_cv_cpu)
|
|
fi
|
|
])])
|
|
|