dnl CF_ANSI_QSORT version: 4 updated: 2002/10/09 20:00:37
dnl -------------
dnl Test if we should use ANSI-style prototype for qsort's compare-function
AC_DEFUN([CF_ANSI_QSORT],
[
AC_CACHE_CHECK(for standard qsort, cf_cv_ansi_qsort,[
	AC_TRY_COMPILE([
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
	int compare(const void *a, const void *b)
	{ return (*(int *)a - *(int *)b); } ],
	[ extern long *vector;
	  qsort(vector, 1, 1, compare); ],
	[cf_cv_ansi_qsort=yes],
	[cf_cv_ansi_qsort=no])
])

if test $cf_cv_ansi_qsort = yes; then
	AC_DEFINE(ANSI_QSORT,1)
else
	AC_DEFINE(ANSI_QSORT,0)
fi
])dnl
