Newer
Older
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# $Id$
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial 8
dnl CURL_INCLUDES_SIGNAL
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when signal.h is to be included.
AC_DEFUN([CURL_INCLUDES_SIGNAL], [
curl_includes_signal="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h signal.h,
[], [], [$curl_includes_signal])
])
dnl CURL_INCLUDES_STDIO
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when stdio.h is to be included.
AC_DEFUN([CURL_INCLUDES_STDIO], [
curl_includes_stdio="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h stdio.h,
[], [], [$curl_includes_stdio])
])
dnl CURL_INCLUDES_STDLIB
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when stdlib.h is to be included.
AC_DEFUN([CURL_INCLUDES_STDLIB], [
curl_includes_stdlib="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h stdlib.h,
[], [], [$curl_includes_stdlib])
])
dnl CURL_INCLUDES_STRING
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when string.h is to be included.
AC_DEFUN([CURL_INCLUDES_STRING], [
curl_includes_string="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h string.h,
[], [], [$curl_includes_string])
])
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
dnl CURL_INCLUDES_TIME
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when time.h is to be included.
AC_DEFUN([CURL_INCLUDES_TIME], [
AC_REQUIRE([AC_HEADER_TIME])dnl
curl_includes_time="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# ifdef TIME_WITH_SYS_TIME
# include <time.h>
# endif
#else
# ifdef HAVE_TIME_H
# include <time.h>
# endif
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h sys/time.h time.h,
[], [], [$curl_includes_time])
])
dnl CURL_INCLUDES_UNISTD
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when unistd.h is to be included.
AC_DEFUN([CURL_INCLUDES_UNISTD], [
curl_includes_unistd="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h unistd.h,
[], [], [$curl_includes_unistd])
])
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
dnl CURL_CHECK_FUNC_FDOPEN
dnl -------------------------------------------------
dnl Verify if fdopen is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_fdopen, then
dnl HAVE_FDOPEN will be defined.
AC_DEFUN([CURL_CHECK_FUNC_FDOPEN], [
AC_REQUIRE([CURL_INCLUDES_STDIO])dnl
#
tst_links_fdopen="unknown"
tst_proto_fdopen="unknown"
tst_compi_fdopen="unknown"
tst_allow_fdopen="unknown"
#
AC_MSG_CHECKING([if fdopen can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([fdopen])
],[
AC_MSG_RESULT([yes])
tst_links_fdopen="yes"
],[
AC_MSG_RESULT([no])
tst_links_fdopen="no"
])
#
if test "$tst_links_fdopen" = "yes"; then
AC_MSG_CHECKING([if fdopen is prototyped])
AC_EGREP_CPP([fdopen],[
$curl_includes_stdio
],[
AC_MSG_RESULT([yes])
tst_proto_fdopen="yes"
],[
AC_MSG_RESULT([no])
tst_proto_fdopen="no"
])
fi
Loading
Loading full blame…