From abe7afc2c416a9bbd32e8fbcc804422b2205c4b3 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 15 Dec 2004 21:04:03 +0000 Subject: [PATCH] Configure tests for mkdir. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9379 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 5 +++++ configure.ac | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index d2f585de5a..ea2c834d20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-15 Angus Leeming + + * 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 * Most Makefile.am's: Move PCH_FLAGS to AM_CPP flags where diff --git a/configure.ac b/configure.ac index 8d3080253b..08a2786489 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.39.5