shithub: libdvdcss

Download patch

ref: c5fc11a1179a088c9cafb14a1b5cdf40adbb946c
parent: 391036711755ec403aca99e8668d5755a44be32f
author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
date: Thu Feb 14 01:48:36 EST 2013

build: check for POSIX mkdir() function.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,32 @@
 
 AC_SYS_LARGEFILE
 
+AC_CHECK_HEADERS([sys/stat.h sys/types.h io.h])
+AC_CACHE_CHECK(
+  [for posix mkdir()],
+  [css_cv_mkdir_posix], [
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#ifdef HAVE_IO_H
+# include <io.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+int mkdir(const char *path, mode_t mode);
+      ])
+    ],
+    [css_cv_mkdir_posix=yes],
+    [css_cv_mkdir_posix=no])
+  ])
+
+AS_IF([test "$css_cv_mkdir_posix" = "no"], [
+  AC_DEFINE([HAVE_BROKEN_MKDIR], 1, [Define if you have a broken mkdir])
+])
+
 dnl
 dnl  Check the operating system
 dnl