1 dnl ######################################################################
2 dnl check if a map exists (if some library function exists).
3 dnl Usage: AC_CHECK_MAP_FUNCS(<functions>..., <map>, [<mapsymbol>])
4 dnl Check if any of the functions <functions> exist. If any exist, then
5 dnl define HAVE_MAP_<map>. If <mapsymbol> exits, then defined
6 dnl HAVE_MAP_<mapsymbol> instead...
7 AC_DEFUN([AMU_CHECK_MAP_FUNCS],
9 # find what name to give to the map
16 # store variable name of map
17 ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
18 ac_safe=HAVE_MAP_$ac_upcase_map_name
19 # check for cache and set it if needed
20 AMU_CACHE_CHECK_DYNAMIC(for $ac_map_name maps,
21 ac_cv_map_$ac_map_name,
23 # define to "no" by default
24 eval "ac_cv_map_$ac_map_name=no"
25 # and look to see if it was found
28 eval "ac_cv_map_$ac_map_name=yes"
31 # check if need to define variable
32 if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes
34 AC_DEFINE_UNQUOTED($ac_safe)
35 # append info_<map>.o object to AMD_INFO_OBJS for automatic compilation
36 # if first time we add something to this list, then also tell autoconf
37 # to replace instances of it in Makefiles.
38 if test -z "$AMD_INFO_OBJS"
40 AMD_INFO_OBJS="info_${ac_map_name}.o"
41 AC_SUBST(AMD_INFO_OBJS)
43 AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o"
47 dnl ======================================================================