annotate m4/euidaccess.m4 @ 14079:97fc9a21a8fb

maint: update almost all copyright ranges to include 2011 Run the new "make update-copyright" rule.
author Jim Meyering <meyering@redhat.com>
date Sat, 01 Jan 2011 20:17:23 +0100
parents c2cbabec01dd
children f852b19fc41a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12182
8ba00f285749 m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
Jim Meyering <meyering@redhat.com>
parents: 12169
diff changeset
1 # euidaccess.m4 serial 12
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 12559
diff changeset
2 dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
5611
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5158
diff changeset
3 dnl This file is free software; the Free Software Foundation
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5158
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5158
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
5158
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
7 AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
8 [
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
9 AC_REQUIRE([gl_FUNC_EUIDACCESS])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10662
diff changeset
10 AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], [1],
5158
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
11 [Define this if you prefer euidaccess to return the correct result
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
12 even if this would make it nonreentrant. Define this only if your
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
13 entire application is safe even if the uid or gid might temporarily
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
14 change. If your application uses signal handlers or threads it
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
15 is probably not safe.])
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
16 ])
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
17
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 AC_DEFUN([gl_FUNC_EUIDACCESS],
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 [
10662
ad36db29dad7 Move the euidaccess() declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
20 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
ad36db29dad7 Move the euidaccess() declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
21
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 dnl Persuade glibc <unistd.h> to declare euidaccess().
9209
5a0294ce5372 Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
Eric Blake <ebb9@byu.net>
parents: 7683
diff changeset
23 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10662
diff changeset
25 AC_REPLACE_FUNCS([euidaccess])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 if test $ac_cv_func_euidaccess = no; then
10662
ad36db29dad7 Move the euidaccess() declaration to <unistd.h>.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
27 HAVE_EUIDACCESS=0
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 gl_PREREQ_EUIDACCESS
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 fi
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 ])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 # Prerequisites of lib/euidaccess.c.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 AC_DEFUN([gl_PREREQ_EUIDACCESS], [
11944
660d7f74a5e8 euidaccess: prefer POSIX over non-standard implementation
Eric Blake <ebb9@byu.net>
parents: 11007
diff changeset
34 dnl Prefer POSIX faccessat over non-standard euidaccess.
660d7f74a5e8 euidaccess: prefer POSIX over non-standard implementation
Eric Blake <ebb9@byu.net>
parents: 11007
diff changeset
35 AC_CHECK_FUNCS_ONCE([faccessat])
660d7f74a5e8 euidaccess: prefer POSIX over non-standard implementation
Eric Blake <ebb9@byu.net>
parents: 11007
diff changeset
36 dnl Try various other non-standard fallbacks.
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10662
diff changeset
37 AC_CHECK_HEADERS_ONCE([libgen.h])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10662
diff changeset
38 AC_CHECK_DECLS_ONCE([setregid])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 AC_REQUIRE([AC_FUNC_GETGROUPS])
5158
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
40
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
41 # Solaris 9 needs -lgen to get the eaccess function.
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
42 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
43 # programs in the package would end up linked with that potentially-shared
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
44 # library, inducing unnecessary run-time overhead.
12169
d9a855dec815 don't let environment settings perturb build
Jim Meyering <meyering@redhat.com>
parents: 11944
diff changeset
45 LIB_EACCESS=
12182
8ba00f285749 m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
Jim Meyering <meyering@redhat.com>
parents: 12169
diff changeset
46 AC_SUBST([LIB_EACCESS])
5158
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
47 gl_saved_libs=$LIBS
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10662
diff changeset
48 AC_SEARCH_LIBS([eaccess], [gen],
5158
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
49 [test "$ac_cv_search_eaccess" = "none required" ||
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
50 LIB_EACCESS=$ac_cv_search_eaccess])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10662
diff changeset
51 AC_CHECK_FUNCS([eaccess])
5158
c710d6c89900 (gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert <eggert@cs.ucla.edu>
parents: 4531
diff changeset
52 LIBS=$gl_saved_libs
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 ])