jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
902B

  1. dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
  2. dnl example
  3. dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
  4. dnl will set SYSCONFDIR to /usr/local/etc
  5. dnl written by thomas vander stichele
  6. AC_DEFUN([AS_AC_EXPAND],
  7. [
  8. EXP_VAR=[$1]
  9. FROM_VAR=[$2]
  10. dnl first expand prefix and exec_prefix if necessary
  11. prefix_save=$prefix
  12. if test "x$prefix" = "xNONE"; then
  13. prefix=/usr/local
  14. fi
  15. exec_prefix_save=$exec_prefix
  16. if test "x$exec_prefix" = "xNONE"; then
  17. if test "x$prefix_save" = "xNONE"; then
  18. exec_prefix=/usr/local
  19. else
  20. exec_prefix=$prefix
  21. fi
  22. fi
  23. full_var="$FROM_VAR"
  24. dnl loop until it doesn't change anymore
  25. while true; do
  26. new_full_var="`eval echo $full_var`"
  27. if test "x$new_full_var" = "x$full_var"; then break; fi
  28. full_var=$new_full_var
  29. done
  30. dnl clean up
  31. full_var=$new_full_var
  32. [$1]=$full_var
  33. prefix=$prefix_save
  34. exec_prefix=$exec_prefix_save
  35. ])