The variable you're looking for is
Stuff this somewhere in your
(setq ispell-program-name "/path/to/ispell")
M-x set-variable, etc.
From the sources to
(or (locate-file "aspell" exec-path exec-suffixes 'file-executable-p)
(locate-file "ispell" exec-path exec-suffixes 'file-executable-p)
(locate-file "hunspell" exec-path exec-suffixes 'file-executable-p)
"Program invoked by \\[ispell-word] and \\[ispell-region] commands."
See also: http://emacswiki.org/emacs/InteractiveSpell
Whenever you can't find an Emacs function, remember
C-h f (or a variable:
C-h v). Entering
ispell at the
Describe function prompt tells you that
ispell is an interactive compiled Lisp function in 'ispell.el'., and from there you can usually find what you're looking for.