diff --git a/config/ChangeLog b/config/ChangeLog index 4bf64b4ea5..a9153969e7 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2004-12-15 Angus Leeming + + * lyxinclude.m4: define AC_FUNC_MKDIR. + 2004-12-05 Lars Gullik Bjønnes * common.am: setup variables for boost diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 0b90f4e912..8ea6b2355a 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -574,3 +574,28 @@ AM_PROG_LIBTOOL dnl for libraries CC=$ac_save_cc CFLAGS="$ac_save_cflags" ]) + + +## ------------------------------------------------------------------------ +## Check whether mkdir() is mkdir or _mkdir, and whether it takes +## one or two arguments. +## +## http://ac-archive.sourceforge.net/C_Support/ac_func_mkdir.html +## ------------------------------------------------------------------------ +## +AC_DEFUN([AC_FUNC_MKDIR], +[AC_CHECK_FUNCS([mkdir _mkdir]) +AC_CACHE_CHECK([whether mkdir takes one argument], + [ac_cv_mkdir_takes_one_arg], +[AC_TRY_COMPILE([ +#include +#if HAVE_UNISTD_H +# include +#endif +], [mkdir (".");], +[ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])]) +if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then + AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1, + [Define if mkdir takes only one argument.]) +fi +])