Subject: bug#24974: CANNOT_DUMP build assumes Emacs is already installed

From: Daniel Colascione <[email-masked]>
Date: Wed, 30 Nov 2016 17:03:44 -0800

On Wed, Nov 30 2016, Glenn Morris wrote:
> How about:
>
> --- a/src/lread.c
> +++ b/src/lread.c
> @@ -4296,6 +4296,8 @@ BUFFER is the buffer to evaluate (nil means use current buffer),
>  #endif
>  
>    normal = PATH_LOADSEARCH;
> +  if (!NILP (Vinstallation_directory)) normal = PATH_DUMPLOADSEARCH;
> +
>  #ifdef HAVE_NS
>    lpath = decode_env_path (0, loadpath ? loadpath : normal, 0);
>  #else

I changed a lot of this code in my portable dumper patch.  The new code
works fine for me with CANNOT_DUMP uninstalled. We can split this change
(and the corresponding loadup.el changes) out from the rest of the patch
pretty easily, I think.