Configure tests for mkdir.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9380 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2004-12-15 21:04:03 +00:00
parent abe7afc2c4
commit 7aebf3d92f
2 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2004-12-15 Angus Leeming <leeming-0hXrFu2P2+c@public.gmane.org>
* lyxinclude.m4: define AC_FUNC_MKDIR.
2004-12-05 Lars Gullik Bjønnes <larsbj@lyx.org>
* common.am: setup variables for boost

View File

@ -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 <sys/stat.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#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
])