Annotation of OpenXM_contrib/gnuplot/m4/search-hdr.m4, Revision 1.1
1.1 ! maekawa 1: ## --------------------------------------------- ##
! 2: ## Search several directories for header file. ##
! 3: ## Built around a non-caching and silent version ##
! 4: ## of AC_CHECK_HEADER. ##
! 5: ## From Lars Hecking ##
! 6: ## --------------------------------------------- ##
! 7:
! 8: # serial 1
! 9:
! 10: dnl gp_SEARCH_HEADERDIRS(HEADER-FILE [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
! 11: AC_DEFUN(gp_SEARCH_HEADERDIRS,
! 12: [AC_REQUIRE([gp_SEARCH_LIBDIRS])
! 13: AC_MSG_CHECKING([for $1])
! 14: ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
! 15: gp_save_CPPFLAGS="$CPPFLAGS"
! 16: for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do
! 17: CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`"
! 18: AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
! 19: eval "ac_cv_header_$ac_safe=no")
! 20: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
! 21: break
! 22: else
! 23: CPPFLAGS="${ac_save_CPPFLAGS}"
! 24: fi
! 25: done
! 26: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
! 27: AC_MSG_RESULT(yes)
! 28: ifelse([$2], , :, [$2])
! 29: else
! 30: AC_MSG_RESULT(no)
! 31: ifelse([$3], , , [$3
! 32: ])dnl
! 33: fi
! 34: ])
! 35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>