* lib/autoconf/functions.m4: Use the default includes so that

memcmp be declared before being tested.
Reported by Sander Niemeijer.
(AC_FUNC_ERROR_AT_LINE, AC_FUNC_GETGROUPS, AC_FUNC_STRNLEN): Likewise.
* doc/autoconf.texi (Default Includes): Document
AC_INCLUDES_DEFAULT.
This commit is contained in:
Akim Demaille 2003-05-17 10:30:07 +00:00
parent d8711f0660
commit b44e483cec
5 changed files with 395 additions and 379 deletions

View File

@ -1,3 +1,12 @@
2003-05-17 Akim Demaille <akim@epita.fr>
* lib/autoconf/functions.m4: Use the default includes so that
memcmp be declared before being tested.
Reported by Sander Niemeijer.
(AC_FUNC_ERROR_AT_LINE, AC_FUNC_GETGROUPS, AC_FUNC_STRNLEN): Likewise.
* doc/autoconf.texi (Default Includes): Document
AC_INCLUDES_DEFAULT.
2003-05-17 Akim Demaille <akim@epita.fr> 2003-05-17 Akim Demaille <akim@epita.fr>
* lib/autoconf/specific.m4: Include signal.h and unistd.h. * lib/autoconf/specific.m4: Include signal.h and unistd.h.

2
NEWS
View File

@ -1,7 +1,7 @@
* Major changes in Autoconf 2.57a -*- outline -*- * Major changes in Autoconf 2.57a -*- outline -*-
** New macros ** New macros
AC_C_RESTRICT AC_C_RESTRICT, AC_INCLUDES_DEFAULT.
** AC_DECL_SYS_SIGLIST ** AC_DECL_SYS_SIGLIST
Works again. Works again.

1
THANKS
View File

@ -171,6 +171,7 @@ Ruediger Kuhlmann uck4@rz.uni-karlsruhe.de
Russ Allbery rra@stanford.edu Russ Allbery rra@stanford.edu
Ryuji Abe raeva@t3.rim.or.jp Ryuji Abe raeva@t3.rim.or.jp
Sam Varshavchik mrsam@courier-mta.com Sam Varshavchik mrsam@courier-mta.com
Sander Niemeijer niemeijer@science-and-technology.nl
Scott Bambrough scottb@corelcomputer.com Scott Bambrough scottb@corelcomputer.com
Scott Stanton stanton@scriptics.com Scott Stanton stanton@scriptics.com
Simon Leinen simon@lia.di.epfl.ch Simon Leinen simon@lia.di.epfl.ch

View File

@ -208,19 +208,19 @@ published by the Free Software Foundation raise funds for
@dircategory Individual utilities @dircategory Individual utilities
@direntry @direntry
* autoscan: (autoconf)autoscan Invocation. * autoscan: (autoconf)autoscan Invocation.
Semi-automatic @file{configure.ac} writing Semi-automatic @file{configure.ac} writing
* ifnames: (autoconf)ifnames Invocation. Listing conditionals in source. * ifnames: (autoconf)ifnames Invocation. Listing conditionals in source.
* autoconf: (autoconf)autoconf Invocation. * autoconf: (autoconf)autoconf Invocation.
How to create configuration scripts How to create configuration scripts
* autoreconf: (autoconf)autoreconf Invocation. * autoreconf: (autoconf)autoreconf Invocation.
Remaking multiple @command{configure} scripts Remaking multiple @command{configure} scripts
* autoheader: (autoconf)autoheader Invocation. * autoheader: (autoconf)autoheader Invocation.
How to create configuration templates How to create configuration templates
* autom4te: (autoconf)autom4te Invocation. * autom4te: (autoconf)autom4te Invocation.
The Autoconf executables backbone The Autoconf executables backbone
* configure: (autoconf)configure Invocation. Configuring a package. * configure: (autoconf)configure Invocation. Configuring a package.
* autoupdate: (autoconf)autoupdate Invocation. * autoupdate: (autoconf)autoupdate Invocation.
Automatic update of @file{configure.ac} Automatic update of @file{configure.ac}
* config.status: (autoconf)config.status Invocation. Recreating configurations. * config.status: (autoconf)config.status Invocation. Recreating configurations.
* testsuite: (autoconf)testsuite Invocation. Running an Autotest test suite. * testsuite: (autoconf)testsuite Invocation. Running an Autotest test suite.
@end direntry @end direntry
@ -870,9 +870,9 @@ your source files --> [autoscan*] --> [configure.scan] --> configure.ac
@group @group
configure.ac --. configure.ac --.
| .------> autoconf* -----> configure | .------> autoconf* -----> configure
[aclocal.m4] --+---+ [aclocal.m4] --+---+
| `-----> [autoheader*] --> [config.h.in] | `-----> [autoheader*] --> [config.h.in]
[acsite.m4] ---' [acsite.m4] ---'
@end group @end group
@ -883,11 +883,11 @@ Makefile.in -------------------------------> Makefile.in
Files used in configuring a software package: Files used in configuring a software package:
@example @example
@group @group
.-------------> [config.cache] .-------------> [config.cache]
configure* ------------+-------------> config.log configure* ------------+-------------> config.log
| |
[config.h.in] -. v .-> [config.h] -. [config.h.in] -. v .-> [config.h] -.
+--> config.status* -+ +--> make* +--> config.status* -+ +--> make*
Makefile.in ---' `-> Makefile ---' Makefile.in ---' `-> Makefile ---'
@end group @end group
@end example @end example
@ -997,8 +997,8 @@ For instance:
@example @example
AC_CHECK_HEADER([stdio.h], AC_CHECK_HEADER([stdio.h],
[AC_DEFINE([HAVE_STDIO_H])], [AC_DEFINE([HAVE_STDIO_H])],
[AC_MSG_ERROR([Sorry, can't do anything for you])]) [AC_MSG_ERROR([Sorry, can't do anything for you])])
@end example @end example
@noindent @noindent
@ -1006,8 +1006,8 @@ is quoted properly. You may safely simplify its quotation to:
@example @example
AC_CHECK_HEADER(stdio.h, AC_CHECK_HEADER(stdio.h,
[AC_DEFINE(HAVE_STDIO_H)], [AC_DEFINE(HAVE_STDIO_H)],
[AC_MSG_ERROR([Sorry, can't do anything for you])]) [AC_MSG_ERROR([Sorry, can't do anything for you])])
@end example @end example
@noindent @noindent
@ -1018,8 +1018,8 @@ The following example is wrong and dangerous, as it is underquoted:
@example @example
AC_CHECK_HEADER(stdio.h, AC_CHECK_HEADER(stdio.h,
AC_DEFINE(HAVE_STDIO_H), AC_DEFINE(HAVE_STDIO_H),
AC_MSG_ERROR([Sorry, can't do anything for you])) AC_MSG_ERROR([Sorry, can't do anything for you]))
@end example @end example
In other cases, you may have to use text that also resembles a macro In other cases, you may have to use text that also resembles a macro
@ -1981,7 +1981,7 @@ colon-separated list of input files. Examples:
@example @example
AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk] AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk]
[lib/Makefile:boiler/lib.mk]) [lib/Makefile:boiler/lib.mk])
@end example @end example
@noindent @noindent
@ -2319,24 +2319,24 @@ Makefile snippet similar to:
@example @example
@group @group
edit = sed \ edit = sed \
-e 's,@@datadir\@@,$(pkgdatadir),g' \ -e 's,@@datadir\@@,$(pkgdatadir),g' \
-e 's,@@prefix\@@,$(prefix),g' -e 's,@@prefix\@@,$(prefix),g'
@end group @end group
@group @group
autoconf: Makefile $(srcdir)/autoconf.in autoconf: Makefile $(srcdir)/autoconf.in
rm -f autoconf autoconf.tmp rm -f autoconf autoconf.tmp
$(edit) $(srcdir)/autoconf.in >autoconf.tmp $(edit) $(srcdir)/autoconf.in >autoconf.tmp
chmod +x autoconf.tmp chmod +x autoconf.tmp
mv autoconf.tmp autoconf mv autoconf.tmp autoconf
@end group @end group
@group @group
autoheader: Makefile $(srcdir)/autoheader.in autoheader: Makefile $(srcdir)/autoheader.in
rm -f autoheader autoheader.tmp rm -f autoheader autoheader.tmp
$(edit) $(srcdir)/autoconf.in >autoheader.tmp $(edit) $(srcdir)/autoconf.in >autoheader.tmp
chmod +x autoheader.tmp chmod +x autoheader.tmp
mv autoheader.tmp autoheader mv autoheader.tmp autoheader
@end group @end group
@end example @end example
@ -2369,10 +2369,10 @@ as:
autoconf autoheader: Makefile autoconf autoheader: Makefile
@group @group
.in: .in:
rm -f $@@ $@@.tmp rm -f $@@ $@@.tmp
$(edit) $< >$@@.tmp $(edit) $< >$@@.tmp
chmod +x $@@.tmp chmod +x $@@.tmp
mv $@@.tmp $@@ mv $@@.tmp $@@
@end group @end group
@end example @end example
@ -2424,7 +2424,7 @@ files by prefixing them with @samp{$(srcdir)/}. For example:
@example @example
time.info: time.texinfo time.info: time.texinfo
$(MAKEINFO) $(srcdir)/time.texinfo $(MAKEINFO) $(srcdir)/time.texinfo
@end example @end example
@node Automatic Remaking @node Automatic Remaking
@ -2453,23 +2453,23 @@ conflicts etc.).
@example @example
@group @group
$(srcdir)/configure: configure.ac aclocal.m4 $(srcdir)/configure: configure.ac aclocal.m4
cd $(srcdir) && autoconf cd $(srcdir) && autoconf
# autoheader might not change config.h.in, so touch a stamp file. # autoheader might not change config.h.in, so touch a stamp file.
$(srcdir)/config.h.in: stamp-h.in $(srcdir)/config.h.in: stamp-h.in
$(srcdir)/stamp-h.in: configure.ac aclocal.m4 $(srcdir)/stamp-h.in: configure.ac aclocal.m4
cd $(srcdir) && autoheader cd $(srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in echo timestamp > $(srcdir)/stamp-h.in
config.h: stamp-h config.h: stamp-h
stamp-h: config.h.in config.status stamp-h: config.h.in config.status
./config.status ./config.status
Makefile: Makefile.in config.status Makefile: Makefile.in config.status
./config.status ./config.status
config.status: configure config.status: configure
./config.status --recheck ./config.status --recheck
@end group @end group
@end example @end example
@ -2745,10 +2745,10 @@ For example:
@example @example
AH_TEMPLATE([CRAY_STACKSEG_END], AH_TEMPLATE([CRAY_STACKSEG_END],
[Define to one of _getb67, GETB67, getb67 [Define to one of _getb67, GETB67, getb67
for Cray-2 and Cray-YMP systems. This for Cray-2 and Cray-YMP systems. This
function is required for alloca.c support function is required for alloca.c support
on those systems.]) on those systems.])
@end example @end example
@noindent @noindent
@ -2798,8 +2798,8 @@ Here is an unrealistic example:
@example @example
fubar=42 fubar=42
AC_CONFIG_COMMANDS([fubar], AC_CONFIG_COMMANDS([fubar],
[echo this is extra $fubar, and so on.], [echo this is extra $fubar, and so on.],
[fubar=$fubar]) [fubar=$fubar])
@end example @end example
Here is a better one: Here is a better one:
@ -2843,7 +2843,7 @@ For example, this call:
@example @example
AC_CONFIG_LINKS(host.h:config/$machine.h AC_CONFIG_LINKS(host.h:config/$machine.h
object.h:config/$obj_format.h) object.h:config/$obj_format.h)
@end example @end example
@noindent @noindent
@ -3077,7 +3077,12 @@ Unless you know exactly what you are doing, you should avoid using
unconditional includes, and check the existence of the headers you unconditional includes, and check the existence of the headers you
include beforehand (@pxref{Header Files}). include beforehand (@pxref{Header Files}).
Most generic macros provide the following default set of includes: Most generic macros use the following macro to provide the default set
of includes:
@defmac AC_DEFAULT_INCLUDES (@ovar{include-directives})
@acindex{DEFAULT_INCLUDES}
Expand to @var{include-directives} if defined, otherwise to:
@example @example
@group @group
@ -3118,15 +3123,15 @@ Most generic macros provide the following default set of includes:
@end group @end group
@end example @end example
If the default includes are used, then Autoconf will automatically check If the default includes are used, then check for the presence of these
for the presence of these headers and their compatibility, i.e., you headers and their compatibility, i.e., you don't need to run
don't need to run @code{AC_HEADERS_STDC}, nor check for @file{stdlib.h} @code{AC_HEADERS_STDC}, nor check for @file{stdlib.h} etc.
etc.
These headers are checked for in the same order as they are included. These headers are checked for in the same order as they are included.
For instance, on some systems @file{string.h} and @file{strings.h} both For instance, on some systems @file{string.h} and @file{strings.h} both
exist, but conflict. Then @code{HAVE_STRING_H} will be defined, but exist, but conflict. Then @code{HAVE_STRING_H} will be defined, but
@code{HAVE_STRINGS_H} won't. @code{HAVE_STRINGS_H} won't.
@end defmac
@node Alternative Programs @node Alternative Programs
@section Alternative Programs @section Alternative Programs
@ -3307,7 +3312,7 @@ instead, like this:
@example @example
AC_PATH_PROG([INETD], [inetd], [/usr/libexec/inetd], AC_PATH_PROG([INETD], [inetd], [/usr/libexec/inetd],
[$PATH:/usr/libexec:/usr/sbin:/usr/etc:etc]) [$PATH:/usr/libexec:/usr/sbin:/usr/etc:etc])
@end example @end example
You are strongly encouraged to declare the @var{variable} passed to You are strongly encouraged to declare the @var{variable} passed to
@ -4837,8 +4842,8 @@ If no @var{includes} are specified, the default includes are used
@example @example
AC_CHECK_MEMBER(struct passwd.pw_gecos,, AC_CHECK_MEMBER(struct passwd.pw_gecos,,
[AC_MSG_ERROR([We need `passwd.pw_gecos'!])], [AC_MSG_ERROR([We need `passwd.pw_gecos'!])],
[#include <pwd.h>]) [#include <pwd.h>])
@end example @end example
You can use this macro for sub-members: You can use this macro for sub-members:
@ -6068,7 +6073,7 @@ AC_INIT(Autoconf Documentation, @value{VERSION}, bug-autoconf@@gnu.org)
AC_DEFINE([HELLO_WORLD], ["Hello, World\n"]) AC_DEFINE([HELLO_WORLD], ["Hello, World\n"])
AC_LANG_CONFTEST( AC_LANG_CONFTEST(
[AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]], [AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]],
[[fputs (hw, stdout);]])]) [[fputs (hw, stdout);]])])
gcc -E -dD conftest.c -o - gcc -E -dD conftest.c -o -
@end example @end example
@ -6160,7 +6165,7 @@ AC_INIT(Autoconf Documentation, @value{VERSION}, bug-autoconf@@gnu.org)
AC_DEFINE([HELLO_WORLD], ["Hello, World\n"]) AC_DEFINE([HELLO_WORLD], ["Hello, World\n"])
AC_PREPROC_IFELSE( AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]], [AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]],
[[fputs (hw, stdout);]])], [[fputs (hw, stdout);]])],
[AC_MSG_RESULT([OK])], [AC_MSG_RESULT([OK])],
[AC_MSG_FAILURE([unexpected preprocessor failure])]) [AC_MSG_FAILURE([unexpected preprocessor failure])])
@end example @end example
@ -6415,16 +6420,16 @@ fstype=no
# The order of these tests is important. # The order of these tests is important.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statvfs.h> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statvfs.h>
#include <sys/fstyp.h>]])], #include <sys/fstyp.h>]])],
[AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4]) [AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4])
if test $fstype = no; then if test $fstype = no; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h>
#include <sys/fstyp.h>]])], #include <sys/fstyp.h>]])],
[AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3]) [AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3])
fi fi
if test $fstype = no; then if test $fstype = no; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h>
#include <sys/vmount.h>]])]), #include <sys/vmount.h>]])]),
[AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX]) [AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX])
fi fi
# (more cases omitted here) # (more cases omitted here)
AC_MSG_RESULT([$fstype]) AC_MSG_RESULT([$fstype])
@ -6721,12 +6726,12 @@ instance, the following macro is broken:
@group @group
AC_DEFUN([AC_SHELL_TRUE], AC_DEFUN([AC_SHELL_TRUE],
[AC_CACHE_CHECK([whether true(1) works], [ac_cv_shell_true_works], [AC_CACHE_CHECK([whether true(1) works], [ac_cv_shell_true_works],
[ac_cv_shell_true_works=no [ac_cv_shell_true_works=no
true && ac_cv_shell_true_works=yes true && ac_cv_shell_true_works=yes
if test $ac_cv_shell_true_works = yes; then if test $ac_cv_shell_true_works = yes; then
AC_DEFINE([TRUE_WORKS], 1 AC_DEFINE([TRUE_WORKS], 1
[Define if `true(1)' works properly.]) [Define if `true(1)' works properly.])
fi]) fi])
]) ])
@end group @end group
@end example @end example
@ -6740,11 +6745,11 @@ is:
@group @group
AC_DEFUN([AC_SHELL_TRUE], AC_DEFUN([AC_SHELL_TRUE],
[AC_CACHE_CHECK([whether true(1) works], [ac_cv_shell_true_works], [AC_CACHE_CHECK([whether true(1) works], [ac_cv_shell_true_works],
[ac_cv_shell_true_works=no [ac_cv_shell_true_works=no
true && ac_cv_shell_true_works=yes]) true && ac_cv_shell_true_works=yes])
if test $ac_cv_shell_true_works = yes; then if test $ac_cv_shell_true_works = yes; then
AC_DEFINE([TRUE_WORKS], 1 AC_DEFINE([TRUE_WORKS], 1
[Define if `true(1)' works properly.]) [Define if `true(1)' works properly.])
fi fi
]) ])
@end group @end group
@ -7454,9 +7459,9 @@ AC_TRY_LINK(
#ifndef tzname /* For SGI. */ #ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif], #endif],
[atoi (*tzname);], [atoi (*tzname);],
[ac_cv_var_tzname=yes], [ac_cv_var_tzname=yes],
[ac_cv_var_tzname=no]) [ac_cv_var_tzname=no])
@end example @end example
@noindent @noindent
@ -7490,9 +7495,9 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(
#ifndef tzname /* For SGI. */ #ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif]], #endif]],
[atoi (*tzname);])], [atoi (*tzname);])],
[ac_cv_var_tzname=yes], [ac_cv_var_tzname=yes],
[ac_cv_var_tzname=no]) [ac_cv_var_tzname=no])
@end example @end example
@xref{Quadrigraphs}, for what to do if you run into a hopeless case @xref{Quadrigraphs}, for what to do if you run into a hopeless case
@ -8538,8 +8543,8 @@ write
@example @example
AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2], AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
[ac_cv_emxos2=yes], [ac_cv_emxos2=yes],
[ac_cv_emxos2=no])]) [ac_cv_emxos2=no])])
@end example @end example
@noindent @noindent
@ -8547,11 +8552,11 @@ or even
@example @example
AC_CACHE_CHECK([for EMX OS/2 environment], AC_CACHE_CHECK([for EMX OS/2 environment],
[ac_cv_emxos2], [ac_cv_emxos2],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[return __EMX__;])], [return __EMX__;])],
[ac_cv_emxos2=yes], [ac_cv_emxos2=yes],
[ac_cv_emxos2=no])]) [ac_cv_emxos2=no])])
@end example @end example
When using @code{AC_RUN_IFELSE} or any macro that cannot work when When using @code{AC_RUN_IFELSE} or any macro that cannot work when
@ -8674,8 +8679,8 @@ and the new way:
m4_define([_AC_EMXOS2], m4_define([_AC_EMXOS2],
[AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2], [AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])],
[ac_cv_emxos2=yes], [ac_cv_emxos2=yes],
[ac_cv_emxos2=no])]) [ac_cv_emxos2=no])])
test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl
])# _AC_EMXOS2 ])# _AC_EMXOS2
@end example @end example
@ -10268,11 +10273,11 @@ Don't leave white spaces before the parentheses in user functions calls;
@example @example
$ @kbd{gawk 'function die () @{ print "Aaaaarg!" @} $ @kbd{gawk 'function die () @{ print "Aaaaarg!" @}
BEGIN @{ die () @}'} BEGIN @{ die () @}'}
gawk: cmd. line:2: BEGIN @{ die () @} gawk: cmd. line:2: BEGIN @{ die () @}
gawk: cmd. line:2: ^ parse error gawk: cmd. line:2: ^ parse error
$ @kbd{gawk 'function die () @{ print "Aaaaarg!" @} $ @kbd{gawk 'function die () @{ print "Aaaaarg!" @}
BEGIN @{ die() @}'} BEGIN @{ die() @}'}
Aaaaarg! Aaaaarg!
@end example @end example
@ -10931,8 +10936,8 @@ FOO = one \
BAR = two BAR = two
test: test:
: FOO is "$(FOO)" : FOO is "$(FOO)"
: BAR is "$(BAR)" : BAR is "$(BAR)"
@end example @end example
@noindent @noindent
@ -10952,7 +10957,7 @@ and continue until an unescaped newline is reached.
baz baz
all: all:
@@echo ok @@echo ok
% @kbd{make} # GNU make % @kbd{make} # GNU make
ok ok
@end example @end example
@ -10990,10 +10995,10 @@ will not pass the substitution along to sub-@command{make}s.
% @kbd{cat Makefile} % @kbd{cat Makefile}
foo = foo foo = foo
one: one:
@@echo $(foo) @@echo $(foo)
$(MAKE) two $(MAKE) two
two: two:
@@echo $(foo) @@echo $(foo)
% @kbd{make foo=bar} # GNU make 3.79.1 % @kbd{make foo=bar} # GNU make 3.79.1
bar bar
make two make two
@ -11038,10 +11043,10 @@ manually, from your @file{Makefile}:
@example @example
foo = foo foo = foo
one: one:
@@echo $(foo) @@echo $(foo)
$(MAKE) foo=$(foo) two $(MAKE) foo=$(foo) two
two: two:
@@echo $(foo) @@echo $(foo)
@end example @end example
You need to foresee all macros that a user might want to override if You need to foresee all macros that a user might want to override if
@ -11079,8 +11084,8 @@ protect @code{SHELL}, since it doesn't use it.
SHELL = /bin/sh SHELL = /bin/sh
FOO = foo FOO = foo
all: all:
@@echo $(SHELL) @@echo $(SHELL)
@@echo $(FOO) @@echo $(FOO)
% @kbd{env SHELL=/bin/tcsh FOO=bar make -e} # OSF1 V4.0 Make % @kbd{env SHELL=/bin/tcsh FOO=bar make -e} # OSF1 V4.0 Make
/bin/tcsh /bin/tcsh
bar bar
@ -11102,7 +11107,7 @@ The @command{make} from Tru64 Unix V5.1 is one of them. The following
@example @example
all: all:
# foo # foo
@end example @end example
@item The @file{obj/} subdirectory. @item The @file{obj/} subdirectory.
@ -11119,10 +11124,10 @@ current directory will not be read.
@example @example
% @kbd{cat Makefile} % @kbd{cat Makefile}
all: all:
echo Hello echo Hello
% @kbd{cat obj/Makefile} % @kbd{cat obj/Makefile}
all: all:
echo World echo World
% @kbd{make} # GNU make % @kbd{make} # GNU make
echo Hello echo Hello
Hello Hello
@ -11141,7 +11146,7 @@ implementations always succeed.
@example @example
% @kbd{cat Makefile} % @kbd{cat Makefile}
all: all:
false false
% @kbd{make -k; echo exit status: $?} # GNU make % @kbd{make -k; echo exit status: $?} # GNU make
false false
make: *** [all] Error 1 make: *** [all] Error 1
@ -11191,7 +11196,7 @@ whole thing manually. For instance, using the following pattern:
@example @example
VPATH = ../src VPATH = ../src
foo.o: foo.c foo.o: foo.c
cc -c `test -f foo.c || echo ../src/`foo.c -o foo.o cc -c `test -f foo.c || echo ../src/`foo.c -o foo.o
@end example @end example
@item Automatic rule rewriting @item Automatic rule rewriting
@ -11207,7 +11212,7 @@ For instance
@example @example
VPATH = ../src VPATH = ../src
foo.o: foo.c foo.o: foo.c
cc -c foo.c -o foo.o cc -c foo.c -o foo.o
@end example @end example
@noindent @noindent
@ -11220,7 +11225,7 @@ rely on this, and we have to search @code{VPATH} manually:
@example @example
VPATH = ../src VPATH = ../src
foo.o: foo.c foo.o: foo.c
cc -c `test -f foo.c || echo ../src/`foo.c -o foo.o cc -c `test -f foo.c || echo ../src/`foo.c -o foo.o
@end example @end example
@noindent @noindent
@ -11247,11 +11252,11 @@ in the rule. For instance these three rules would be safe.
@example @example
VPATH = ../src VPATH = ../src
foo.o: foo.c foo.o: foo.c
cc -c `test -f ./foo.c || echo ../src/`foo.c -o foo.o cc -c `test -f ./foo.c || echo ../src/`foo.c -o foo.o
foo2.o: foo2.c foo2.o: foo2.c
cc -c `test -f 'foo2.c' || echo ../src/`foo2.c -o foo2.o cc -c `test -f 'foo2.c' || echo ../src/`foo2.c -o foo2.o
foo3.o: foo3.c foo3.o: foo3.c
cc -c `test -f "foo3.c" || echo ../src/`foo3.c -o foo3.o cc -c `test -f "foo3.c" || echo ../src/`foo3.c -o foo3.o
@end example @end example
Things get worse when your prerequisites are in a macro. Things get worse when your prerequisites are in a macro.
@ -11260,10 +11265,10 @@ Things get worse when your prerequisites are in a macro.
VPATH = ../src VPATH = ../src
HEADERS = foo.h foo2.h foo3.h HEADERS = foo.h foo2.h foo3.h
install-HEADERS: $(HEADERS) install-HEADERS: $(HEADERS)
for i in $(HEADERS); do \ for i in $(HEADERS); do \
$(INSTALL) -m 644 `test -f $$i || echo ../src/`$$i \ $(INSTALL) -m 644 `test -f $$i || echo ../src/`$$i \
$(DESTDIR)$(includedir)/$$i; \ $(DESTDIR)$(includedir)/$$i; \
done done
@end example @end example
The above @code{install-HEADERS} rule is not SunOS-proof because @code{for The above @code{install-HEADERS} rule is not SunOS-proof because @code{for
@ -11302,10 +11307,10 @@ Trying to quote @code{$(HEADERS)} in some way, as we did for
@example @example
install-HEADERS: $(HEADERS) install-HEADERS: $(HEADERS)
headers='$(HEADERS)'; for i in $$headers; do \ headers='$(HEADERS)'; for i in $$headers; do \
$(INSTALL) -m 644 `test -f $$i || echo ../src/`$$i \ $(INSTALL) -m 644 `test -f $$i || echo ../src/`$$i \
$(DESTDIR)$(includedir)/$$i; \ $(DESTDIR)$(includedir)/$$i; \
done done
@end example @end example
Indeed, @code{headers='$(HEADERS)'} expands to @code{headers='foo.h Indeed, @code{headers='$(HEADERS)'} expands to @code{headers='foo.h
@ -11319,11 +11324,11 @@ One workaround is to strip this unwanted @file{../src/} prefix manually:
VPATH = ../src VPATH = ../src
HEADERS = foo.h foo2.h foo3.h HEADERS = foo.h foo2.h foo3.h
install-HEADERS: $(HEADERS) install-HEADERS: $(HEADERS)
headers='$(HEADERS)'; for i in $$headers; do \ headers='$(HEADERS)'; for i in $$headers; do \
i=`expr "$$i" : '../src/\(.*\)'`; i=`expr "$$i" : '../src/\(.*\)'`;
$(INSTALL) -m 644 `test -f $$i || echo ../src/`$$i \ $(INSTALL) -m 644 `test -f $$i || echo ../src/`$$i \
$(DESTDIR)$(includedir)/$$i; \ $(DESTDIR)$(includedir)/$$i; \
done done
@end example @end example
Automake does something similar. Automake does something similar.
@ -11353,7 +11358,7 @@ search as presented before.
@example @example
VPATH = .. VPATH = ..
all : foo/bar all : foo/bar
command `test -d foo/bar || echo ../`foo/bar command `test -d foo/bar || echo ../`foo/bar
@end example @end example
The above @command{command} will be run on the empty @file{foo/bar} The above @command{command} will be run on the empty @file{foo/bar}
@ -11394,7 +11399,7 @@ update existing files in the source directory.
VPATH = .. VPATH = ..
all: foo.x bar.x all: foo.x bar.x
foo.x bar.x: newer.x foo.x bar.x: newer.x
@@echo Building $@@ @@echo Building $@@
% @kbd{touch ../bar.x} % @kbd{touch ../bar.x}
% @kbd{touch ../newer.x} % @kbd{touch ../newer.x}
% @kbd{make} # GNU make % @kbd{make} # GNU make
@ -11441,10 +11446,10 @@ the @code{bar.x: newer.x} rule.
VPATH = .. VPATH = ..
all: bar.y all: bar.y
bar.x: newer.x bar.x: newer.x
@@echo Building $@@ @@echo Building $@@
.SUFFIXES: .x .y .SUFFIXES: .x .y
.x.y: .x.y:
cp $< $@@ cp $< $@@
% @kbd{touch ../bar.x} % @kbd{touch ../bar.x}
% @kbd{touch ../newer.x} % @kbd{touch ../newer.x}
% @kbd{make} # GNU make % @kbd{make} # GNU make
@ -11480,7 +11485,7 @@ all: bar.y
bar.x: newer.x bar.x: newer.x
.SUFFIXES: .x .y .SUFFIXES: .x .y
.x.y: .x.y:
cp $< $@@ cp $< $@@
% @kbd{touch ../bar.x} % @kbd{touch ../bar.x}
% @kbd{touch ../newer.x} % @kbd{touch ../newer.x}
% @kbd{make} # GNU make % @kbd{make} # GNU make
@ -11524,7 +11529,7 @@ $ @kbd{cat Makefile}
.SUFFIXES: .in .SUFFIXES: .in
foo: foo.in foo: foo.in
.in: .in:
cp $< $@ cp $< $@
$ @kbd{touch foo.in} $ @kbd{touch foo.in}
$ @kbd{make} $ @kbd{make}
$ @kbd{ls} $ @kbd{ls}
@ -11547,7 +11552,7 @@ Note it works without the @samp{foo: foo.in} dependency.
$ @kbd{cat Makefile} $ @kbd{cat Makefile}
.SUFFIXES: .in .SUFFIXES: .in
.in: .in:
cp $< $@ cp $< $@
$ @kbd{make foo} $ @kbd{make foo}
cp foo.in foo cp foo.in foo
@end example @end example
@ -11560,7 +11565,7 @@ $ @kbd{cat Makefile}
foo.out: foo.in foo.out: foo.in
.SUFFIXES: .in .out .SUFFIXES: .in .out
.in.out: .in.out:
cp $< $@ cp $< $@
$ @kbd{make} $ @kbd{make}
cp foo.in foo.out cp foo.in foo.out
@end example @end example
@ -11745,7 +11750,7 @@ cases together, like in this fragment:
@example @example
case $target in case $target in
i386-*-mach* | i386-*-gnu*) i386-*-mach* | i386-*-gnu*)
obj_format=aout emulation=mach bfd_gas=yes ;; obj_format=aout emulation=mach bfd_gas=yes ;;
i960-*-bout) obj_format=bout ;; i960-*-bout) obj_format=bout ;;
esac esac
@end example @end example
@ -11755,7 +11760,7 @@ and later in @file{configure.ac}, use:
@example @example
AC_CONFIG_LINKS(host.h:config/$machine.h AC_CONFIG_LINKS(host.h:config/$machine.h
object.h:config/$obj_format.h) object.h:config/$obj_format.h)
@end example @end example
Note that the above example uses @code{$target} because it's taken from Note that the above example uses @code{$target} because it's taken from
@ -11977,11 +11982,11 @@ Options}). The following example will make this clearer.
@example @example
AC_DEFUN([TEST_MACRO], AC_DEFUN([TEST_MACRO],
[AC_ARG_WITH([foo], [AC_ARG_WITH([foo],
AC_HELP_STRING([--with-foo], AC_HELP_STRING([--with-foo],
[use foo (default is NO)]), [use foo (default is NO)]),
[ac_cv_use_foo=$withval], [ac_cv_use_foo=no]) [ac_cv_use_foo=$withval], [ac_cv_use_foo=no])
AC_CACHE_CHECK([whether to use foo], AC_CACHE_CHECK([whether to use foo],
[ac_cv_use_foo], [ac_cv_use_foo=no])]) [ac_cv_use_foo], [ac_cv_use_foo=no])])
@end example @end example
Please note that the call to @code{AC_HELP_STRING} is @strong{unquoted}. Please note that the call to @code{AC_HELP_STRING} is @strong{unquoted}.
@ -12000,8 +12005,8 @@ arguments, as shown in the following example.
@example @example
AC_DEFUN(MY_ARG_WITH, AC_DEFUN(MY_ARG_WITH,
[AC_ARG_WITH([$1], [AC_ARG_WITH([$1],
AC_HELP_STRING([--with-$1], [use $1 (default is $2)]), AC_HELP_STRING([--with-$1], [use $1 (default is $2)]),
ac_cv_use_$1=$withval, ac_cv_use_$1=no), ac_cv_use_$1=$withval, ac_cv_use_$1=no),
AC_CACHE_CHECK(whether to use $1, ac_cv_use_$1, ac_cv_use_$1=$2)]) AC_CACHE_CHECK(whether to use $1, ac_cv_use_$1, ac_cv_use_$1=$2)])
@end example @end example
@end defmac @end defmac
@ -12119,15 +12124,15 @@ Here is how to use the variable @code{program_transform_name} in a
PROGRAMS = cp ls rm PROGRAMS = cp ls rm
transform = @@program_transform_name@@ transform = @@program_transform_name@@
install: install:
for p in $(PROGRAMS); do \ for p in $(PROGRAMS); do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | \
sed '$(transform)'`; \ sed '$(transform)'`; \
done done
uninstall: uninstall:
for p in $(PROGRAMS); do \ for p in $(PROGRAMS); do \
rm -f $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; \ rm -f $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; \
done done
@end example @end example
It is guaranteed that @code{program_transform_name} is never empty, and It is guaranteed that @code{program_transform_name} is never empty, and
@ -12371,11 +12376,11 @@ that rule:
@group @group
config.h: stamp-h config.h: stamp-h
stamp-h: config.h.in config.status stamp-h: config.h.in config.status
./config.status config.h ./config.status config.h
echo > stamp-h echo > stamp-h
Makefile: Makefile.in config.status Makefile: Makefile.in config.status
./config.status Makefile ./config.status Makefile
@end group @end group
@end example @end example
@ -12448,13 +12453,13 @@ would be:
@group @group
config.h: stamp-h config.h: stamp-h
stamp-h: config.h.in config.status stamp-h: config.h.in config.status
CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES= \ CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES= \
CONFIG_HEADERS=config.h ./config.status CONFIG_HEADERS=config.h ./config.status
echo > stamp-h echo > stamp-h
Makefile: Makefile.in config.status Makefile: Makefile.in config.status
CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_HEADERS= \ CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_HEADERS= \
CONFIG_FILES=Makefile ./config.status CONFIG_FILES=Makefile ./config.status
@end group @end group
@end example @end example
@ -12500,12 +12505,12 @@ package for distribution were:
@example @example
@group @group
configure.ac --. .------> autoconf* -----> configure configure.ac --. .------> autoconf* -----> configure
+---+ +---+
[aclocal.m4] --+ `---. [aclocal.m4] --+ `---.
[acsite.m4] ---' | [acsite.m4] ---' |
+--> [autoheader*] -> [config.h.in] +--> [autoheader*] -> [config.h.in]
[acconfig.h] ----. | [acconfig.h] ----. |
+-----' +-----'
[config.h.top] --+ [config.h.top] --+
[config.h.bot] --' [config.h.bot] --'
@end group @end group
@ -12634,9 +12639,9 @@ This macro is equivalent to:
@example @example
AC_CHECK_TYPE([@var{type}],, AC_CHECK_TYPE([@var{type}],,
[AC_DEFINE_UNQUOTED([@var{type}], [@var{default}], [AC_DEFINE_UNQUOTED([@var{type}], [@var{default}],
[Define to `@var{default}' if [Define to `@var{default}' if
<sys/types.h> does not define.])]) <sys/types.h> does not define.])])
@end example @end example
In order to keep backward compatibility, the two versions of In order to keep backward compatibility, the two versions of
@ -12711,7 +12716,7 @@ means to check the nature of the host is using
AC_REQUIRE([AC_CANONICAL_HOST])[]dnl AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
case $host_os in case $host_os in
*cygwin* ) CYGWIN=yes;; *cygwin* ) CYGWIN=yes;;
* ) CYGWIN=no;; * ) CYGWIN=no;;
esac esac
@end example @end example
@ -12947,7 +12952,7 @@ version of:
@example @example
AC_LINK_FILES(config/$machine.h config/$obj_format.h, AC_LINK_FILES(config/$machine.h config/$obj_format.h,
host.h object.h) host.h object.h)
@end example @end example
@noindent @noindent
@ -12955,7 +12960,7 @@ is:
@example @example
AC_CONFIG_LINKS(host.h:config/$machine.h AC_CONFIG_LINKS(host.h:config/$machine.h
object.h:config/$obj_format.h) object.h:config/$obj_format.h)
@end example @end example
@end defmac @end defmac
@ -13059,7 +13064,7 @@ interface is equivalent to:
@group @group
AC_CONFIG_FILES(@var{file}@dots{}) AC_CONFIG_FILES(@var{file}@dots{})
AC_CONFIG_COMMANDS([default], AC_CONFIG_COMMANDS([default],
@var{extra-cmds}, @var{init-cmds}) @var{extra-cmds}, @var{init-cmds})
AC_OUTPUT AC_OUTPUT
@end group @end group
@end example @end example
@ -13077,9 +13082,9 @@ Here is an unrealistic example:
@example @example
fubar=27 fubar=27
AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.], AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.],
[fubar=$fubar]) [fubar=$fubar])
AC_OUTPUT_COMMANDS([echo this is another, extra, bit], AC_OUTPUT_COMMANDS([echo this is another, extra, bit],
[echo init bit]) [echo init bit])
@end example @end example
Aside from the fact that @code{AC_CONFIG_COMMANDS} requires an Aside from the fact that @code{AC_CONFIG_COMMANDS} requires an
@ -13253,12 +13258,12 @@ issue.
@defmac AC_TEST_CPP @defmac AC_TEST_CPP
@acindex{TEST_CPP} @acindex{TEST_CPP}
@code{AC_TRY_CPP}, replaced with @code{AC_PREPROC_IFELSE}. @code{AC_TRY_CPP}, replaced by @code{AC_PREPROC_IFELSE}.
@end defmac @end defmac
@defmac AC_TEST_PROGRAM @defmac AC_TEST_PROGRAM
@acindex{TEST_PROGRAM} @acindex{TEST_PROGRAM}
@code{AC_TRY_RUN}, replaced with @code{AC_RUN_IFELSE}. @code{AC_TRY_RUN}, replaced by @code{AC_RUN_IFELSE}.
@end defmac @end defmac
@defmac AC_TIMEZONE @defmac AC_TIMEZONE
@ -13414,8 +13419,8 @@ AC_EGREP_CPP(yes,
[#if defined M_XENIX && !defined M_UNIX [#if defined M_XENIX && !defined M_UNIX
yes yes
#endif], #endif],
[AC_MSG_RESULT([yes]); XENIX=yes], [AC_MSG_RESULT([yes]); XENIX=yes],
[AC_MSG_RESULT([no]); XENIX=]) [AC_MSG_RESULT([no]); XENIX=])
@end example @end example
@end defmac @end defmac
@ -13679,7 +13684,7 @@ too!
@example @example
AC_INIT AC_INIT
AC_CHECK_HEADERS(foo.h,, AC_CHECK_HEADERS(foo.h,,
[AC_MSG_ERROR([cannot find foo.h, bailing out])]) [AC_MSG_ERROR([cannot find foo.h, bailing out])])
AC_OUTPUT AC_OUTPUT
@end example @end example
@ -13940,9 +13945,9 @@ Yet another reason why assigning @code{LIBOBJS} directly is discouraged.
# This is necessary so that .o files in LIBOBJS are also built via # This is necessary so that .o files in LIBOBJS are also built via
# the ANSI2KNR-filtering rules. # the ANSI2KNR-filtering rules.
LIB@@&t@@OBJS=`echo "$LIB@@&t@@OBJS" | LIB@@&t@@OBJS=`echo "$LIB@@&t@@OBJS" |
sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
LTLIBOBJS=`echo "$LIB@@&t@@OBJS" | LTLIBOBJS=`echo "$LIB@@&t@@OBJS" |
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_SUBST(LTLIBOBJS) AC_SUBST(LTLIBOBJS)
@end example @end example
@ -14015,8 +14020,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
# error _AIX not defined # error _AIX not defined
#endif #endif
]])], ]])],
[is_aix=yes], [is_aix=yes],
[is_aix=no]) [is_aix=no])
@end group @end group
@end example @end example
@ -14149,19 +14154,19 @@ subfile-1.at ->.
subfile-i.at ---->-- testsuite.at -->. subfile-i.at ---->-- testsuite.at -->.
... / \ ... / \
subfile-n.at ->' >-- autom4te* -->testsuite subfile-n.at ->' >-- autom4te* -->testsuite
/ /
[package.m4] ->' [package.m4] ->'
@end example @end example
@noindent @noindent
Files used in configuring a software package: Files used in configuring a software package:
@example @example
.--> atconfig .--> atconfig
/ /
[atlocal.in] --> config.status* --< [atlocal.in] --> config.status* --<
\ \
`--> [atlocal] `--> [atlocal]
@end example @end example
@noindent @noindent
@ -14169,9 +14174,9 @@ Files created during the test suite execution:
@example @example
atconfig -->. .--> testsuite.log atconfig -->. .--> testsuite.log
\ / \ /
>-- testsuite* --< >-- testsuite* --<
/ \ / \
[atlocal] ->' `--> [testsuite.@var{nn}*] [atlocal] ->' `--> [testsuite.@var{nn}*]
@end example @end example
@ -14452,14 +14457,14 @@ suggest the following Makefile excerpt:
@smallexample @smallexample
$(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/package.m4: $(top_srcdir)/configure.ac
@{ \ @{ \
echo '# Signature of the current package.'; \ echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@@PACKAGE_NAME@@])'; \ echo 'm4_define([AT_PACKAGE_NAME], [@@PACKAGE_NAME@@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@@PACKAGE_TARNAME@@])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [@@PACKAGE_TARNAME@@])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [@@PACKAGE_VERSION@@])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [@@PACKAGE_VERSION@@])'; \
echo 'm4_define([AT_PACKAGE_STRING], [@@PACKAGE_STRING@@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@@PACKAGE_STRING@@])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@@PACKAGE_BUGREPORT@@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@@PACKAGE_BUGREPORT@@])'; \
@} >$(srcdir)/package.m4 @} >$(srcdir)/package.m4
@end smallexample @end smallexample
@noindent @noindent
@ -14495,12 +14500,12 @@ check} with a validation suite.
EXTRA_DIST = testsuite.at testsuite EXTRA_DIST = testsuite.at testsuite
TESTSUITE = $(srcdir)/testsuite TESTSUITE = $(srcdir)/testsuite
check-local: atconfig atlocal $(TESTSUITE) check-local: atconfig atlocal $(TESTSUITE)
$(SHELL) $(TESTSUITE) $(SHELL) $(TESTSUITE)
AUTOTEST = $(AUTOM4TE) --language=autotest AUTOTEST = $(AUTOM4TE) --language=autotest
$(TESTSUITE): $(srcdir)/testsuite.at $(TESTSUITE): $(srcdir)/testsuite.at
$(AUTOTEST) -I $(srcdir) $@@.at -o $@@.tmp $(AUTOTEST) -I $(srcdir) $@@.at -o $@@.tmp
mv $@@.tmp $@@ mv $@@.tmp $@@
@end example @end example
You might want to list explicitly the dependencies, i.e., the list of You might want to list explicitly the dependencies, i.e., the list of
@ -14513,12 +14518,12 @@ following:
subdir = tests subdir = tests
atconfig: $(top_builddir)/config.status atconfig: $(top_builddir)/config.status
cd $(top_builddir) && \ cd $(top_builddir) && \
$(SHELL) ./config.status $(subdir)/$@@ $(SHELL) ./config.status $(subdir)/$@@
atlocal: $(srcdir)/atlocal.in $(top_builddir)/config.status atlocal: $(srcdir)/atlocal.in $(top_builddir)/config.status
cd $(top_builddir) && \ cd $(top_builddir) && \
$(SHELL) ./config.status $(subdir)/$@@ $(SHELL) ./config.status $(subdir)/$@@
@end example @end example
@noindent @noindent
@ -14727,8 +14732,8 @@ similar. If I use
@example @example
AC_DEFINE_UNQUOTED([DATADIR], [$datadir], AC_DEFINE_UNQUOTED([DATADIR], [$datadir],
[Define to the read-only architecture-independent [Define to the read-only architecture-independent
data directory.]) data directory.])
@end example @end example
@noindent @noindent
@ -14763,7 +14768,7 @@ or create a dedicated header file:
@example @example
DISTCLEANFILES = datadir.h DISTCLEANFILES = datadir.h
datadir.h: Makefile datadir.h: Makefile
echo '#define DATADIR "$(datadir)"' >$@@ echo '#define DATADIR "$(datadir)"' >$@@
@end example @end example
@item @item

View File

@ -1,6 +1,6 @@
# This file is part of Autoconf. -*- Autoconf -*- # This file is part of Autoconf. -*- Autoconf -*-
# Checking for functions. # Checking for functions.
# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. # Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -67,8 +67,8 @@ AC_DEFUN([AC_CHECK_FUNC],
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl [AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
AC_CACHE_CHECK([for $1], ac_var, AC_CACHE_CHECK([for $1], ac_var,
[AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])], [AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])],
[AS_VAR_SET(ac_var, yes)], [AS_VAR_SET(ac_var, yes)],
[AS_VAR_SET(ac_var, no)])]) [AS_VAR_SET(ac_var, no)])])
AS_IF([test AS_VAR_GET(ac_var) = yes], [$2], [$3])dnl AS_IF([test AS_VAR_GET(ac_var) = yes], [$2], [$3])dnl
AS_VAR_POPDEF([ac_var])dnl AS_VAR_POPDEF([ac_var])dnl
])# AC_CHECK_FUNC ])# AC_CHECK_FUNC
@ -79,12 +79,12 @@ AS_VAR_POPDEF([ac_var])dnl
AC_DEFUN([AC_CHECK_FUNCS], AC_DEFUN([AC_CHECK_FUNCS],
[AC_FOREACH([AC_Func], [$1], [AC_FOREACH([AC_Func], [$1],
[AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Func), [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Func),
[Define to 1 if you have the `]AC_Func[' function.])])dnl [Define to 1 if you have the `]AC_Func[' function.])])dnl
for ac_func in $1 for ac_func in $1
do do
AC_CHECK_FUNC($ac_func, AC_CHECK_FUNC($ac_func,
[AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])]) $2], [AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])]) $2],
[$3])dnl [$3])dnl
done done
]) ])
@ -267,17 +267,17 @@ wenotbecray
if test $ac_cv_os_cray = yes; then if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do for ac_func in _getb67 GETB67 getb67; do
AC_CHECK_FUNC($ac_func, AC_CHECK_FUNC($ac_func,
[AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
[Define to one of `_getb67', `GETB67', [Define to one of `_getb67', `GETB67',
`getb67' for Cray-2 and Cray-YMP `getb67' for Cray-2 and Cray-YMP
systems. This function is required for systems. This function is required for
`alloca.c' support on those systems.]) `alloca.c' support on those systems.])
break]) break])
done done
fi fi
AC_CACHE_CHECK([stack direction for C alloca], AC_CACHE_CHECK([stack direction for C alloca],
[ac_cv_c_stack_direction], [ac_cv_c_stack_direction],
[AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_RUN_IFELSE([AC_LANG_SOURCE(
[int [int
find_stack_direction () find_stack_direction ()
@ -298,16 +298,16 @@ main ()
{ {
exit (find_stack_direction () < 0); exit (find_stack_direction () < 0);
}])], }])],
[ac_cv_c_stack_direction=1], [ac_cv_c_stack_direction=1],
[ac_cv_c_stack_direction=-1], [ac_cv_c_stack_direction=-1],
[ac_cv_c_stack_direction=0])]) [ac_cv_c_stack_direction=0])])
AH_VERBATIM([STACK_DIRECTION], AH_VERBATIM([STACK_DIRECTION],
[/* If using the C implementation of alloca, define if you know the [/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be direction of stack growth for your system; otherwise it will be
automatically deduced at run-time. automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */ STACK_DIRECTION = 0 => direction of growth unknown */
@%:@undef STACK_DIRECTION])dnl @%:@undef STACK_DIRECTION])dnl
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
])# _AC_LIBOBJ_ALLOCA ])# _AC_LIBOBJ_ALLOCA
@ -323,13 +323,13 @@ AC_DEFUN([AC_FUNC_ALLOCA],
AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h, AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h,
[AC_LINK_IFELSE( [AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[@%:@include <alloca.h>]], [AC_LANG_PROGRAM([[@%:@include <alloca.h>]],
[[char *p = (char *) alloca (2 * sizeof (int));]])], [[char *p = (char *) alloca (2 * sizeof (int));]])],
[ac_cv_working_alloca_h=yes], [ac_cv_working_alloca_h=yes],
[ac_cv_working_alloca_h=no])]) [ac_cv_working_alloca_h=no])])
if test $ac_cv_working_alloca_h = yes; then if test $ac_cv_working_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H, 1, AC_DEFINE(HAVE_ALLOCA_H, 1,
[Define to 1 if you have <alloca.h> and it should be used [Define to 1 if you have <alloca.h> and it should be used
(not on Ultrix).]) (not on Ultrix).])
fi fi
AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
@ -355,12 +355,12 @@ char *alloca ();
# endif # endif
#endif #endif
]], [[char *p = (char *) alloca (1);]])], ]], [[char *p = (char *) alloca (1);]])],
[ac_cv_func_alloca_works=yes], [ac_cv_func_alloca_works=yes],
[ac_cv_func_alloca_works=no])]) [ac_cv_func_alloca_works=no])])
if test $ac_cv_func_alloca_works = yes; then if test $ac_cv_func_alloca_works = yes; then
AC_DEFINE(HAVE_ALLOCA, 1, AC_DEFINE(HAVE_ALLOCA, 1,
[Define to 1 if you have `alloca', as a function or macro.]) [Define to 1 if you have `alloca', as a function or macro.])
else else
_AC_LIBOBJ_ALLOCA _AC_LIBOBJ_ALLOCA
fi fi
@ -395,16 +395,16 @@ AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works,
if (stat (f, &after) < 0) if (stat (f, &after) < 0)
exit (1); exit (1);
exit ((before.st_uid == after.st_uid exit ((before.st_uid == after.st_uid
&& before.st_gid == after.st_gid) ? 0 : 1); && before.st_gid == after.st_gid) ? 0 : 1);
]])], ]])],
[ac_cv_func_chown_works=yes], [ac_cv_func_chown_works=yes],
[ac_cv_func_chown_works=no], [ac_cv_func_chown_works=no],
[ac_cv_func_chown_works=no]) [ac_cv_func_chown_works=no])
rm -f conftest.chown rm -f conftest.chown
]) ])
if test $ac_cv_func_chown_works = yes; then if test $ac_cv_func_chown_works = yes; then
AC_DEFINE(HAVE_CHOWN, 1, AC_DEFINE(HAVE_CHOWN, 1,
[Define to 1 if your system has a working `chown' function.]) [Define to 1 if your system has a working `chown' function.])
fi fi
])# AC_FUNC_CHOWN ])# AC_FUNC_CHOWN
@ -417,21 +417,21 @@ AN_FUNCTION([closedir], [AC_FUNC_CLOSEDIR_VOID])
AC_DEFUN([AC_FUNC_CLOSEDIR_VOID], AC_DEFUN([AC_FUNC_CLOSEDIR_VOID],
[AC_REQUIRE([AC_HEADER_DIRENT])dnl [AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK([whether closedir returns void], AC_CACHE_CHECK([whether closedir returns void],
[ac_cv_func_closedir_void], [ac_cv_func_closedir_void],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
#include <$ac_header_dirent> #include <$ac_header_dirent>
#ifndef __cplusplus #ifndef __cplusplus
int closedir (); int closedir ();
#endif #endif
], ],
[[exit (closedir (opendir (".")) != 0);]])], [[exit (closedir (opendir (".")) != 0);]])],
[ac_cv_func_closedir_void=no], [ac_cv_func_closedir_void=no],
[ac_cv_func_closedir_void=yes], [ac_cv_func_closedir_void=yes],
[ac_cv_func_closedir_void=yes])]) [ac_cv_func_closedir_void=yes])])
if test $ac_cv_func_closedir_void = yes; then if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID, 1, AC_DEFINE(CLOSEDIR_VOID, 1,
[Define to 1 if the `closedir' function returns void instead [Define to 1 if the `closedir' function returns void instead
of `int'.]) of `int'.])
fi fi
]) ])
@ -443,9 +443,10 @@ AN_FUNCTION([error_at_line], [AC_FUNC_ERROR_AT_LINE])
AC_DEFUN([AC_FUNC_ERROR_AT_LINE], AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
[AC_LIBSOURCES([error.h, error.c])dnl [AC_LIBSOURCES([error.h, error.c])dnl
AC_CACHE_CHECK([for error_at_line], ac_cv_lib_error_at_line, AC_CACHE_CHECK([for error_at_line], ac_cv_lib_error_at_line,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],[error_at_line (0, 0, "", 0, "");])], [AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[ac_cv_lib_error_at_line=yes], [error_at_line (0, 0, "", 0, "");])],
[ac_cv_lib_error_at_line=no])]) [ac_cv_lib_error_at_line=yes],
[ac_cv_lib_error_at_line=no])])
if test $ac_cv_lib_error_at_line = no; then if test $ac_cv_lib_error_at_line = no; then
AC_LIBOBJ(error) AC_LIBOBJ(error)
fi fi
@ -474,7 +475,7 @@ AC_DEFUN([_AC_FUNC_FNMATCH_IF],
[#include <fnmatch.h> [#include <fnmatch.h>
# define y(a, b, c) (fnmatch (a, b, c) == 0) # define y(a, b, c) (fnmatch (a, b, c) == 0)
# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
], ],
[exit [exit
(!(y ("a*", "abc", 0) (!(y ("a*", "abc", 0)
&& n ("d*/*1", "d/s/1", FNM_PATHNAME) && n ("d*/*1", "d/s/1", FNM_PATHNAME)
@ -501,9 +502,9 @@ AS_IF([test $$2 = yes], [$3], [$4])
# --------------- # ---------------
AC_DEFUN([AC_FUNC_FNMATCH], AC_DEFUN([AC_FUNC_FNMATCH],
[_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works], [_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works],
[AC_DEFINE([HAVE_FNMATCH], 1, [AC_DEFINE([HAVE_FNMATCH], 1,
[Define to 1 if your system has a working POSIX `fnmatch' [Define to 1 if your system has a working POSIX `fnmatch'
function.])]) function.])])
])# AC_FUNC_FNMATCH ])# AC_FUNC_FNMATCH
@ -520,7 +521,7 @@ AC_CHECK_HEADERS([wchar.h wctype.h])
AC_LIBOBJ([fnmatch]) AC_LIBOBJ([fnmatch])
AC_CONFIG_LINKS([$ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h]) AC_CONFIG_LINKS([$ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h])
AC_DEFINE(fnmatch, rpl_fnmatch, AC_DEFINE(fnmatch, rpl_fnmatch,
[Define to rpl_fnmatch if the replacement function should be used.]) [Define to rpl_fnmatch if the replacement function should be used.])
])# _AC_LIBOBJ_FNMATCH ])# _AC_LIBOBJ_FNMATCH
@ -529,8 +530,8 @@ AC_DEFINE(fnmatch, rpl_fnmatch,
AN_FUNCTION([fnmatch], [AC_REPLACE_FNMATCH]) AN_FUNCTION([fnmatch], [AC_REPLACE_FNMATCH])
AC_DEFUN([AC_REPLACE_FNMATCH], AC_DEFUN([AC_REPLACE_FNMATCH],
[_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works], [_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works],
[rm -f $ac_config_libobj_dir/fnmatch.h], [rm -f $ac_config_libobj_dir/fnmatch.h],
[_AC_LIBOBJ_FNMATCH]) [_AC_LIBOBJ_FNMATCH])
])# AC_REPLACE_FNMATCH ])# AC_REPLACE_FNMATCH
@ -539,8 +540,8 @@ AC_DEFUN([AC_REPLACE_FNMATCH],
AC_DEFUN([AC_FUNC_FNMATCH_GNU], AC_DEFUN([AC_FUNC_FNMATCH_GNU],
[AC_REQUIRE([AC_GNU_SOURCE]) [AC_REQUIRE([AC_GNU_SOURCE])
_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu], _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
[rm -f $ac_config_libobj_dir/fnmatch.h], [rm -f $ac_config_libobj_dir/fnmatch.h],
[_AC_LIBOBJ_FNMATCH]) [_AC_LIBOBJ_FNMATCH])
])# AC_FUNC_FNMATCH_GNU ])# AC_FUNC_FNMATCH_GNU
@ -566,9 +567,9 @@ AC_DEFUN([AC_FUNC_FSEEKO],
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
AC_CACHE_CHECK([for fseeko], [ac_cv_func_fseeko], AC_CACHE_CHECK([for fseeko], [ac_cv_func_fseeko],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <stdio.h>], [AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <stdio.h>],
[[return fseeko && fseeko (stdin, 0, 0);]])], [[return fseeko && fseeko (stdin, 0, 0);]])],
[ac_cv_func_fseeko=yes], [ac_cv_func_fseeko=yes],
[ac_cv_func_fseeko=no])]) [ac_cv_func_fseeko=no])])
if test $ac_cv_func_fseeko = yes; then if test $ac_cv_func_fseeko = yes; then
AC_DEFINE(HAVE_FSEEKO, 1, AC_DEFINE(HAVE_FSEEKO, 1,
[Define to 1 if fseeko (and presumably ftello) exists and is declared.]) [Define to 1 if fseeko (and presumably ftello) exists and is declared.])
@ -597,16 +598,16 @@ fi
# getgroups function only if there is such a function. # getgroups function only if there is such a function.
if test $ac_cv_func_getgroups = yes; then if test $ac_cv_func_getgroups = yes; then
AC_CACHE_CHECK([for working getgroups], ac_cv_func_getgroups_works, AC_CACHE_CHECK([for working getgroups], ac_cv_func_getgroups_works,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ [[/* On Ultrix 4.3, getgroups (0, 0) always fails. */
exit (getgroups (0, 0) == -1 ? 1 : 0);]])], exit (getgroups (0, 0) == -1 ? 1 : 0);]])],
[ac_cv_func_getgroups_works=yes], [ac_cv_func_getgroups_works=yes],
[ac_cv_func_getgroups_works=no], [ac_cv_func_getgroups_works=no],
[ac_cv_func_getgroups_works=no]) [ac_cv_func_getgroups_works=no])
]) ])
if test $ac_cv_func_getgroups_works = yes; then if test $ac_cv_func_getgroups_works = yes; then
AC_DEFINE(HAVE_GETGROUPS, 1, AC_DEFINE(HAVE_GETGROUPS, 1,
[Define to 1 if your system has a working `getgroups' function.]) [Define to 1 if your system has a working `getgroups' function.])
fi fi
fi fi
LIBS=$ac_save_LIBS LIBS=$ac_save_LIBS
@ -642,8 +643,8 @@ if test $ac_have_func = no; then
[ac_have_func=yes [ac_have_func=yes
AC_DEFINE(UMAX, 1, [Define to 1 for Encore UMAX.]) AC_DEFINE(UMAX, 1, [Define to 1 for Encore UMAX.])
AC_DEFINE(UMAX4_3, 1, AC_DEFINE(UMAX4_3, 1,
[Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> [Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h>
instead of <sys/cpustats.h>.])]) instead of <sys/cpustats.h>.])])
fi fi
if test $ac_have_func = no; then if test $ac_have_func = no; then
@ -657,11 +658,11 @@ fi
AC_CHECK_HEADERS(nlist.h, AC_CHECK_HEADERS(nlist.h,
[AC_CHECK_MEMBERS([struct nlist.n_un.n_name], [AC_CHECK_MEMBERS([struct nlist.n_un.n_name],
[AC_DEFINE(NLIST_NAME_UNION, 1, [AC_DEFINE(NLIST_NAME_UNION, 1,
[Define to 1 if your `struct nlist' has an [Define to 1 if your `struct nlist' has an
`n_un' member. Obsolete, depend on `n_un' member. Obsolete, depend on
`HAVE_STRUCT_NLIST_N_UN_N_NAME])], [], `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [],
[@%:@include <nlist.h>]) [@%:@include <nlist.h>])
])dnl ])dnl
])# _AC_LIBOBJ_GETLOADAVG ])# _AC_LIBOBJ_GETLOADAVG
@ -708,29 +709,29 @@ if test $ac_have_func = no; then
ac_getloadavg_LIBS=$LIBS ac_getloadavg_LIBS=$LIBS
LIBS="-L/usr/local/lib $LIBS" LIBS="-L/usr/local/lib $LIBS"
AC_CHECK_LIB(getloadavg, getloadavg, AC_CHECK_LIB(getloadavg, getloadavg,
[LIBS="-lgetloadavg $LIBS"], [LIBS=$ac_getloadavg_LIBS]) [LIBS="-lgetloadavg $LIBS"], [LIBS=$ac_getloadavg_LIBS])
fi fi
# Make sure it is really in the library, if we think we found it, # Make sure it is really in the library, if we think we found it,
# otherwise set up the replacement function. # otherwise set up the replacement function.
AC_CHECK_FUNCS(getloadavg, [], AC_CHECK_FUNCS(getloadavg, [],
[_AC_LIBOBJ_GETLOADAVG]) [_AC_LIBOBJ_GETLOADAVG])
# Some definitions of getloadavg require that the program be installed setgid. # Some definitions of getloadavg require that the program be installed setgid.
AC_CACHE_CHECK(whether getloadavg requires setgid, AC_CACHE_CHECK(whether getloadavg requires setgid,
ac_cv_func_getloadavg_setgid, ac_cv_func_getloadavg_setgid,
[AC_EGREP_CPP([Yowza Am I SETGID yet], [AC_EGREP_CPP([Yowza Am I SETGID yet],
[#include "$srcdir/$ac_config_libobj_dir/getloadavg.c" [#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
#ifdef LDAV_PRIVILEGED #ifdef LDAV_PRIVILEGED
Yowza Am I SETGID yet Yowza Am I SETGID yet
@%:@endif], @%:@endif],
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=yes,
ac_cv_func_getloadavg_setgid=no)]) ac_cv_func_getloadavg_setgid=no)])
if test $ac_cv_func_getloadavg_setgid = yes; then if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true NEED_SETGID=true
AC_DEFINE(GETLOADAVG_PRIVILEGED, 1, AC_DEFINE(GETLOADAVG_PRIVILEGED, 1,
[Define to 1 if the `getloadavg' function needs to be run setuid [Define to 1 if the `getloadavg' function needs to be run setuid
or setgid.]) or setgid.])
else else
NEED_SETGID=false NEED_SETGID=false
fi fi
@ -743,7 +744,7 @@ if test $ac_cv_func_getloadavg_setgid = yes; then
# If we got an error (system does not support symlinks), try without -L. # If we got an error (system does not support symlinks), try without -L.
test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
ac_cv_group_kmem=`echo $ac_ls_output \ ac_cv_group_kmem=`echo $ac_ls_output \
| sed -ne ['s/[ ][ ]*/ /g; | sed -ne ['s/[ ][ ]*/ /g;
s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
/ /s/.* //;p;']` / /s/.* //;p;']`
]) ])
@ -786,12 +787,12 @@ AC_DEFUN([AC_FUNC_GETPGRP],
ac_cv_func_getpgrp_void, ac_cv_func_getpgrp_void,
[# Use it with a single arg. [# Use it with a single arg.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [getpgrp (0);])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [getpgrp (0);])],
[ac_cv_func_getpgrp_void=no], [ac_cv_func_getpgrp_void=no],
[ac_cv_func_getpgrp_void=yes]) [ac_cv_func_getpgrp_void=yes])
]) ])
if test $ac_cv_func_getpgrp_void = yes; then if test $ac_cv_func_getpgrp_void = yes; then
AC_DEFINE(GETPGRP_VOID, 1, AC_DEFINE(GETPGRP_VOID, 1,
[Define to 1 if the `getpgrp' function requires zero arguments.]) [Define to 1 if the `getpgrp' function requires zero arguments.])
fi fi
])# AC_FUNC_GETPGRP ])# AC_FUNC_GETPGRP
@ -812,12 +813,12 @@ if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[struct stat sbuf; [struct stat sbuf;
/* Linux will dereference the symlink and fail. /* Linux will dereference the symlink and fail.
That is better in the sense that it means we will not That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */ have to compile and use the lstat wrapper. */
exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);])], exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);])],
[ac_cv_func_lstat_dereferences_slashed_symlink=yes], [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
[ac_cv_func_lstat_dereferences_slashed_symlink=no], [ac_cv_func_lstat_dereferences_slashed_symlink=no],
[ac_cv_func_lstat_dereferences_slashed_symlink=no]) [ac_cv_func_lstat_dereferences_slashed_symlink=no])
else else
# If the `ln -s' command failed, then we probably don't even # If the `ln -s' command failed, then we probably don't even
# have an lstat function. # have an lstat function.
@ -828,8 +829,8 @@ rm -f conftest.sym conftest.file
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, 1, AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, 1,
[Define to 1 if `lstat' dereferences a symlink specified [Define to 1 if `lstat' dereferences a symlink specified
with a trailing slash.]) with a trailing slash.])
if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
AC_LIBOBJ(lstat) AC_LIBOBJ(lstat)
@ -852,10 +853,10 @@ AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
char *malloc (); char *malloc ();
#endif #endif
]], ]],
[exit (malloc (0) ? 0 : 1);])], [exit (malloc (0) ? 0 : 1);])],
[ac_cv_func_malloc_0_nonnull=yes], [ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no], [ac_cv_func_malloc_0_nonnull=no],
[ac_cv_func_malloc_0_nonnull=no])]) [ac_cv_func_malloc_0_nonnull=no])])
AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
])# AC_FUNC_MALLOC ])# AC_FUNC_MALLOC
@ -868,8 +869,8 @@ AN_FUNCTION([malloc], [AC_FUNC_MALLOC])
AC_DEFUN([AC_FUNC_MALLOC], AC_DEFUN([AC_FUNC_MALLOC],
[_AC_FUNC_MALLOC_IF( [_AC_FUNC_MALLOC_IF(
[AC_DEFINE([HAVE_MALLOC], 1, [AC_DEFINE([HAVE_MALLOC], 1,
[Define to 1 if your system has a GNU libc compatible `malloc' [Define to 1 if your system has a GNU libc compatible `malloc'
function, and to 0 otherwise.])], function, and to 0 otherwise.])],
[AC_DEFINE([HAVE_MALLOC], 0) [AC_DEFINE([HAVE_MALLOC], 0)
AC_LIBOBJ(malloc) AC_LIBOBJ(malloc)
AC_DEFINE([malloc], [rpl_malloc], AC_DEFINE([malloc], [rpl_malloc],
@ -886,8 +887,8 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
ac_cv_func_mbrtowc, ac_cv_func_mbrtowc,
[AC_LINK_IFELSE( [AC_LINK_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[[@%:@include <wchar.h>]], [[@%:@include <wchar.h>]],
[[mbstate_t state; return ! (sizeof state && mbrtowc);]])], [[mbstate_t state; return ! (sizeof state && mbrtowc);]])],
ac_cv_func_mbrtowc=yes, ac_cv_func_mbrtowc=yes,
ac_cv_func_mbrtowc=no)]) ac_cv_func_mbrtowc=no)])
if test $ac_cv_func_mbrtowc = yes; then if test $ac_cv_func_mbrtowc = yes; then
@ -902,7 +903,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
AN_FUNCTION([memcmp], [AC_FUNC_MEMCMP]) AN_FUNCTION([memcmp], [AC_FUNC_MEMCMP])
AC_DEFUN([AC_FUNC_MEMCMP], AC_DEFUN([AC_FUNC_MEMCMP],
[AC_CACHE_CHECK([for working memcmp], ac_cv_func_memcmp_working, [AC_CACHE_CHECK([for working memcmp], ac_cv_func_memcmp_working,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[
/* Some versions of memcmp are not 8-bit clean. */ /* Some versions of memcmp are not 8-bit clean. */
char c0 = 0x40, c1 = 0x80, c2 = 0x81; char c0 = 0x40, c1 = 0x80, c2 = 0x81;
if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
@ -917,19 +918,19 @@ AC_DEFUN([AC_FUNC_MEMCMP],
int i; int i;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
char *a = foo + i; char *a = foo + i;
char *b = bar + i; char *b = bar + i;
strcpy (a, "--------01111111"); strcpy (a, "--------01111111");
strcpy (b, "--------10000000"); strcpy (b, "--------10000000");
if (memcmp (a, b, 16) >= 0) if (memcmp (a, b, 16) >= 0)
exit (1); exit (1);
} }
exit (0); exit (0);
} }
]])], ]])],
[ac_cv_func_memcmp_working=yes], [ac_cv_func_memcmp_working=yes],
[ac_cv_func_memcmp_working=no], [ac_cv_func_memcmp_working=no],
[ac_cv_func_memcmp_working=no])]) [ac_cv_func_memcmp_working=no])])
test $ac_cv_func_memcmp_working = no && AC_LIBOBJ([memcmp]) test $ac_cv_func_memcmp_working = no && AC_LIBOBJ([memcmp])
])# AC_FUNC_MEMCMP ])# AC_FUNC_MEMCMP
@ -1081,16 +1082,16 @@ main ()
mktime_test ((time_t) 60 * 60 * 24); mktime_test ((time_t) 60 * 60 * 24);
for (j = 1; 0 < j; j *= 2) for (j = 1; 0 < j; j *= 2)
bigtime_test (j); bigtime_test (j);
bigtime_test (j - 1); bigtime_test (j - 1);
} }
irix_6_4_bug (); irix_6_4_bug ();
spring_forward_gap (); spring_forward_gap ();
exit (0); exit (0);
}]])], }]])],
[ac_cv_func_working_mktime=yes], [ac_cv_func_working_mktime=yes],
[ac_cv_func_working_mktime=no], [ac_cv_func_working_mktime=no],
[ac_cv_func_working_mktime=no])]) [ac_cv_func_working_mktime=no])])
if test $ac_cv_func_working_mktime = no; then if test $ac_cv_func_working_mktime = no; then
AC_LIBOBJ([mktime]) AC_LIBOBJ([mktime])
fi fi
@ -1213,7 +1214,7 @@ main ()
exit (1); exit (1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_FIXED, fd, 0L)) MAP_PRIVATE | MAP_FIXED, fd, 0L))
exit (1); exit (1);
for (i = 0; i < pagesize; ++i) for (i = 0; i < pagesize; ++i)
if (*(data + i) != *(data2 + i)) if (*(data + i) != *(data2 + i))
@ -1235,12 +1236,12 @@ main ()
close (fd); close (fd);
exit (0); exit (0);
}]])], }]])],
[ac_cv_func_mmap_fixed_mapped=yes], [ac_cv_func_mmap_fixed_mapped=yes],
[ac_cv_func_mmap_fixed_mapped=no], [ac_cv_func_mmap_fixed_mapped=no],
[ac_cv_func_mmap_fixed_mapped=no])]) [ac_cv_func_mmap_fixed_mapped=no])])
if test $ac_cv_func_mmap_fixed_mapped = yes; then if test $ac_cv_func_mmap_fixed_mapped = yes; then
AC_DEFINE(HAVE_MMAP, 1, AC_DEFINE(HAVE_MMAP, 1,
[Define to 1 if you have a working `mmap' system call.]) [Define to 1 if you have a working `mmap' system call.])
fi fi
rm -f conftest.mmap rm -f conftest.mmap
])# AC_FUNC_MMAP ])# AC_FUNC_MMAP
@ -1261,9 +1262,9 @@ AC_DEFUN([AC_FUNC_OBSTACK],
AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack, AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack,
[AC_LINK_IFELSE( [AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[@%:@include "obstack.h"]], [AC_LANG_PROGRAM([[@%:@include "obstack.h"]],
[[struct obstack *mem; obstack_free(mem,(char *) 0)]])], [[struct obstack *mem; obstack_free(mem,(char *) 0)]])],
[ac_cv_func_obstack=yes], [ac_cv_func_obstack=yes],
[ac_cv_func_obstack=no])]) [ac_cv_func_obstack=no])])
if test $ac_cv_func_obstack = yes; then if test $ac_cv_func_obstack = yes; then
AC_DEFINE(HAVE_OBSTACK, 1, [Define to 1 if libc includes obstacks.]) AC_DEFINE(HAVE_OBSTACK, 1, [Define to 1 if libc includes obstacks.])
else else
@ -1293,10 +1294,10 @@ AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull,
char *realloc (); char *realloc ();
#endif #endif
]], ]],
[exit (realloc (0, 0) ? 0 : 1);])], [exit (realloc (0, 0) ? 0 : 1);])],
[ac_cv_func_realloc_0_nonnull=yes], [ac_cv_func_realloc_0_nonnull=yes],
[ac_cv_func_realloc_0_nonnull=no], [ac_cv_func_realloc_0_nonnull=no],
[ac_cv_func_realloc_0_nonnull=no])]) [ac_cv_func_realloc_0_nonnull=no])])
AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
])# AC_FUNC_REALLOC ])# AC_FUNC_REALLOC
@ -1309,8 +1310,8 @@ AN_FUNCTION([realloc], [AC_FUNC_REALLOC])
AC_DEFUN([AC_FUNC_REALLOC], AC_DEFUN([AC_FUNC_REALLOC],
[_AC_FUNC_REALLOC_IF( [_AC_FUNC_REALLOC_IF(
[AC_DEFINE([HAVE_REALLOC], 1, [AC_DEFINE([HAVE_REALLOC], 1,
[Define to 1 if your system has a GNU libc compatible `realloc' [Define to 1 if your system has a GNU libc compatible `realloc'
function, and to 0 otherwise.])], function, and to 0 otherwise.])],
[AC_DEFINE([HAVE_REALLOC], 0) [AC_DEFINE([HAVE_REALLOC], 0)
AC_LIBOBJ([realloc]) AC_LIBOBJ([realloc])
AC_DEFINE([realloc], [rpl_realloc], AC_DEFINE([realloc], [rpl_realloc],
@ -1341,10 +1342,10 @@ AC_CACHE_CHECK([types of arguments for select],
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
], ],
[extern int select ($ac_arg1, [extern int select ($ac_arg1,
$ac_arg234, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg234,
$ac_arg5);])], $ac_arg5);])],
[ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3]) [ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3])
done done
done done
done done
@ -1356,11 +1357,11 @@ set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
IFS=$ac_save_IFS IFS=$ac_save_IFS
shift shift
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1], AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1],
[Define to the type of arg 1 for `select'.]) [Define to the type of arg 1 for `select'.])
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234, ($[2]), AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234, ($[2]),
[Define to the type of args 2, 3 and 4 for `select'.]) [Define to the type of args 2, 3 and 4 for `select'.])
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, ($[3]), AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, ($[3]),
[Define to the type of arg 5 for `select'.]) [Define to the type of arg 5 for `select'.])
rm -f conftest* rm -f conftest*
])# AC_FUNC_SELECT_ARGTYPES ])# AC_FUNC_SELECT_ARGTYPES
@ -1380,12 +1381,12 @@ AC_DEFUN([AC_FUNC_SETPGRP],
setpgrp(1, 1) will fail with ESRCH and return -1, in that case setpgrp(1, 1) will fail with ESRCH and return -1, in that case
exit successfully. */ exit successfully. */
exit (setpgrp (1,1) == -1 ? 0 : 1);])], exit (setpgrp (1,1) == -1 ? 0 : 1);])],
[ac_cv_func_setpgrp_void=no], [ac_cv_func_setpgrp_void=no],
[ac_cv_func_setpgrp_void=yes], [ac_cv_func_setpgrp_void=yes],
[AC_MSG_ERROR([cannot check setpgrp when cross compiling])])]) [AC_MSG_ERROR([cannot check setpgrp when cross compiling])])])
if test $ac_cv_func_setpgrp_void = yes; then if test $ac_cv_func_setpgrp_void = yes; then
AC_DEFINE(SETPGRP_VOID, 1, AC_DEFINE(SETPGRP_VOID, 1,
[Define to 1 if the `setpgrp' function takes no argument.]) [Define to 1 if the `setpgrp' function takes no argument.])
fi fi
])# AC_FUNC_SETPGRP ])# AC_FUNC_SETPGRP
@ -1402,18 +1403,18 @@ fi
m4_define([_AC_FUNC_STAT], m4_define([_AC_FUNC_STAT],
[AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl [AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
AC_CACHE_CHECK([whether $1 accepts an empty string], AC_CACHE_CHECK([whether $1 accepts an empty string],
[ac_cv_func_$1_empty_string_bug], [ac_cv_func_$1_empty_string_bug],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[struct stat sbuf; [[struct stat sbuf;
exit ($1 ("", &sbuf) ? 1 : 0);]])], exit ($1 ("", &sbuf) ? 1 : 0);]])],
[ac_cv_func_$1_empty_string_bug=yes], [ac_cv_func_$1_empty_string_bug=yes],
[ac_cv_func_$1_empty_string_bug=no], [ac_cv_func_$1_empty_string_bug=no],
[ac_cv_func_$1_empty_string_bug=yes])]) [ac_cv_func_$1_empty_string_bug=yes])])
if test $ac_cv_func_$1_empty_string_bug = yes; then if test $ac_cv_func_$1_empty_string_bug = yes; then
AC_LIBOBJ([$1]) AC_LIBOBJ([$1])
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1_EMPTY_STRING_BUG]), 1, AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1_EMPTY_STRING_BUG]), 1,
[Define to 1 if `$1' has the bug that it succeeds when [Define to 1 if `$1' has the bug that it succeeds when
given the zero-length file name argument.]) given the zero-length file name argument.])
fi fi
])# _AC_FUNC_STAT ])# _AC_FUNC_STAT
@ -1433,8 +1434,8 @@ m4_define([_AC_LIBOBJ_STRTOD],
AC_CHECK_FUNC(pow) AC_CHECK_FUNC(pow)
if test $ac_cv_func_pow = no; then if test $ac_cv_func_pow = no; then
AC_CHECK_LIB(m, pow, AC_CHECK_LIB(m, pow,
[POW_LIB=-lm], [POW_LIB=-lm],
[AC_MSG_WARN([cannot find library containing definition of pow])]) [AC_MSG_WARN([cannot find library containing definition of pow])])
fi fi
])# _AC_LIBOBJ_STRTOD ])# _AC_LIBOBJ_STRTOD
@ -1472,9 +1473,9 @@ main()
exit (0); exit (0);
} }
]])], ]])],
ac_cv_func_strtod=yes, ac_cv_func_strtod=yes,
ac_cv_func_strtod=no, ac_cv_func_strtod=no,
ac_cv_func_strtod=no)]) ac_cv_func_strtod=no)])
if test $ac_cv_func_strtod = no; then if test $ac_cv_func_strtod = no; then
_AC_LIBOBJ_STRTOD _AC_LIBOBJ_STRTOD
fi fi
@ -1493,7 +1494,7 @@ AC_DEFUN([AC_FUNC_STRERROR_R],
[AC_CHECK_DECLS([strerror_r]) [AC_CHECK_DECLS([strerror_r])
AC_CHECK_FUNCS([strerror_r]) AC_CHECK_FUNCS([strerror_r])
AC_CACHE_CHECK([whether strerror_r returns char *], AC_CACHE_CHECK([whether strerror_r returns char *],
ac_cv_func_strerror_r_char_p, ac_cv_func_strerror_r_char_p,
[ [
ac_cv_func_strerror_r_char_p=no ac_cv_func_strerror_r_char_p=no
if test $ac_cv_have_decl_strerror_r = yes; then if test $ac_cv_have_decl_strerror_r = yes; then
@ -1516,7 +1517,7 @@ AC_CACHE_CHECK([whether strerror_r returns char *],
[[char buf[100]; [[char buf[100];
char x = *strerror_r (0, buf, sizeof buf); char x = *strerror_r (0, buf, sizeof buf);
exit (!isalpha (x));]])], exit (!isalpha (x));]])],
ac_cv_func_strerror_r_char_p=yes, , :) ac_cv_func_strerror_r_char_p=yes, , :)
fi fi
]) ])
if test $ac_cv_func_strerror_r_char_p = yes; then if test $ac_cv_func_strerror_r_char_p = yes; then
@ -1533,7 +1534,7 @@ AC_DEFUN([AC_FUNC_STRFTIME],
[AC_CHECK_FUNCS(strftime, [], [AC_CHECK_FUNCS(strftime, [],
[# strftime is in -lintl on SCO UNIX. [# strftime is in -lintl on SCO UNIX.
AC_CHECK_LIB(intl, strftime, AC_CHECK_LIB(intl, strftime,
[AC_DEFINE(HAVE_STRFTIME) [AC_DEFINE(HAVE_STRFTIME)
LIBS="-lintl $LIBS"])])dnl LIBS="-lintl $LIBS"])])dnl
])# AC_FUNC_STRFTIME ])# AC_FUNC_STRFTIME
@ -1543,7 +1544,7 @@ LIBS="-lintl $LIBS"])])dnl
AN_FUNCTION([strnlen], [AC_FUNC_STRNLEN]) AN_FUNCTION([strnlen], [AC_FUNC_STRNLEN])
AC_DEFUN([AC_FUNC_STRNLEN], AC_DEFUN([AC_FUNC_STRNLEN],
[AC_CACHE_CHECK([for working strnlen], ac_cv_func_strnlen_working, [AC_CACHE_CHECK([for working strnlen], ac_cv_func_strnlen_working,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[
#define S "foobar" #define S "foobar"
#define S_LEN (sizeof S - 1) #define S_LEN (sizeof S - 1)
@ -1559,9 +1560,9 @@ AC_DEFUN([AC_FUNC_STRNLEN],
} }
exit (0); exit (0);
]])], ]])],
[ac_cv_func_strnlen_working=yes], [ac_cv_func_strnlen_working=yes],
[ac_cv_func_strnlen_working=no], [ac_cv_func_strnlen_working=no],
[ac_cv_func_strnlen_working=no])]) [ac_cv_func_strnlen_working=no])])
test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen]) test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen])
])# AC_FUNC_STRNLEN ])# AC_FUNC_STRNLEN
@ -1608,9 +1609,9 @@ AC_CACHE_CHECK(whether setvbuf arguments are reversed,
ac_cv_func_setvbuf_reversed=yes)])]) ac_cv_func_setvbuf_reversed=yes)])])
if test $ac_cv_func_setvbuf_reversed = yes; then if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED, 1, AC_DEFINE(SETVBUF_REVERSED, 1,
[Define to 1 if the `setvbuf' function takes the buffering type as [Define to 1 if the `setvbuf' function takes the buffering type as
its second argument and the buffer pointer as the third, as on its second argument and the buffer pointer as the third, as on
System V before release 3.]) System V before release 3.])
fi fi
])# AC_FUNC_SETVBUF_REVERSED ])# AC_FUNC_SETVBUF_REVERSED
@ -1629,13 +1630,13 @@ AC_DEFUN([AC_FUNC_STRCOLL],
[[exit (strcoll ("abc", "def") >= 0 || [[exit (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 || strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0)]])], strcoll ("123", "456") >= 0)]])],
ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=yes,
ac_cv_func_strcoll_works=no, ac_cv_func_strcoll_works=no,
ac_cv_func_strcoll_works=no)]) ac_cv_func_strcoll_works=no)])
if test $ac_cv_func_strcoll_works = yes; then if test $ac_cv_func_strcoll_works = yes; then
AC_DEFINE(HAVE_STRCOLL, 1, AC_DEFINE(HAVE_STRCOLL, 1,
[Define to 1 if you have the `strcoll' function and it is properly [Define to 1 if you have the `strcoll' function and it is properly
defined.]) defined.])
fi fi
])# AC_FUNC_STRCOLL ])# AC_FUNC_STRCOLL
@ -1655,18 +1656,18 @@ AC_DEFUN([AC_FUNC_UTIME_NULL],
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[struct stat s, t; [[struct stat s, t;
exit (!(stat ("conftest.data", &s) == 0 exit (!(stat ("conftest.data", &s) == 0
&& utime ("conftest.data", (long *)0) == 0 && utime ("conftest.data", (long *)0) == 0
&& stat ("conftest.data", &t) == 0 && stat ("conftest.data", &t) == 0
&& t.st_mtime >= s.st_mtime && t.st_mtime >= s.st_mtime
&& t.st_mtime - s.st_mtime < 120));]])], && t.st_mtime - s.st_mtime < 120));]])],
ac_cv_func_utime_null=yes, ac_cv_func_utime_null=yes,
ac_cv_func_utime_null=no, ac_cv_func_utime_null=no,
ac_cv_func_utime_null=no) ac_cv_func_utime_null=no)
rm -f core core.* *.core]) rm -f core core.* *.core])
if test $ac_cv_func_utime_null = yes; then if test $ac_cv_func_utime_null = yes; then
AC_DEFINE(HAVE_UTIME_NULL, 1, AC_DEFINE(HAVE_UTIME_NULL, 1,
[Define to 1 if `utime(file, NULL)' sets file's timestamp to the [Define to 1 if `utime(file, NULL)' sets file's timestamp to the
present.]) present.])
fi fi
rm -f conftest.data rm -f conftest.data
])# AC_FUNC_UTIME_NULL ])# AC_FUNC_UTIME_NULL
@ -1734,9 +1735,9 @@ AC_DEFUN([_AC_FUNC_FORK],
/* Some systems only have a dummy stub for fork() */ /* Some systems only have a dummy stub for fork() */
int main () int main ()
{ {
if (fork() < 0) if (fork() < 0)
exit (1); exit (1);
exit (0); exit (0);
}], }],
[ac_cv_func_fork_works=yes], [ac_cv_func_fork_works=yes],
[ac_cv_func_fork_works=no], [ac_cv_func_fork_works=no],
@ -1843,9 +1844,9 @@ main ()
); );
} }
}]])], }]])],
[ac_cv_func_vfork_works=yes], [ac_cv_func_vfork_works=yes],
[ac_cv_func_vfork_works=no], [ac_cv_func_vfork_works=no],
[ac_cv_func_vfork_works=cross])]) [ac_cv_func_vfork_works=cross])])
])# _AC_FUNC_VFORK ])# _AC_FUNC_VFORK
@ -1869,9 +1870,9 @@ AN_FUNCTION([_doprnt], [AC_FUNC_VPRINTF])
AC_DEFUN([AC_FUNC_VPRINTF], AC_DEFUN([AC_FUNC_VPRINTF],
[AC_CHECK_FUNCS(vprintf, [] [AC_CHECK_FUNCS(vprintf, []
[AC_CHECK_FUNC(_doprnt, [AC_CHECK_FUNC(_doprnt,
[AC_DEFINE(HAVE_DOPRNT, 1, [AC_DEFINE(HAVE_DOPRNT, 1,
[Define to 1 if you don't have `vprintf' but do have [Define to 1 if you don't have `vprintf' but do have
`_doprnt.'])])]) `_doprnt.'])])])
]) ])
@ -1891,7 +1892,7 @@ AC_DEFUN([AC_FUNC_WAIT3],
[$0: `wait3' is being removed from the Open Group standards. [$0: `wait3' is being removed from the Open Group standards.
Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl
AC_CACHE_CHECK([for wait3 that fills in rusage], AC_CACHE_CHECK([for wait3 that fills in rusage],
[ac_cv_func_wait3_rusage], [ac_cv_func_wait3_rusage],
[AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_RUN_IFELSE([AC_LANG_SOURCE(
[[#include <sys/types.h> [[#include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
@ -1928,13 +1929,13 @@ main ()
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
} }
}]])], }]])],
[ac_cv_func_wait3_rusage=yes], [ac_cv_func_wait3_rusage=yes],
[ac_cv_func_wait3_rusage=no], [ac_cv_func_wait3_rusage=no],
[ac_cv_func_wait3_rusage=no])]) [ac_cv_func_wait3_rusage=no])])
if test $ac_cv_func_wait3_rusage = yes; then if test $ac_cv_func_wait3_rusage = yes; then
AC_DEFINE(HAVE_WAIT3, 1, AC_DEFINE(HAVE_WAIT3, 1,
[Define to 1 if you have the `wait3' system call. [Define to 1 if you have the `wait3' system call.
Deprecated, you should no longer depend upon `wait3'.]) Deprecated, you should no longer depend upon `wait3'.])
fi fi
])# AC_FUNC_WAIT3 ])# AC_FUNC_WAIT3