1dnl ###################################################################### 2dnl Run a program and print its output as a string 3dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]]) 4AC_DEFUN([AMU_EXPAND_RUN_STRING], 5[ 6value="notfound" 7AC_TRY_RUN( 8[ 9$1 10main(argc) 11int argc; 12{ 13$2 14exit(0); 15}], 16[ 17value=`./conftest dummy 2>>config.log` 18test -z "$value" && value="notfound" 19], value="notfound", value="notfound") 20if test "$value" = notfound 21then 22 : 23 $4 24else 25 : 26 $3 27fi 28]) 29dnl ====================================================================== 30