'auto tools can not find boost (macOS)

I'm new to the Mac world, I just get my first Mac (coming from linux).

I try to compile a (quite big) school project that uses boost library. I have a given compile script using autotools but when I run ./configure, it is not able to find boost headers:

checking for Boost headers version >= 1.61.0... no
configure: error: cannot find Boost headers version >= 1.61.0

I installed boost (v1.78.0) using brew, but nothing changed. I checked in /opt/homebrew/include and I have the boost folder with headers inside but the configure script seems not able to find them.

I think I miss some sort of environment variable or something but I can not find any information about that.

The part of the configure.ac referring to boost is like that:

## ----------- ##
## Libraries.  ##
## ----------- ##

BOOST_REQUIRE([1.61])
BOOST_CONVERSION # boost::lexical_cast
BOOST_GRAPH
BOOST_PROGRAM_OPTIONS
BOOST_STRING_ALGO
BOOST_SYSTEM


Solution 1:[1]

As pointed in the comment above, I found the trick: a BOOST_ROOT environment variable can be set to let configure know about boost location.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JM445