[libdvdcss-devel] build: check for POSIX mkdir() function.

Diego Elio Pettenò git at videolan.org
Thu Feb 14 16:57:35 CET 2013


libdvdcss | branch: master | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Thu Feb 14 06:48:36 2013 -0800| [c5fc11a1179a088c9cafb14a1b5cdf40adbb946c] | committer: Jean-Baptiste Kempf

build: check for POSIX mkdir() function.

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

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=c5fc11a1179a088c9cafb14a1b5cdf40adbb946c
---

 configure.ac |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/configure.ac b/configure.ac
index 40ab624..010f6c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,32 @@ AC_CHECK_HEADERS(unistd.h sys/param.h sys/uio.h limits.h pwd.h errno.h)
 
 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



More information about the libdvdcss-devel mailing list