comparison acx_include_dirs.m4 @ 5505:17682e3fba2a

[project @ 2005-10-21 12:30:29 by jwe]
author jwe
date Fri, 21 Oct 2005 12:30:29 +0000
parents ed08548b9054
children
comparison
equal deleted inserted replaced
5504:d0a24bfe4487 5505:17682e3fba2a
4 dnl This macro looks for a header file in the include directories 4 dnl This macro looks for a header file in the include directories
5 dnl and in the sub-directories specified by DIR-LIST. 5 dnl and in the sub-directories specified by DIR-LIST.
6 dnl 6 dnl
7 dnl This macro requires autoconf 2.50 or later. 7 dnl This macro requires autoconf 2.50 or later.
8 dnl 8 dnl
9 dnl @version $Id: acx_include_dirs.m4,v 1.2 2005-09-15 19:52:50 jwe Exp $ 9 dnl @version $Id: acx_include_dirs.m4,v 1.3 2005-10-21 12:30:29 jwe Exp $
10 dnl @author David Bateman <dbateman@free.fr> 10 dnl @author David Bateman <dbateman@free.fr>
11 dnl 11 dnl
12 AC_DEFUN([ACX_CHECK_HEADER_IN_DIRS], [ 12 AC_DEFUN([ACX_CHECK_HEADER_IN_DIRS], [
13 AC_PREREQ(2.50) 13 AC_PREREQ(2.50)
14 acx_include_ok=no 14 acx_include_ok=no
24 done 24 done
25 fi 25 fi
26 26
27 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: 27 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
28 if test x"$acx_include_ok" = xyes; then 28 if test x"$acx_include_ok" = xyes; then
29 acx_header=HEADER_`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ 29 acx_header=HEADER_`echo $1 | sed -e 's/[[^a-zA-Z0-9_]]/_/g' \
30 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 30 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
31 ifelse([$3],,AC_DEFINE(${acx_header},$acx_include_dir/$1,[$5]),[$3]) 31 acx_header_name_for_variable=`echo $1 | sed -e 's/[[^a-zA-Z0-9_]]/_/g'`
32 eval acx_${acx_header_name_for_variable}_include_dir=$acx_include_dir
33 if test -n "$acx_include_dir"; then
34 eval acx_${acx_header_name_for_variable}_include_file=$acx_include_dir/$1
35 else
36 eval acx_${acx_header_name_for_variable}_include_file=$1
37 fi
38 ifelse([$3],,AC_DEFINE(${acx_header},
39 [`eval echo '${'acx_${acx_header_name_for_variable}_include_file'}'`/$1],
40 [$5]),[$3])
41 ifelse([$4],,,[
32 else 42 else
33 $4 43 $4
44 ])
34 fi 45 fi
35 ])dnl ACX_CHECK_HEADER_IN_DIRS 46 ])dnl ACX_CHECK_HEADER_IN_DIRS