diff --git a/config/config.h.in b/config/config.h.in
index b50cf69..ed89d03 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -113,9 +113,12 @@
/* Define to 1 if you have the `clock' function. */
#undef HAVE_CLOCK
-/* Define to 1 if you have the `clock_gettime' function. */
+/* Define to 1 if you have clock_gettime. */
#undef HAVE_CLOCK_GETTIME
+/* Define to 1 if clock_gettime supports CLOCK_REALTIME. */
+#undef HAVE_CLOCK_REALTIME
+
/* Define to 1 if you have the `closedir' function. */
#undef HAVE_CLOSEDIR
diff --git a/config/configure.xml b/config/configure.xml
index e4d7d98..ccd5e16 100644
--- a/config/configure.xml
+++ b/config/configure.xml
@@ -9,7 +9,7 @@
<configure name="NAME" value="ImageMagick"/>
<configure name="LIB_VERSION" value="0x656"/>
<configure name="LIB_VERSION_NUMBER" value="6,5,6,6"/>
- <configure name="RELEASE_DATE" value="2009-09-27"/>
+ <configure name="RELEASE_DATE" value="2009-09-28"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
diff --git a/configure b/configure
index 2a3be67..6a81949 100755
--- a/configure
+++ b/configure
Binary files differ
diff --git a/configure.ac b/configure.ac
index 4d2ba37..77a4968 100755
--- a/configure.ac
+++ b/configure.ac
@@ -987,7 +987,31 @@
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([_exit atexit clock clock_gettime directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([_exit atexit clock directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
+
+#
+# Check for clock_gettime().
+#
+AC_SEARCH_LIBS(clock_gettime, rt,
+[
+ AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
+ AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [[#include <time.h>]],
+ [[clockid_t clockType = CLOCK_REALTIME;]]),
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
+ [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
+ ],
+ AC_MSG_RESULT(no)
+ )
+ ],
+ [
+ AC_CHECK_FUNCS([gettimeofday ftime], [break])
+ ]
+)
########
#
diff --git a/magick/magick-config.h b/magick/magick-config.h
index 2aa26e6..03050ac 100644
--- a/magick/magick-config.h
+++ b/magick/magick-config.h
@@ -172,11 +172,16 @@
#define MAGICKCORE_HAVE_CLOCK 1
#endif
-/* Define to 1 if you have the `clock_gettime' function. */
+/* Define to 1 if you have clock_gettime. */
#ifndef MAGICKCORE_HAVE_CLOCK_GETTIME
#define MAGICKCORE_HAVE_CLOCK_GETTIME 1
#endif
+/* Define to 1 if clock_gettime supports CLOCK_REALTIME. */
+#ifndef MAGICKCORE_HAVE_CLOCK_REALTIME
+#define MAGICKCORE_HAVE_CLOCK_REALTIME 1
+#endif
+
/* Define to 1 if you have the `closedir' function. */
#ifndef MAGICKCORE_HAVE_CLOSEDIR
#define MAGICKCORE_HAVE_CLOSEDIR 1
diff --git a/magick/version.h b/magick/version.h
index 593c500..402cc4c 100644
--- a/magick/version.h
+++ b/magick/version.h
@@ -31,7 +31,7 @@
#define MagickLibVersionText "6.5.6"
#define MagickLibVersionNumber 2,0,0
#define MagickLibSubversion "-6"
-#define MagickReleaseDate "2009-09-27"
+#define MagickReleaseDate "2009-09-28"
#define MagickChangeDate "20090925"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.5.6/index.html"