configure: error: leptonica library missing (when building tesseract-ocr-3.01 on MinGW)

I finally managed to make it compile, after reading this and this thread. The proper steps for were:

./autogen.sh
export LIBLEPT_HEADERSDIR=/local/include
./configure --with-extra-libraries=/local/lib
make install

for leptonica 1.69, lib renamed to .libs, so, parameters are

export LIBLEPT_HEADERSDIR=<your_path>/leptonica-1.69/src
./autogen.sh
./configure --prefix= --with-extra-libraries=<your_path>/leptonica-1.69/src/.libs

and so on


Maybe this could solve the issue:

export LIBLEPT_HEADERSDIR=/usr-or-other/local/include