Reputation: 161
I wrote a configure.ac to find the path of boost c++ inlclude, but it could not find anything. If I specify the path, it can compile. Could anyone help me please? Here is my configure.ac
AC_PREREQ([2.67])
AC_INIT(pkg, 1.1.01)
AC_PROG_CXX
AC_ARG_WITH(
[boost],
[AS_HELP_STRING(
[--with-boost=DIR],
[path to look for Boost])
],
[boostpath=$withval],
[boostpath=]
)
if test -n "$boostpath"; then
boostinc="-I$boostpath/include"
fi
CXXFLAGS="$CXXFLAGS ${boostinc}"
AC_SUBST([CXXFLAGS])
AC_CONFIG_FILES([Makevars])
AC_OUTPUT
Thanks a lot.
Upvotes: 1
Views: 2345
Reputation: 18667
Just use AX_BOOST_BASE
from the autoconf-archive.
If you're trying to AC_CHECK_HEADERS
to verify the existence of boost headers, remember that you need to AC_LANG_PUSH([C++])
first, or you'll get "header present but cannot be compiled" errors.
Upvotes: 3