2008-10-28 20:22:29 +03:00
|
|
|
dnl -*- shell-script -*-
|
|
|
|
dnl
|
|
|
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
dnl University Research and Technology
|
|
|
|
dnl Corporation. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
dnl of Tennessee Research Foundation. All rights
|
|
|
|
dnl reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl University of Stuttgart. All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
dnl All rights reserved.
|
|
|
|
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
2014-05-07 19:45:47 +04:00
|
|
|
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
|
|
|
dnl There was some mentioning of broken qsort happened for Solaris that could
|
|
|
|
dnl cause qsort to return a bad pointer which could cause some badness.
|
|
|
|
dnl The problem should have been corrected with these patches from SunSolve.
|
|
|
|
dnl Solaris 10 should be free from this problem.
|
|
|
|
dnl
|
|
|
|
dnl 5.8_sparc #108827-27 or later
|
|
|
|
dnl 5.8_x86 #108828-28 or later
|
|
|
|
dnl 5.9_sparc #112874-20 or later
|
|
|
|
dnl 5.9_x86 #114432-07 or later
|
|
|
|
dnl
|
|
|
|
dnl For users who could not patch their systems or are convinced that their
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl native qsort is broken, they could specify this configure flag to use
|
2008-10-28 20:22:29 +03:00
|
|
|
dnl the opal_qsort instead.
|
|
|
|
|
|
|
|
# check for broken qsort
|
2014-05-07 19:45:47 +04:00
|
|
|
# OPAL_CHECK_BROKEN_QSORT(prefix, [action-if-found], [action-if-not-found])
|
2008-10-28 20:22:29 +03:00
|
|
|
# --------------------------------------------------------
|
2014-05-07 19:45:47 +04:00
|
|
|
AC_DEFUN([OPAL_CHECK_BROKEN_QSORT],[
|
2008-10-28 20:22:29 +03:00
|
|
|
AC_ARG_WITH([broken-qsort],
|
|
|
|
[AC_HELP_STRING([--with-broken-qsort],
|
|
|
|
[Build with FreeBSD qsort instead of native qsort (default: no)])])
|
|
|
|
AC_MSG_CHECKING([for broken qsort])
|
|
|
|
|
|
|
|
if test "$with_broken_qsort" = "yes"; then
|
|
|
|
result="yes"
|
|
|
|
define_result=1
|
|
|
|
else
|
|
|
|
result="no"
|
|
|
|
define_result=0
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT([$result])
|
2009-05-07 00:11:28 +04:00
|
|
|
AC_DEFINE_UNQUOTED([OPAL_HAVE_BROKEN_QSORT], [$define_result],
|
2008-10-28 20:22:29 +03:00
|
|
|
[whether qsort is broken or not])
|
|
|
|
])
|