blob: 3ae52eadf0bd5fe5a48d852b6e855810cd6c4e51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#serial 2
dnl From Mumit Khan and Paul Eggert
dnl Determine whether mkdir accepts only one argument instead of the usual two.
AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
[AC_CHECK_FUNCS(mkdir)
AC_CACHE_CHECK([whether mkdir takes only one argument],
patch_cv_mkdir_takes_one_arg,
[patch_cv_mkdir_takes_one_arg=no
if test $ac_cv_func_mkdir = yes; then
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
],
[mkdir (".", 0);],
,
[AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
],
[mkdir (".");],
patch_cv_mkdir_takes_one_arg=yes
)]
)
fi
]
)
if test $patch_cv_mkdir_takes_one_arg = yes; then
AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
[Define if mkdir takes only one argument.])
fi
]
)
|