comparison spandsp-0.0.6pre17/config/ax_check_real_file.m4 @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 # AX_CHECK_REAL_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2 # ------------------------------------------------------------------
3 #
4 # Check for the existence of FILE, and make sure it is a real file or
5 # directory, and not a symbolic link.
6 #
7 AC_DEFUN([AX_CHECK_REAL_FILE],
8 [AC_DIAGNOSE([cross],
9 [cannot check for file existence when cross compiling])dnl
10 AS_VAR_PUSHDEF([ac_RealFile], [ac_cv_real_file_$1])dnl
11 AC_CACHE_CHECK([for $1], ac_RealFile,
12 [test "$cross_compiling" = yes &&
13 AC_MSG_ERROR([cannot check for file existence when cross compiling])
14 if test -r "$1"
15 then
16 if test -h "$1"
17 then
18 AS_VAR_SET(ac_RealFile, no)
19 else
20 AS_VAR_SET(ac_RealFile, yes)
21 fi
22 else
23 AS_VAR_SET(ac_RealFile, no)
24 fi])
25 AS_IF([test AS_VAR_GET(ac_RealFile) = yes], [$2], [$3])[]dnl
26 AS_VAR_POPDEF([ac_RealFile])dnl
27 ])# AX_CHECK_REAL_FILE

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.