2
dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
3
dnl This file is free software, distributed under the terms of the GNU
4
dnl General Public License. As a special exception to the GNU General
5
dnl Public License, this file may be distributed as part of a program
6
dnl that contains a configuration script generated by Autoconf, under
7
dnl the same distribution terms as the rest of that program.
9
dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
14
[AC_REQUIRE([AC_PROG_CC])dnl
15
AC_CACHE_CHECK(for ELOOP, cl_cv_decl_eloop, [
16
if test $cross_compiling = no; then
17
cat > conftest.c <<EOF
26
int main () { printf("ELOOP\n"); exit(0); }
29
#define foo "conflink"
30
#define foobar "conflink/somefile"
32
{ /* If a system goes into an endless loop on this, it must be really broken. */
33
if (symlink(foo,foo)<0) exit(1);
34
if (unlink(foobar)>=0) { unlink(foo); exit(1); }
35
printf("%d\n",errno); unlink(foo); exit(0);
40
if test -x conftest; then
41
cl_cv_decl_ELOOP=`./conftest`
42
if test "$cl_cv_decl_ELOOP" = "ELOOP"; then
45
cl_cv_decl_eloop="$cl_cv_decl_ELOOP"
47
else cl_cv_decl_eloop=no
48
cl_cv_decl_ELOOP="ELOOP"
64
cl_cv_decl_ELOOP="ELOOP"
68
AC_DEFINE_UNQUOTED(ELOOP_VALUE,$cl_cv_decl_ELOOP,[the real value of ELOOP even if it is hidden in <errno.h>])