title: "No terminal library found error" during vim configure
body: <p>I tried to build Vim 7.4 in IBM AIX 6.1. When I run the configure script <code>./configure</code>  I am getting the following error</p>
  
  <pre><code>checking --with-tlib argument... empty: automatic terminal library selection
  checking for tgetent in -ltinfo... no
  checking for tgetent in -lncurses... no
  checking for tgetent in -ltermlib... no
  checking for tgetent in -ltermcap... no
  checking for tgetent in -lcurses... no
  no terminal library found
  checking for tgetent()... configure: error: NOT FOUND!
        You need to install a terminal library; for example ncurses.
        Or specify the name of the library with --with-tlib.
  </code></pre>
  
  <p>Inspecting the <code>config.info</code> I was able to see the following error</p>
  
  <pre><code>| int
  | main ()
  | {
  | char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
  |   ;
  |   return 0;
  | }
  configure:10492: error: NOT FOUND!
        You need to install a terminal library; for example ncurses.
        Or specify the name of the library with --with-tlib.
  </code></pre>
  
  <p>But the curses library (libcurses.a) is present in /usr/lib directory. Then I tried the following command <code>./configure --with-tlib=curses</code> and this time getting a different error as below</p>
  
  <pre><code>checking --with-tlib argument... curses
  checking for linking with curses library... configure: error: FAILED
  </code></pre>
  
  <p><code>config.info</code> error message was</p>
  
  <pre><code>| #include &lt;sys/types.h&gt;
  | #if STDC_HEADERS
  | # include &lt;stdlib.h&gt;
  | # include &lt;stddef.h&gt;
  | #endif
  | #include &lt;signal.h&gt;
  | #include "confdefs.h"
  |
  | int
  | main ()
  | {
  | stack_t sigstk; sigstk.ss_base = 0;
  |   ;
  |   return 0;
  | }
  configure:10339: result: no
  configure:10345: checking --with-tlib argument
  configure:10354: result: curses
  configure:10357: checking for linking with curses library
  configure:10370: gcc -o conftest -g -O2   conftest.c  -lcurses &gt;&amp;5
  collect2: /lib/libcurses.a: not a COFF file
  configure:10370: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  </code></pre>
  
  <p>What am I doing wrong and how can I do the build?</p>