~ubuntu-branches/debian/squeeze/ffcall/squeeze

« back to all changes in this revision

Viewing changes to src/m4/getcwd.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2010-06-26 15:29:30 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100626152930-c09y01gk3szcnykn
Tags: 1.10+cvs20100619-2
Ship to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl -*- Autoconf -*-
2
 
dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
3
 
dnl This file is free software, distributed under the terms of the GNU
4
 
dnl General Public License.  As a special exception to the GNU General
5
 
dnl Public License, this file may be distributed as part of a program
6
 
dnl that contains a configuration script generated by Autoconf, under
7
 
dnl the same distribution terms as the rest of that program.
8
 
 
9
 
dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
10
 
 
11
 
AC_PREREQ(2.57)
12
 
 
13
 
AC_DEFUN([CL_GETCWD],
14
 
[CL_LINK_CHECK([getcwd], cl_cv_func_getcwd, [
15
 
#ifdef HAVE_UNISTD_H
16
 
#include <sys/types.h>
17
 
#include <unistd.h>
18
 
#endif
19
 
], [getcwd((char*)0,1024);], AC_DEFINE(HAVE_GETCWD,,[have getcwd()]),)
20
 
if test $cl_cv_func_getcwd = yes; then
21
 
CL_PROTO([getcwd], [
22
 
CL_PROTO_TRY([
23
 
#include <stdlib.h>
24
 
#ifdef HAVE_UNISTD_H
25
 
#include <unistd.h>
26
 
#endif
27
 
], [char* getcwd (char* buf, int bufsize);], [char* getcwd();],
28
 
cl_cv_proto_getcwd_arg2="int", cl_cv_proto_getcwd_arg2="size_t")
29
 
], [extern char* getcwd (char*, $cl_cv_proto_getcwd_arg2);])
30
 
AC_DEFINE_UNQUOTED(GETCWD_SIZE_T,$cl_cv_proto_getcwd_arg2,[the type of `bufsize' in getcwd()])
31
 
fi
32
 
])