All, Anybody knows of autoconf macros that would test for the presence of graph related stuff? I could not find any in boost itself and the ones on the Web are not specific to BGL. Cheers, Fred
On 4/19/06, Fred Labrosse
All,
Anybody knows of autoconf macros that would test for the presence of graph
autoconf means the tool in autotools ?
related stuff? I could not find any in boost itself and the ones on the Web are not specific to BGL.
If I understand your question, try this : AC_CHECK_HEADER([boost/graph/adjacency_list.hpp], [], [AC_MSG_FAILURE([Boost headers missing.])]) and repeat for each boost header used in your project.
Cheers,
Regards, -- Johan
On Wednesday 19 Apr 2006 21:37, Johan Oudinet wrote:
On 4/19/06, Fred Labrosse
wrote: All,
Anybody knows of autoconf macros that would test for the presence of graph
autoconf means the tool in autotools ?
Yes, sorry.
related stuff? I could not find any in boost itself and the ones on the Web are not specific to BGL.
If I understand your question, try this : AC_CHECK_HEADER([boost/graph/adjacency_list.hpp], [], [AC_MSG_FAILURE([Boost headers missing.])])
and repeat for each boost header used in your project.
I tried that and it came up with loads of errors because autotools now try to compile a program including the file and the compilation failed because, I think, it did it with gcc rather than g++. I have this in configure.ac: AC_CHECK_HEADER([boost/graph/adjacency_list.hpp], [], AC_MSG_ERROR([Boost Graph Library (BGL) is needed])) and config.log contains: configure:6013: checking boost/graph/adjacency_list.hpp usability configure:6025: gcc -c -g -O2 -Wall -I/home/ffl/local/include -I/usr/include/libpng12 -I/usr/local/include/player-2.0 conftest.c >&5 In file included from /usr/include/boost/config.hpp:40, from /usr/include/boost/graph/adjacency_list.hpp:14, from conftest.c:58: /usr/include/boost/config/select_stdlib_config.hpp:20:19: utility: No such file or directory In file included from /usr/include/boost/config.hpp:53, from /usr/include/boost/graph/adjacency_list.hpp:14, from conftest.c:58: /usr/include/boost/config/platform/linux.hpp:14:19: cstdlib: No such file or directory and so on... But while writing this, I just discovered: AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CHECK_HEADER([boost/graph/adjacency_list.hpp], [], AC_MSG_ERROR([Boost Graph Library (BGL) is needed])) AC_LANG_RESTORE which does it. Thanks, and sorry for wasting time. I just hope this will be useful to somebody. Cheers, Fred
participants (2)
-
Fred Labrosse
-
Johan Oudinet