0

I set both CPPFLAGS and LDFLAGS with ./configure, but the header fst.h is still not found. Though it is located in the indicated in the CPPFLAGS directory.

./configure CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include LDFLAGS=-L/Users/username/Downloads/openfst-1.5.1/src/lib

...

checking for stdint.h... yes
checking for unistd.h... yes
checking fst/fst.h usability... no
checking fst/fst.h presence... no
checking for fst/fst.h... no
configure: error: Required file fst/fst.h not found -- aborting

What am I missing?

user3241376
  • 407
  • 7
  • 20

1 Answers1

1

You don't actually set the CPPFLAGS environment variable which the configure script checks, but you pass CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include as an argument to the script. Same with LDFLAGS.

You should set them as an environment variables before the script, like

CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include LDFLAGS=-L/Users/username/Downloads/openfst-1.5.1/src/lib ./configure

Using line-continuation to make it easier to see all at once:

CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include \
LDFLAGS=-L/Users/username/Downloads/openfst-1.5.1/src/lib \
./configure
Some programmer dude
  • 400,186
  • 35
  • 402
  • 621