]> git.lyx.org Git - lyx.git/commitdiff
Configure tests for mkdir.
authorAngus Leeming <leeming@lyx.org>
Wed, 15 Dec 2004 21:04:03 +0000 (21:04 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 15 Dec 2004 21:04:03 +0000 (21:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9379 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
configure.ac

index d2f585de5a70e980d7172cfd8daae1bf7b98c403..ea2c834d204d2dce9f848485af609c6b36ad5d78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-15  Angus Leeming  <leeming-0hXrFu2P2+c@public.gmane.org>
+
+       * configure.ac: add AC_FUNC_MKDIR test and code to
+       #define mkdir should a non-POSIX version be found.
+
 2004-12-04  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * Most Makefile.am's: Move PCH_FLAGS to AM_CPP flags where
index 8d3080253b17b5c4e7cdd8bc381f59e285c5d5fd..08a27864893ddf44562c35a4bf24334daeb31f28 100644 (file)
@@ -266,6 +266,9 @@ AC_CHECK_FUNCS(strerror)
 LYX_CHECK_DECL(istreambuf_iterator, iterator)
 LYX_CHECK_DECL(mkstemp,[unistd.h stdlib.h])
 
+# Check the form of mkdir()
+AC_FUNC_MKDIR
+
 AC_ARG_ENABLE(compression-support, AC_HELP_STRING([--enable-compression-support],[Support for compressed files.]),[
     case "${enableval}" in
        yes) use_compression=true ;;
@@ -354,6 +357,20 @@ int mkstemp(char*);
 #endif
 #endif
 
+#if HAVE_MKDIR
+#  if MKDIR_TAKES_ONE_ARG
+     /* MinGW32 */
+#    define mkdir(a, b) mkdir(a)
+#  endif
+#else
+#  if HAVE__MKDIR
+     /* plain Windows 32 */
+#    define mkdir(a, b) _mkdir(a)
+#  else
+#    error "Don't know how to create a directory on this system."
+#  endif
+#endif
+
 #ifdef __EMX__
 #include "support/os2_defines.h"
 #endif