diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.6pre17/config/ax_check_real_file.m4	Fri Jun 25 15:50:58 2010 +0200
@@ -0,0 +1,27 @@
+# AX_CHECK_REAL_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ------------------------------------------------------------------
+#
+# Check for the existence of FILE, and make sure it is a real file or
+# directory, and not a symbolic link.
+#
+AC_DEFUN([AX_CHECK_REAL_FILE],
+[AC_DIAGNOSE([cross],
+	     [cannot check for file existence when cross compiling])dnl
+AS_VAR_PUSHDEF([ac_RealFile], [ac_cv_real_file_$1])dnl
+AC_CACHE_CHECK([for $1], ac_RealFile,
+[test "$cross_compiling" = yes &&
+  AC_MSG_ERROR([cannot check for file existence when cross compiling])
+if test -r "$1"
+then
+  if test -h "$1"
+  then
+    AS_VAR_SET(ac_RealFile, no)
+  else
+    AS_VAR_SET(ac_RealFile, yes)
+  fi
+else
+  AS_VAR_SET(ac_RealFile, no)
+fi])
+AS_IF([test AS_VAR_GET(ac_RealFile) = yes], [$2], [$3])[]dnl
+AS_VAR_POPDEF([ac_RealFile])dnl
+])# AX_CHECK_REAL_FILE

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