]> www.ginac.de Git - cln.git/blob - m4/perror.m4
* Update.
[cln.git] / m4 / perror.m4
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_PERROR],
14 [AC_MSG_CHECKING(for perror declaration)
15 AC_CACHE_VAL(cl_cv_proto_perror, [
16 AC_TRY_COMPILE([
17 /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
18    declare it at all. */
19 #include <stdio.h>
20 #include <errno.h>
21 ]AC_LANG_EXTERN[double perror ();], [],
22 cl_cv_proto_perror=no, cl_cv_proto_perror=yes)
23 ])
24 AC_MSG_RESULT([$cl_cv_proto_perror])
25 if test $cl_cv_proto_perror = yes; then
26 AC_DEFINE(HAVE_PERROR_DECL,,[<errno.h> or <stdio.h> contains a declaration for perror()])
27 fi
28 ])