Search for XEmacs package dir also under libdir?
Yes. But given the right prefix, this would be found automatically.
Unless we want to specify more specific preferred install points, as
in the old list:
${datadir}/${EMACS_FLAVOR}/site-lisp (Emacs)
${libdir}/${EMACS_FLAVOR}/site-lisp (Old Emacsen ?)
${libdir}/${EMACS_FLAVOR}/site-packages/lisp (XEmacs)
${datadir}/${EMACS_FLAVOR}/site-packages/lisp (Recent XEmacsen ?)
${prefix}/site-lisp (Windows Emacsen)
First match path variable to default locations, and only then go
through all?
Perhaps check for a previous installation first? In any case, I would
prefer a list of preferred places, since that would give a more
uniform client setup. If that fails, go through load-path and take
the first entry that matches some _simple_ well-chosen rule, say
$prefix/.*/site-lisp for Emacs and $prefix/.*/lisp for XEmacs.