• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl *
2dnl * Copyright (c) 2001  Motoyuki Kasahara
3dnl *
4dnl * Redistribution and use in source and binary forms, with or without
5dnl * modification, are permitted provided that the following conditions
6dnl * are met:
7dnl * 1. Redistributions of source code must retain the above copyright
8dnl *    notice, this list of conditions and the following disclaimer.
9dnl * 2. Redistributions in binary form must reproduce the above copyright
10dnl *    notice, this list of conditions and the following disclaimer in the
11dnl *    documentation and/or other materials provided with the distribution.
12dnl * 3. Neither the name of the project nor the names of its contributors
13dnl *    may be used to endorse or promote products derived from this software
14dnl *    without specific prior written permission.
15dnl *
16dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
17dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19dnl * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE
20dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26dnl * THE POSSIBILITY OF SUCH DAMAGE.
27dnl *
28
29dnl *
30dnl * Check for h_errno.
31dnl *
32AC_DEFUN([AC_DECL_H_ERRNO],
33[AC_CACHE_CHECK(for h_errno declaration in netdb.h, ac_cv_decl_h_errno,
34[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
35#include <netdb.h>]], [[
36h_errno = 0;
37]])],[ac_cv_decl_h_errno=yes],[ac_cv_decl_h_errno=no])])
38if test "$ac_cv_decl_h_errno" = yes; then
39    AC_DEFINE(H_ERRNO_DECLARED, 1,
40[Define to 1 if `h_errno' is declared by <netdb.h>])
41fi])
42