You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1014 B

  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. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  9. AC_PREREQ(2.57)
  10. AC_DEFUN([CL_PERROR],
  11. [AC_MSG_CHECKING(for perror declaration)
  12. AC_CACHE_VAL(cl_cv_proto_perror, [
  13. AC_TRY_COMPILE([
  14. /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
  15. declare it at all. */
  16. #include <stdio.h>
  17. #include <errno.h>
  18. ]AC_LANG_EXTERN[double perror ();], [],
  19. cl_cv_proto_perror=no, cl_cv_proto_perror=yes)
  20. ])
  21. AC_MSG_RESULT([$cl_cv_proto_perror])
  22. if test $cl_cv_proto_perror = yes; then
  23. AC_DEFINE(HAVE_PERROR_DECL,,[<errno.h> or <stdio.h> contains a declaration for perror()])
  24. fi
  25. ])