title: Compiling vim with statically linked python support in a non-standard path configuration
body: <p>I'm currently trying to compile <code>vim</code> on a Fedora 20 machine with a particularly exotic setup: </p>
  
  <ul>
  <li>No root access</li>
  <li><code>python2</code> and <code>python3</code> manually compiled and installed in <code>~/.local</code> correctly working (after exporting the <code>PATH</code> and <code>LD_LIBRARY_PATH</code>). </li>
  <li><code>zsh</code> as shell</li>
  <li><code>gcc</code> version <code>4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)</code></li>
  </ul>
  
  <p>If I configure the compiling process as:</p>
  
  <pre><code>./configure --with-features=huge --enable-pythoninterp --enable-python3interp --prefix=$HOME/.local
  </code></pre>
  
  <p>and then <code>make &amp;&amp; make install</code>, <code>vim</code> is correctly compiled with <code>+python/dyn +python3/dyn</code>.</p>
  
  <pre><code>vim --version | grep python
  +cryptv          +linebreak       +python/dyn      +vreplace
  +cscope          +lispindent      +python3/dyn     +wildignore
  </code></pre>
  
  <p>but, inside vim, <code>:echo has('python')</code> returns a <code>0</code> (and the <a href="https://github.com/Valloric/MatchTagAlways" rel="nofollow">MatchTagAlways</a> complains about that in facts...). </p>
  
  <p>So I told to myself, let's try to force the statically linked installation:</p>
  
  <pre><code>export LDFLAGS=-static
  ./configure --with-features=huge --enable-pythoninterp --enable-python3interp --prefix=$HOME/.local
  </code></pre>
  
  <p>ends just a little bit after the configuring command: </p>
  
  <pre><code>configure: creating cache auto/config.cache
  checking whether make sets $(MAKE)... yes
  checking for gcc... gcc
  checking whether the C compiler works... no
  configure: error: in `/students/rm_16_17/dibattista/build/vim/src':
  configure: error: C compiler cannot create executables
  See `config.log' for more details
  </code></pre>
  
  <p><a href="http://pastebin.com/fXBBtNsj" rel="nofollow">Here</a> the full <code>configure.log</code>. The relevant line should be: </p>
  
  <pre><code>configure:3027: gcc   -static conftest.c  &gt;&amp;5
  /usr/bin/ld: cannot find -lc
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>that I cannot really decrypt. It seems that <code>gcc</code> does not has the <code>-static</code> flag. Is that the issue?</p>