Compilation - fltk - libraries

I would like to install opencv on qnx To install the demos, i’d like to first compile fltk-1.1.4 (given in readme file). Since the default paths for the compilation are not correct (/usr/local/lib /usr/local/include), i modified the paths in the environment (CFLAGS CPPFLAGS, LDFLAGS , as well as the arguments in the ./configure:

configure --bindir=/opt/bin --libdir=/opt/lib --includedir=/opt/include --prefix=/opt --oldincludedirs=/opt/include --x-includes=/opt/X11R6/include --x-libraries=/opt/X11R6/lib --with-x

Configure is ok, but when doing the “make”, an error occurs, and it seems that files of libpng library located in “/usr/include” are still called, whereas files in /opt directory should be used.
If someone has a clue about this compilation problem… Thx a lot!!!

the --includedir option is actually for installation purpose, meaning, after your successful compilation, you could do a “make install” and the headers of fltk package will be installed into /opt/include.
Same for --bindir, --libdir options.

In your case, you could try to put /opt/include in CFLAGS/CXXFLAGS and /opt/lib in LDFLAGS

eg: CFLAGS="-O -I/opt/include" CXXFLAGS="-O -I/opt/include" LDFALGS="-L/opt/lib" ./configure --prefix=…