|
Packit Service |
b05338 |
# ===========================================================================
|
|
Packit Service |
b05338 |
# http://www.gnu.org/software/autoconf-archive/ax_type_socklen_t.html
|
|
Packit Service |
b05338 |
# ===========================================================================
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# SYNOPSIS
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# AX_TYPE_SOCKLEN_T
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# DESCRIPTION
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# Check whether sys/socket.h defines type socklen_t. Please note that some
|
|
Packit Service |
b05338 |
# systems require sys/types.h to be included before sys/socket.h can be
|
|
Packit Service |
b05338 |
# compiled.
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# LICENSE
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# Copyright (c) 2008 Lars Brinkhoff <lars@nocrew.org>
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# This program is free software; you can redistribute it and/or modify it
|
|
Packit Service |
b05338 |
# under the terms of the GNU General Public License as published by the
|
|
Packit Service |
b05338 |
# Free Software Foundation; either version 2 of the License, or (at your
|
|
Packit Service |
b05338 |
# option) any later version.
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# This program is distributed in the hope that it will be useful, but
|
|
Packit Service |
b05338 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
b05338 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
Packit Service |
b05338 |
# Public License for more details.
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# You should have received a copy of the GNU General Public License along
|
|
Packit Service |
b05338 |
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
Packit Service |
b05338 |
# gives unlimited permission to copy, distribute and modify the configure
|
|
Packit Service |
b05338 |
# scripts that are the output of Autoconf when processing the Macro. You
|
|
Packit Service |
b05338 |
# need not follow the terms of the GNU General Public License when using
|
|
Packit Service |
b05338 |
# or distributing such scripts, even though portions of the text of the
|
|
Packit Service |
b05338 |
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
Packit Service |
b05338 |
# all other use of the material that constitutes the Autoconf Macro.
|
|
Packit Service |
b05338 |
#
|
|
Packit Service |
b05338 |
# This special exception to the GPL applies to versions of the Autoconf
|
|
Packit Service |
b05338 |
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
Packit Service |
b05338 |
# modified version of the Autoconf Macro, you may extend this special
|
|
Packit Service |
b05338 |
# exception to the GPL to apply to your modified version as well.
|
|
Packit Service |
b05338 |
|
|
Packit Service |
b05338 |
#serial 5
|
|
Packit Service |
b05338 |
|
|
Packit Service |
b05338 |
AU_ALIAS([TYPE_SOCKLEN_T], [AX_TYPE_SOCKLEN_T])
|
|
Packit Service |
b05338 |
AC_DEFUN([AX_TYPE_SOCKLEN_T],
|
|
Packit Service |
b05338 |
[AC_CACHE_CHECK([for socklen_t], ac_cv_ax_type_socklen_t,
|
|
Packit Service |
b05338 |
[
|
|
Packit Service |
b05338 |
AC_TRY_COMPILE(
|
|
Packit Service |
b05338 |
[#include <sys/types.h>
|
|
Packit Service |
b05338 |
#include <sys/socket.h>],
|
|
Packit Service |
b05338 |
[socklen_t len = 42; return 0;],
|
|
Packit Service |
b05338 |
ac_cv_ax_type_socklen_t=yes,
|
|
Packit Service |
b05338 |
ac_cv_ax_type_socklen_t=no)
|
|
Packit Service |
b05338 |
])
|
|
Packit Service |
b05338 |
if test $ac_cv_ax_type_socklen_t != yes; then
|
|
Packit Service |
b05338 |
AC_DEFINE(socklen_t, int, [Substitute for socklen_t])
|
|
Packit Service |
b05338 |
fi
|
|
Packit Service |
b05338 |
])
|