ncurses: fix pic and opt flags (#12272)
ncurses: fix pic and opt flags (#12272)

Resolves #11932.

Move the PIC flags from CFLAGS on the configure line to the spack
compiler wrapper for ncurses.  The problem with the configure line for
autotools is that specifying CFLAGS sets the entire flags, thus
deleting the flags that configure would add itself.

By default, if CFLAGS is unspecified, then configure picks a sensible
default of `-g -O2`.  But adding `-fPIC` erases these and it ends up
building unoptimized.
LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,LLNL/spack