X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Feuidaccess.m4;h=5066e62e0208971373f5ca84aa2dd2b63124c09a;hb=77e666785ee842df490daf6a4e51c4b0645431e5;hp=5882f5817c7879e7b12a6b60198887c55b2790b9;hpb=42d1eda5dcce2d68deab7a642e7f29bcd7144a0d;p=gnulib.git diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 index 5882f5817..5066e62e0 100644 --- a/m4/euidaccess.m4 +++ b/m4/euidaccess.m4 @@ -1,5 +1,5 @@ -# euidaccess.m4 serial 10 -dnl Copyright (C) 2002-2009 Free Software Foundation, Inc. +# euidaccess.m4 serial 13 +dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -22,15 +22,17 @@ AC_DEFUN([gl_FUNC_EUIDACCESS], dnl Persuade glibc to declare euidaccess(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_REPLACE_FUNCS([euidaccess]) + AC_CHECK_FUNCS([euidaccess]) if test $ac_cv_func_euidaccess = no; then HAVE_EUIDACCESS=0 - gl_PREREQ_EUIDACCESS fi ]) # Prerequisites of lib/euidaccess.c. AC_DEFUN([gl_PREREQ_EUIDACCESS], [ + dnl Prefer POSIX faccessat over non-standard euidaccess. + AC_CHECK_FUNCS_ONCE([faccessat]) + dnl Try various other non-standard fallbacks. AC_CHECK_HEADERS_ONCE([libgen.h]) AC_CHECK_DECLS_ONCE([setregid]) AC_REQUIRE([AC_FUNC_GETGROUPS]) @@ -39,11 +41,12 @@ AC_DEFUN([gl_PREREQ_EUIDACCESS], [ # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. + LIB_EACCESS= + AC_SUBST([LIB_EACCESS]) gl_saved_libs=$LIBS AC_SEARCH_LIBS([eaccess], [gen], [test "$ac_cv_search_eaccess" = "none required" || LIB_EACCESS=$ac_cv_search_eaccess]) - AC_SUBST([LIB_EACCESS]) AC_CHECK_FUNCS([eaccess]) LIBS=$gl_saved_libs ])