summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2011-02-16 12:33:56 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2011-02-16 12:33:56 +0000
commiteb0b154ffd5d61b934224f6602cf61fbe853e1c7 (patch)
tree01bb52b44a01b97ad57dcf1b1b973cb5bba0285c
parentf924432dd556a49a01546d93d27a555c437b6141 (diff)
Fix for STR #2313 (SunOS scandir exception) and avoid double check of
scandir() if the POSIX compatible header was found. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--configure.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 0d5f59b31..41d3f99da 100644
--- a/configure.in
+++ b/configure.in
@@ -472,12 +472,6 @@ dnl Standard headers and functions...
AC_HEADER_DIRENT
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H))
AC_CHECK_HEADER(sys/stdtypes.h,AC_DEFINE(HAVE_SYS_SELECT_H))
-AC_CHECK_FUNC(scandir,
- if test "x$uname" = xSunOS -o "x$uname" = xQNX; then
- AC_MSG_WARN(Not using $uname scandir emulation function.)
- else
- AC_DEFINE(HAVE_SCANDIR)
- fi)
dnl Do we have the POSIX compatible scandir() prototype?
AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype],
@@ -494,8 +488,21 @@ AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype],
AC_LANG_RESTORE
])
+dnl Define both HAVE_SCANDIR... macros, if the POSIX compatible function is
+dnl available. Otherwise: check, whether any scandir prototype is available,
+dnl but don't use it on SunOS and QNX because of an incompatibility in pre-Y2K
+dnl SunOS scandir versions. We assume, though, that the POSIX compatible
+dnl version on newer SunOS/Solaris versions works as expected.
if test "$ac_cv_cxx_scandir_posix" = yes; then
+ AC_DEFINE(HAVE_SCANDIR)
AC_DEFINE(HAVE_SCANDIR_POSIX)
+else
+ AC_CHECK_FUNC(scandir,
+ if test "x$uname" = xSunOS -o "x$uname" = xQNX; then
+ AC_MSG_WARN(Not using $uname scandir emulation function.)
+ else
+ AC_DEFINE(HAVE_SCANDIR)
+ fi)
fi
AC_CHECK_FUNC(vsnprintf,[