summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2009-07-23 22:51:56 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2009-07-23 22:51:56 +0000
commitf42c5415294d6927ecff1319dd6a6141626f6ff9 (patch)
treeae34e2873d6822ccce327f8b5905f1be20280f30 /configure.in
parenta32ec7f20e1cad1293a0cc8aee1834b1ee67dc80 (diff)
Fixed glibc 2.10 compiler problems (Fedora 11 and others) with scandir()
and strchr() (STR #2222). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 2da2818e6..bbc178df5 100644
--- a/configure.in
+++ b/configure.in
@@ -449,6 +449,26 @@ AC_CHECK_FUNC(scandir,
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],
+ ac_cv_cxx_scandir_posix,[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <dirent.h>
+ int func (const char *d, dirent ***list, void *sort) {
+ int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
+ }
+ ],[
+ ], ac_cv_cxx_scandir_posix=yes, ac_cv_cxx_scandir_posix=no)
+ AC_LANG_RESTORE
+ ])
+
+if test "$ac_cv_cxx_scandir_posix" = yes; then
+ AC_DEFINE(HAVE_SCANDIR_POSIX)
+fi
+
AC_CHECK_FUNC(vsnprintf,[
case "$uname" in
HP-UX*)