1AC_DEFUN([CMU_TEST_LIBPATH], [ 2changequote(<<, >>) 3define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>)) 4changequote([, ]) 5if test "$CMU_AC_CV_FOUND" = "yes"; then 6 if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then 7 CMU_AC_CV_FOUND=no 8 fi 9fi 10]) 11 12AC_DEFUN([CMU_TEST_INCPATH], [ 13changequote(<<, >>) 14define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p])) 15changequote([, ]) 16if test "$CMU_AC_CV_FOUND" = "yes"; then 17 if test \! -r "$1/$2.h"; then 18 CMU_AC_CV_FOUND=no 19 fi 20fi 21]) 22 23dnl CMU_CHECK_HEADER_NOCACHE(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 24AC_DEFUN([CMU_CHECK_HEADER_NOCACHE], 25[dnl Do the transliteration at runtime so arg 1 can be a shell variable. 26ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` 27AC_MSG_CHECKING([for $1]) 28AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", 29 eval "ac_cv_header_$ac_safe=no") 30if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 31 AC_MSG_RESULT(yes) 32 ifelse([$2], , :, [$2]) 33else 34 AC_MSG_RESULT(no) 35ifelse([$3], , , [$3 36])dnl 37fi 38]) 39 40AC_DEFUN([CMU_FIND_LIB_SUBDIR], 41[dnl 42AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib])) 43AC_CHECK_SIZEOF(long) 44AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir], 45[test "X$with_lib_subdir" = "Xyes" && with_lib_subdir= 46test "X$with_lib_subdir" = "Xno" && with_lib_subdir= 47if test "X$with_lib_subdir" = "X" ; then 48 ac_cv_cmu_lib_subdir=lib 49 if test $ac_cv_sizeof_long -eq 4 ; then 50 test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32 51 fi 52 if test $ac_cv_sizeof_long -eq 8 ; then 53 test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64 54 fi 55else 56 ac_cv_cmu_lib_subdir=$with_lib_subdir 57fi]) 58AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir) 59]) 60