diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-02 19:00:26 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-02 19:00:26 +0300 |
commit | 20b95d0831182601e2f92c71a5319f919ca4eb8c (patch) | |
tree | b763ae33d448d0f889f59c967339eb160e42ad74 /configure.in | |
parent | 273454b969bcb42d8f1e5d047352851bce530a63 (diff) | |
parent | 0eda48463ce9c60408515819f9d954fd48567d4f (diff) | |
download | mariadb-git-20b95d0831182601e2f92c71a5319f919ca4eb8c.tar.gz |
Auto-merge from mysql-next-mr.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 8e7dbcfeda6..c7fc07b3f88 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,21 @@ dnl -*- ksh -*- dnl Process this file with autoconf to produce a configure script. +# Copyright (C) 2008-2009 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + AC_PREREQ(2.52)dnl Minimum Autoconf version required. AC_INIT(sql/mysqld.cc) @@ -2944,7 +2959,54 @@ case $SYSTEM_TYPE in esac AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) +#-------------------------------------------------------------------- +# Support for WL#2373 (Use cycle counter for timing) +#-------------------------------------------------------------------- + +AC_CHECK_HEADERS(time.h) +AC_CHECK_HEADERS(sys/time.h) +AC_CHECK_HEADERS(sys/times.h) +AC_CHECK_HEADERS(asm/msr.h) +#msr.h has rdtscll() + +AC_CHECK_HEADERS(ia64intrin.h) + +AC_CHECK_FUNCS(times) +AC_CHECK_FUNCS(gettimeofday) +AC_CHECK_FUNCS(read_real_time) +# This should work on AIX. + +AC_CHECK_FUNCS(ftime) +# This is still a normal call for milliseconds. + +AC_CHECK_FUNCS(time) +# We can use time() on Macintosh if there is no ftime(). + +AC_CHECK_FUNCS(rdtscll) +# I doubt that we'll ever reach the check for this. + +# When compiling with Sun Studio C / C++ we need to include +# my_timer_cycles.il, an "inline templates" separate file, +# on the command line. It has assembly code, "rd %tick" for +# SPARC or "rdtsc" for x86. +RDTSC_SPARC_ASSEMBLY="" +case $CC_VERSION in + *Sun*C*) + RDTSC_SPARC_ASSEMBLY="my_timer_cycles.il" + ;; +esac +case $CXX_VERSION in + *Sun*C++*) + RDTSC_SPARC_ASSEMBLY="my_timer_cycles.il" + ;; +esac + +AC_SUBST([RDTSC_SPARC_ASSEMBLY]) + +#-------------------------------------------------------------------- # Output results +#-------------------------------------------------------------------- + if test -d "$srcdir/pstack" ; then AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile) fi |