applied patch to detect boost libraries in make files as submitted in #148

This commit is contained in:
Arvid Norberg 2007-10-10 07:15:26 +00:00
parent 28113c9c42
commit ff5887e15e
5 changed files with 55 additions and 15 deletions

View File

@ -35,10 +35,18 @@ if test "$ax_cv_boost_date_time" = yes; then
ax_date_time_lib=$with_boost_date_time
ax_boost_date_time_lib=boost_date_time-$with_boost_date_time
fi])
for ax_lib in $ax_date_time_lib $ax_boost_date_time_lib boost_date_time; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB=$ax_lib
break])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ax_lib in $ax_date_time_lib $ax_boost_date_time_lib boost_date_time-mt boost_date_time; do
ax_save_LIBS="$LIBS"
LIBS="$LIBS -l$ax_lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[return 0;]])],
[BOOST_DATE_TIME_LIB=$ax_lib
break])
LIBS="$ax_save_LIBS"
done
AC_LANG_RESTORE
AC_SUBST(BOOST_DATE_TIME_LIB)
fi
])dnl

View File

@ -37,10 +37,18 @@ if test "$ax_cv_boost_filesystem" = yes; then
ax_filesystem_lib=$with_boost_filesystem
ax_boost_filesystem_lib=boost_filesystem-$with_boost_filesystem
fi])
for ax_lib in $ax_filesystem_lib $ax_boost_filesystem_lib boost_filesystem; do
AC_CHECK_LIB($ax_lib, main, [BOOST_FILESYSTEM_LIB=$ax_lib
break])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ax_lib in $ax_filesystem_lib $ax_boost_filesystem_lib boost_filesystem-mt boost_filesystem; do
ax_save_LIBS="$LIBS"
LIBS="$LIBS -l$ax_lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/filesystem/path.hpp>]],
[[return 0;]])],
[BOOST_FILESYSTEM_LIB=$ax_lib
break])
LIBS="$ax_save_LIBS"
done
AC_LANG_RESTORE
AC_SUBST(BOOST_FILESYSTEM_LIB)
fi
])dnl

View File

@ -33,10 +33,18 @@ if test "$ax_cv_boost_program_options" = yes; then
ax_program_options_lib=$with_boost_program_options
ax_boost_program_options_lib=boost_program_options-$with_boost_program_options
fi])
for ax_lib in $ax_program_options_lib $ax_boost_program_options_lib boost_program_options; do
AC_CHECK_LIB($ax_lib, main, [BOOST_PROGRAM_OPTIONS_LIB=$ax_lib
break])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ax_lib in $ax_program_options_lib $ax_boost_program_options_lib boost_program_options-mt boost_program_options; do
ax_save_LIBS="$LIBS"
LIBS="$LIBS -l$ax_lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/program_options.hpp>]],
[[return 0;]])],
[BOOST_PROGRAM_OPTIONS_LIB=$ax_lib
break])
LIBS="$ax_save_LIBS"
done
AC_LANG_RESTORE
AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
fi
])dnl

View File

@ -33,10 +33,18 @@ if test "$ax_cv_boost_regex" = yes; then
ax_regex_lib=$with_boost_regex
ax_boost_regex_lib=boost_regex-$with_boost_regex
fi])
for ax_lib in $ax_regex_lib $ax_boost_regex_lib boost_regex; do
AC_CHECK_LIB($ax_lib, main, [BOOST_REGEX_LIB=$ax_lib
break])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ax_lib in $ax_regex_lib $ax_boost_regex_lib boost_regex-mt boost_regex; do
ax_save_LIBS="$LIBS"
LIBS="$LIBS -l$ax_lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/regex.hpp>]],
[[return 0;]])],
[BOOST_REGEX_LIB=$ax_lib
break])
LIBS="$ax_save_LIBS"
done
AC_LANG_RESTORE
AC_SUBST(BOOST_REGEX_LIB)
fi
])dnl

View File

@ -40,10 +40,18 @@ if test "$ax_cv_boost_thread" = yes; then
ax_thread_lib=$with_boost_thread
ax_boost_thread_lib=boost_thread-$with_boost_thread
fi])
for ax_lib in $ax_thread_lib $ax_boost_thread_lib boost_thread; do
AC_CHECK_LIB($ax_lib, main, [BOOST_THREAD_LIB=$ax_lib
break])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
for ax_lib in $ax_thread_lib $ax_boost_thread_lib boost_thread-mt boost_thread; do
ax_save_LIBS="$LIBS"
LIBS="$LIBS -l$ax_lib"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/thread/thread.hpp>]],
[[return 0;]])],
[BOOST_THREAD_LIB=$ax_lib
break])
LIBS="$ax_save_LIBS"
done
AC_LANG_RESTORE
AC_SUBST(BOOST_THREAD_LIB)
fi
])dnl