+1998-09-26 Ben Elliston <bje@cygnus.com>
+
+ * acgeneral.m4 (AC_CHECK_FILE): New macro. Checks for the
+ existence of a file in the file system (native only).
+ Contributed by Theodore Y. Ts'o <tytso@mit.edu>.
+ (AC_CHECK_FILES): Likewise.
+
1998-09-15 Ben Elliston <bje@cygnus.com>
* config.guess: Handle strange processor ID assignments on AIX
])
+dnl ### Checking for the existence of files
+
+dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+AC_DEFUN(AC_CHECK_FILE,
+[AC_REQUIRE([AC_PROG_CC])
+dnl Do the transliteration at runtime so arg 1 can be a shell variable.
+ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(ac_cv_file_$ac_safe,
+[if test "$cross_compiling" = yes; then
+ errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
+)dnl
+ AC_MSG_ERROR(Cannot check for file existence when cross compiling)
+else
+ if test -r $1; then
+ eval "ac_cv_file_$ac_safe=yes"
+ else
+ eval "ac_cv_file_$ac_safe=no"
+ fi
+fi])dnl
+if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ifelse([$3], , , [$3])
+fi
+])
+
+dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+AC_DEFUN(AC_CHECK_FILES,
+[for ac_file in $1
+do
+AC_CHECK_FILE($ac_file,
+[changequote(, )dnl
+ ac_tr_file=HAVE`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+changequote([, ])dnl
+ AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
+done
+])
+
+
dnl ### Checking for library functions
])
+dnl ### Checking for the existence of files
+
+dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+AC_DEFUN(AC_CHECK_FILE,
+[AC_REQUIRE([AC_PROG_CC])
+dnl Do the transliteration at runtime so arg 1 can be a shell variable.
+ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(ac_cv_file_$ac_safe,
+[if test "$cross_compiling" = yes; then
+ errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
+)dnl
+ AC_MSG_ERROR(Cannot check for file existence when cross compiling)
+else
+ if test -r $1; then
+ eval "ac_cv_file_$ac_safe=yes"
+ else
+ eval "ac_cv_file_$ac_safe=no"
+ fi
+fi])dnl
+if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ifelse([$3], , , [$3])
+fi
+])
+
+dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+AC_DEFUN(AC_CHECK_FILES,
+[for ac_file in $1
+do
+AC_CHECK_FILE($ac_file,
+[changequote(, )dnl
+ ac_tr_file=HAVE`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+changequote([, ])dnl
+ AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
+done
+])
+
+
dnl ### Checking for library functions