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

« back to all changes in this revision

Viewing changes to ffcall/m4/proto.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 Copyright (C) 1993-2002 Free Software Foundation, Inc.
2
 
dnl This file is free software, distributed under the terms of the GNU
3
 
dnl General Public License.  As a special exception to the GNU General
4
 
dnl Public License, this file may be distributed as part of a program
5
 
dnl that contains a configuration script generated by Autoconf, under
6
 
dnl the same distribution terms as the rest of that program.
7
 
 
8
 
dnl From Bruno Haible, Marcus Daniels.
9
 
 
10
 
AC_PREREQ(2.13)
11
 
 
12
 
dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE)
13
 
AC_DEFUN([CL_PROTO],
14
 
[AC_MSG_CHECKING([for $1 declaration])
15
 
AC_CACHE_VAL(cl_cv_proto_[$1], [$2
16
 
cl_cv_proto_$1="$3"])
17
 
cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'`
18
 
AC_MSG_RESULT([$]{ac_t:-
19
 
         }[$]cl_cv_proto_$1)
20
 
])
21
 
 
22
 
dnl CL_PROTO_RET(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS)
23
 
AC_DEFUN([CL_PROTO_RET],
24
 
[AC_TRY_COMPILE([$1]
25
 
AC_LANG_EXTERN
26
 
[#if defined(__STDC__) || defined(__cplusplus)
27
 
$2
28
 
#else
29
 
$3
30
 
#endif
31
 
], [], $4="$5", $4="$6")
32
 
])
33
 
 
34
 
dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS)
35
 
AC_DEFUN([CL_PROTO_TRY],
36
 
[AC_TRY_COMPILE([$1]
37
 
AC_LANG_EXTERN
38
 
[#if defined(__STDC__) || defined(__cplusplus)
39
 
$2
40
 
#else
41
 
$3
42
 
#endif
43
 
], [], [$4], [$5])
44
 
])
45
 
 
46
 
dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID)
47
 
AC_DEFUN([CL_PROTO_CONST],
48
 
[CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")]
49
 
)