From 70a19815326d7e76657848aeaa58ee61db34df58 Mon Sep 17 00:00:00 2001 From: Maciej Piechotka Date: Thu, 31 Mar 2011 09:00:27 +0200 Subject: [PATCH] Allow caching have_qsort_r which re-enables cross-compiling https://bugzilla.gnome.org/show_bug.cgi?id=646309 --- configure.ac | 6 +++--- docs/reference/glib/cross.sgml | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 73690f4..e122418 100644 --- a/configure.ac +++ b/configure.ac @@ -574,7 +574,7 @@ AC_FUNC_ALLOCA AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2) AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r) # BSD has a qsort_r with wrong argument order -AC_MSG_CHECKING([for qsort_r]) +AC_CACHE_CHECK([for qsort_r], glib_cv_have_qsort_r, [ AC_RUN_IFELSE([[ #define _GNU_SOURCE #include @@ -605,9 +605,9 @@ main (int argc, char **argv) return 0; else return 1; -}]],[have_qsort_r=yes],[have_qsort_r=no]) +}]],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no])]) -if test $have_qsort_r = yes ; then +if test $glib_cv_have_qsort_r = yes ; then AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function]) else diff --git a/docs/reference/glib/cross.sgml b/docs/reference/glib/cross.sgml index 40c0a1f..f31ae60 100644 --- a/docs/reference/glib/cross.sgml +++ b/docs/reference/glib/cross.sgml @@ -110,6 +110,15 @@ chmod a-w win32.cache # prevent configure from changing it + glib_cv_have_qsort_r=[yes/no] + + + Whether you have qsort_r() that matches + BSD. Defaults to "no", which is safe, since GLib uses a + built-in version in that case. + + + glib_cv_va_val_copy=[yes/no] -- 2.7.4