Debian Codegraph @

cmulocal/common.m4

raw
1 dnl $Id: common.m4,v 1.10 2002/08/15 00:11:10 cg2v Exp $
2
3 AC_DEFUN(CMU_TEST_LIBPATH, [
4 changequote(<<, >>)
5 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
6 changequote([, ])
7 if test "$CMU_AC_CV_FOUND" = "yes"; then
8 if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl"; then
9 CMU_AC_CV_FOUND=no
10 fi
11 fi
12 ])
13
14 AC_DEFUN(CMU_TEST_INCPATH, [
15 changequote(<<, >>)
16 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p]))
17 changequote([, ])
18 if test "$CMU_AC_CV_FOUND" = "yes"; then
19 if test \! -r "$1/$2.h"; then
20 CMU_AC_CV_FOUND=no
21 fi
22 fi
23 ])
24
25 dnl CMU_CHECK_HEADER_NOCACHE(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
26 AC_DEFUN(CMU_CHECK_HEADER_NOCACHE,
27 [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
28 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
29 AC_MSG_CHECKING([for $1])
30 AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
31 eval "ac_cv_header_$ac_safe=no")
32 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
33 AC_MSG_RESULT(yes)
34 ifelse([$2], , :, [$2])
35 else
36 AC_MSG_RESULT(no)
37 ifelse([$3], , , [$3
38 ])dnl
39 fi
40 ])