1dnl ###################################################################### 2dnl check if a map exists (if some library function exists). 3dnl Usage: AC_CHECK_MAP_FUNCS(<functions>..., <map>, [<mapsymbol>]) 4dnl Check if any of the functions <functions> exist. If any exist, then 5dnl define HAVE_MAP_<map>. If <mapsymbol> exits, then defined 6dnl HAVE_MAP_<mapsymbol> instead... 7AC_DEFUN([AMU_CHECK_MAP_FUNCS], 8[ 9# find what name to give to the map 10if test -n "$3" 11then 12 ac_map_name=$3 13else 14 ac_map_name=$2 15fi 16# store variable name of map 17ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 18ac_safe=HAVE_MAP_$ac_upcase_map_name 19# check for cache and set it if needed 20AMU_CACHE_CHECK_DYNAMIC(for $ac_map_name maps, 21ac_cv_map_$ac_map_name, 22[ 23# define to "no" by default 24eval "ac_cv_map_$ac_map_name=no" 25# and look to see if it was found 26AC_CHECK_FUNCS($1, 27[ 28 eval "ac_cv_map_$ac_map_name=yes" 29 break 30])]) 31# check if need to define variable 32if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes 33then 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" 39 then 40 AMD_INFO_OBJS="info_${ac_map_name}.o" 41 AC_SUBST(AMD_INFO_OBJS) 42 else 43 AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" 44 fi 45fi 46]) 47dnl ====================================================================== 48