1dnl RA_FLUSHLEFT -- remove all whitespace at the beginning of lines 2dnl This is useful for c-code which may include cpp statements 3dnl 4define([RA_FLUSHLEFT], 5 [changequote(`,')dnl 6patsubst(`$1', `^[ ]+') 7changequote([,])])dnl 8 9dnl RA_RESULT_ACTIONS -- generate shell code for the result of a test 10dnl $1 -- CVAR -- cache variable to check 11dnl $2 -- NAME -- if not empty, used to generate a default value TRUE: 12dnl `AC_DEFINE(HAVE_NAME)' 13dnl $2 -- TRUE -- what to do if the CVAR is not `no' 14dnl $3 -- FALSE -- what to do otherwise; defaults to `:' 15dnl 16AC_DEFUN([RA_RESULT_ACTIONS], [ 17[if test "$$1" != "" -a "$$1" != no; then 18 ]ifelse([$3], , 19 [AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[,1,[FIXME])], 20 [$3])[ 21else 22 ]ifelse([$4], , [:], [$4])[ 23fi]])dnl 24 25dnl RA_CHECK_STRUCT_FIELD -- See if a structure has a particular field 26dnl $1 - NAME -- name of structure 27dnl $2 - FIELD -- name of field to test 28dnl $3 - INCLS -- C program text to inculde necessary files for testing 29dnl $4 - TRUE -- what to do if struct NAME has FIELD; defaults to 30dnl `AC_DEFINE(HAVE_NAME_FIELD)' 31dnl $5 - FALSE -- what to do if not; defaults to `:' 32dnl 33dnl NOTE: We still don't use AC_CHECK_MEMBERS, since it has (as of 34dnl autoconf 2.53) a bug which prevents it from recognizing members 35dnl of aggregate type. 36 37AC_DEFUN([RA_CHECK_STRUCT_FIELD], [ 38 define([ra_CVAR], [ra_cv_struct_]translit($1_$2, [A-Z], [a-z]))dnl 39 AC_CACHE_CHECK([whether struct $1 has $2 field], ra_CVAR, 40 AC_TRY_COMPILE(RA_FLUSHLEFT([$3]), 41 [struct $1 ra_x; int ra_y = sizeof ra_x.$2;], 42 ra_CVAR[=yes], ra_CVAR[=no])) 43 RA_RESULT_ACTIONS(ra_CVAR, [$1_$2], [$4], [$5])dnl 44 undefine([ra_CVAR])])dnl 45 46AC_SUBST(RADIUSD_LDADD_LIST) 47AC_DEFUN([RA_RADIUSD_LDADD], 48 RADIUSD_LDADD_LIST="$RADIUSD_LDADD_LIST [$1]") 49 50