1
1
dnl Wget-specific Autoconf macros.
2
dnl Copyright (C) 1996-2005 Free Software Foundation, Inc.
2
dnl Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3
dnl 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4
5
dnl This program is free software; you can redistribute it and/or modify
5
6
dnl it under the terms of the GNU General Public License as published by
6
dnl the Free Software Foundation; either version 2 of the License, or
7
dnl the Free Software Foundation; either version 3 of the License, or
7
8
dnl (at your option) any later version.
9
10
dnl This program is distributed in the hope that it will be useful,
12
13
dnl GNU General Public License for more details.
14
15
dnl You should have received a copy of the GNU General Public License
15
dnl along with this program; if not, write to the Free Software
16
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
dnl In addition, as a special exception, the Free Software Foundation
19
dnl gives permission to link the code of its release of Wget with the
20
dnl OpenSSL project's "OpenSSL" library (or with modified versions of it
21
dnl that use the same license as the "OpenSSL" library), and distribute
22
dnl the linked executables. You must obey the GNU General Public License
23
dnl in all respects for all of the code used other than "OpenSSL". If you
24
dnl modify this file, you may extend this exception to your version of the
25
dnl file, but you are not obligated to do so. If you do not wish to do
26
dnl so, delete this exception statement from your version.
16
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
18
dnl Additional permission under GNU GPL version 3 section 7
20
dnl If you modify this program, or any covered work, by linking or
21
dnl combining it with the OpenSSL project's OpenSSL library (or a
22
dnl modified version of that library), containing parts covered by the
23
dnl terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
24
dnl grants you additional permission to convey the resulting work.
25
dnl Corresponding Source for a non-source form of such a combination
26
dnl shall include the source code for the parts of OpenSSL used as well
27
dnl as that of the covered work.
29
30
dnl Check for `struct utimbuf'.
143
# @defmac AC_PROG_CC_STDC
144
# @maindex PROG_CC_STDC
146
# If the C compiler in not in ANSI C mode by default, try to add an option
147
# to output variable @code{CC} to make it so. This macro tries various
148
# options that select ANSI C on some system or another. It considers the
149
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
150
# handles function prototypes correctly.
152
# If you use this macro, you should check after calling it whether the C
153
# compiler has been set to accept ANSI C; if not, the shell variable
154
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
155
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
156
# program @code{ansi2knr}, which comes with Ghostscript.
159
AC_DEFUN(AM_PROG_CC_STDC,
160
[AC_REQUIRE([AC_PROG_CC])
161
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
162
AC_CACHE_VAL(am_cv_prog_cc_stdc,
163
[am_cv_prog_cc_stdc=no
165
# Don't try gcc -ansi; that turns off useful extensions and
166
# breaks some systems' header files.
168
# Ultrix and OSF/1 -std1
169
# HP-UX -Aa -D_HPUX_SOURCE
170
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
172
CC="$ac_save_CC $ac_arg"
174
[#if !defined(__STDC__)
177
/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
179
# include <sys/types.h>
180
# include <sys/stat.h>
183
int test (int i, double x);
184
struct s1 {int (*f) (int a);};
185
struct s2 {int (*f) (double a);};],
186
[am_cv_prog_cc_stdc="$ac_arg"; break])
190
AC_MSG_RESULT($am_cv_prog_cc_stdc)
191
case "x$am_cv_prog_cc_stdc" in
193
*) CC="$CC $am_cv_prog_cc_stdc" ;;
198
142
dnl ************************************************************
199
143
dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
200
144
dnl ************************************************************
390
334
dnl This is not strictly an Autoconf macro, because it is run from
391
335
dnl within `config.status' rather than from within configure. This
392
336
dnl is why special rules must be applied for it.
393
AC_DEFUN(WGET_PROCESS_PO,
337
AC_DEFUN([WGET_PROCESS_PO],
395
339
dnl I wonder what the following several lines do...
396
340
if test "x$srcdir" != "x."; then
422
366
# functionality. Please note that the actual code is *not* freely
427
369
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
428
370
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
429
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
371
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
430
372
[# Extract the first word of "$2", so it can be a program name with args.
431
373
set dummy $2; ac_word=[$]2
432
374
AC_MSG_CHECKING([for $ac_word])