I am using autoconf and automake for a C++ project, and I expect that g++ will be smart enough to look at /usr/include/<library-name>
when my source code already have
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <curl/curl.h>
#include <openssl/md5.h>
When I just run ./configure && make
, I get this error
g++ -DHAVE_CONFIG_H -I. -I.. -Wall -O2 -g -O2 -MT azurefs.o -MD -MP -MF .deps/azurefs.Tpo -c -o azurefs.o azurefs.cpp
azurefs.cpp:33:26: fatal error: libxml/xpath.h: No such file or directory
compilation terminated
I have to include the library path using CCXXFLAGS
this way
$ CXXFLAGS=-I/usr/include/libxml2 ./configure && make
Is there a better way to write my code, Makefile or autoconf files so that g++ will look for the libraries correctly in /usr/include/<library-name>
?