autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_MKDIR/cross-cc/number-of-args??


From: Thomas E. Dickey
Subject: Re: AC_MKDIR/cross-cc/number-of-args??
Date: Wed, 10 Jan 2001 12:43:11 -0500 (EST)

On 10 Jan 2001, Alexandre Duret-Lutz wrote:

> >>> "Thomas" == Thomas E Dickey <address@hidden> writes:
> 
> [...]
> 
>  Thomas> it doesn't cover the problem areas (compilers that mistreat mkdir
>  Thomas> may prototype it in dir.h and dirent.h, for instance).
> 
> Would it be sufficient to check for these headers and #include
> them in the AC_TRY_COMPILE block?  (and is AC_HEADER_DIRENT
> suitable for this?)

I think that might be a good starting point (with the set of recommended
ifdef's and includes for AC_HEADER_DIRENT, of course).

> 
>  >> 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>
>  >> #ifdef HAVE_UNISTD_H
>  >> # include <unistd.h>
>  >> #endif
>  >> ],[mkdir (".");],
> 
> [...]
> 
> 

-- 
T.E.Dickey <address@hidden>
http://dickey.his.com
ftp://dickey.his.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]