Skip to content

Commit

Permalink
Fixes for metaphysicl configure.
Browse files Browse the repository at this point in the history
This commit was created by running:
git cherry-pick f2fb9fc f1a0aba c3c1ff7 8a89159 ae730e7
and squashing.

* Comment out broken code in vexcl case too
  I really need to figure out if it's possible to fix
  roystgnr/MetaPhysicL#4 in a
  C++-standards-compatible way or if APIs need to be redone entirely.
* Avoid "set but not used" warnings w/o MASA
* boost.m4 shouldn't die on link failures
  This incorporates the PR tsuna/boost.m4#86 so
  that we can recover on systems where headers are found but libraries
  are not.
* Double-check VexCL has all Boost prereqs
  Just because we have one Boost header doesn't mean we have every
  header and library we need.
* Re-bootstrap

Refs #1593.
  • Loading branch information
roystgnr authored and jwpeterson committed Mar 8, 2018
1 parent 31978ab commit e614ab0
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 55 deletions.
124 changes: 76 additions & 48 deletions contrib/metaphysicl/0.2.0/configure
Expand Up @@ -22300,6 +22300,7 @@ fi

found_boost=yes
# Chrono introduced in 1.47

# Do we have to check for Boost.System? This link-time dependency was
# added as of 1.35.0. If we have a version <1.35, we must not attempt to
# find Boost.System as it didn't exist by then.
Expand Down Expand Up @@ -22570,16 +22571,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_system" >&5
$as_echo "$boost_cv_lib_system" >&6; }
case $boost_cv_lib_system in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost system" "$LINENO" 5

$as_echo "#define HAVE_BOOST_SYSTEM 1" >>confdefs.h
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
;;
esac
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand Down Expand Up @@ -22861,16 +22863,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_chrono" >&5
$as_echo "$boost_cv_lib_chrono" >&6; }
case $boost_cv_lib_chrono in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost chrono" "$LINENO" 5

$as_echo "#define HAVE_BOOST_CHRONO 1" >>confdefs.h
BOOST_CHRONO_LDFLAGS=$boost_cv_lib_chrono_LDFLAGS
BOOST_CHRONO_LDPATH=$boost_cv_lib_chrono_LDPATH
BOOST_LDPATH=$boost_cv_lib_chrono_LDPATH
BOOST_CHRONO_LIBS=$boost_cv_lib_chrono_LIBS
;;
esac
BOOST_CHRONO_LDFLAGS=$boost_cv_lib_chrono_LDFLAGS
BOOST_CHRONO_LDPATH=$boost_cv_lib_chrono_LDPATH
BOOST_LDPATH=$boost_cv_lib_chrono_LDPATH
BOOST_CHRONO_LIBS=$boost_cv_lib_chrono_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand All @@ -22886,6 +22889,10 @@ LIBS=$boost_filesystem_save_LIBS
LDFLAGS=$boost_filesystem_save_LDFLAGS


if test "x$boost_cv_lib_chrono" != xyes; then
found_boost=no
fi

if test x"$boost_cv_inc_path" = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost date_time library" >&5
$as_echo "$as_me: Boost not available, not searching for the Boost date_time library" >&6;}
Expand Down Expand Up @@ -23152,16 +23159,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_date_time" >&5
$as_echo "$boost_cv_lib_date_time" >&6; }
case $boost_cv_lib_date_time in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost date_time" "$LINENO" 5

$as_echo "#define HAVE_BOOST_DATE_TIME 1" >>confdefs.h
BOOST_DATE_TIME_LDFLAGS=$boost_cv_lib_date_time_LDFLAGS
BOOST_DATE_TIME_LDPATH=$boost_cv_lib_date_time_LDPATH
BOOST_LDPATH=$boost_cv_lib_date_time_LDPATH
BOOST_DATE_TIME_LIBS=$boost_cv_lib_date_time_LIBS
;;
esac
BOOST_DATE_TIME_LDFLAGS=$boost_cv_lib_date_time_LDFLAGS
BOOST_DATE_TIME_LDPATH=$boost_cv_lib_date_time_LDPATH
BOOST_LDPATH=$boost_cv_lib_date_time_LDPATH
BOOST_DATE_TIME_LIBS=$boost_cv_lib_date_time_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand All @@ -23172,6 +23180,10 @@ fi



if test "x$boost_cv_lib_date_time" != xyes; then
found_boost=no
fi

# Do we have to check for Boost.System? This link-time dependency was
# added as of 1.35.0. If we have a version <1.35, we must not attempt to
# find Boost.System as it didn't exist by then.
Expand Down Expand Up @@ -23442,16 +23454,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_system" >&5
$as_echo "$boost_cv_lib_system" >&6; }
case $boost_cv_lib_system in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost system" "$LINENO" 5

$as_echo "#define HAVE_BOOST_SYSTEM 1" >>confdefs.h
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
;;
esac
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand Down Expand Up @@ -23733,16 +23746,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_filesystem" >&5
$as_echo "$boost_cv_lib_filesystem" >&6; }
case $boost_cv_lib_filesystem in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost filesystem" "$LINENO" 5

$as_echo "#define HAVE_BOOST_FILESYSTEM 1" >>confdefs.h
BOOST_FILESYSTEM_LDFLAGS=$boost_cv_lib_filesystem_LDFLAGS
BOOST_FILESYSTEM_LDPATH=$boost_cv_lib_filesystem_LDPATH
BOOST_LDPATH=$boost_cv_lib_filesystem_LDPATH
BOOST_FILESYSTEM_LIBS=$boost_cv_lib_filesystem_LIBS
;;
esac
BOOST_FILESYSTEM_LDFLAGS=$boost_cv_lib_filesystem_LDFLAGS
BOOST_FILESYSTEM_LDPATH=$boost_cv_lib_filesystem_LDPATH
BOOST_LDPATH=$boost_cv_lib_filesystem_LDPATH
BOOST_FILESYSTEM_LIBS=$boost_cv_lib_filesystem_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand All @@ -23758,6 +23772,10 @@ LIBS=$boost_filesystem_save_LIBS
LDFLAGS=$boost_filesystem_save_LDFLAGS


if test "x$boost_cv_lib_filesystem" != xyes; then
found_boost=no
fi

if test x"$boost_cv_inc_path" = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost system library" >&5
$as_echo "$as_me: Boost not available, not searching for the Boost system library" >&6;}
Expand Down Expand Up @@ -24024,16 +24042,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_system" >&5
$as_echo "$boost_cv_lib_system" >&6; }
case $boost_cv_lib_system in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost system" "$LINENO" 5

$as_echo "#define HAVE_BOOST_SYSTEM 1" >>confdefs.h
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
;;
esac
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand All @@ -24044,6 +24063,10 @@ fi



if test "x$boost_cv_lib_system" != xyes; then
found_boost=no
fi

boost_thread_save_LIBS=$LIBS
boost_thread_save_LDFLAGS=$LDFLAGS
boost_thread_save_CPPFLAGS=$CPPFLAGS
Expand Down Expand Up @@ -24315,16 +24338,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_system" >&5
$as_echo "$boost_cv_lib_system" >&6; }
case $boost_cv_lib_system in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost system" "$LINENO" 5

$as_echo "#define HAVE_BOOST_SYSTEM 1" >>confdefs.h
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
;;
esac
BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS
BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_LDPATH=$boost_cv_lib_system_LDPATH
BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand Down Expand Up @@ -24616,16 +24640,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_thread" >&5
$as_echo "$boost_cv_lib_thread" >&6; }
case $boost_cv_lib_thread in #(
(no) $as_echo "$as_me: failed program was:" >&5
(yes) $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

as_fn_error $? "cannot find the flags to link with Boost thread" "$LINENO" 5

$as_echo "#define HAVE_BOOST_THREAD 1" >>confdefs.h
BOOST_THREAD_LDFLAGS=$boost_cv_lib_thread_LDFLAGS
BOOST_THREAD_LDPATH=$boost_cv_lib_thread_LDPATH
BOOST_LDPATH=$boost_cv_lib_thread_LDPATH
BOOST_THREAD_LIBS=$boost_cv_lib_thread_LIBS
;;
esac
BOOST_THREAD_LDFLAGS=$boost_cv_lib_thread_LDFLAGS
BOOST_THREAD_LDPATH=$boost_cv_lib_thread_LDPATH
BOOST_LDPATH=$boost_cv_lib_thread_LDPATH
BOOST_THREAD_LIBS=$boost_cv_lib_thread_LIBS
CPPFLAGS=$boost_save_CPPFLAGS
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand All @@ -24647,6 +24672,9 @@ LDFLAGS=$boost_thread_save_LDFLAGS
CPPFLAGS=$boost_thread_save_CPPFLAGS


if test "x$boost_cv_lib_threads" != xyes; then
found_boost=no
fi

# Make sure we have OpenCL support

Expand Down
12 changes: 6 additions & 6 deletions contrib/metaphysicl/0.2.0/m4/common/boost.m4
Expand Up @@ -329,14 +329,14 @@ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib],
[_BOOST_FIND_LIBS($@)])
case $Boost_lib in #(
(no) _AC_MSG_LOG_CONFTEST
AC_MSG_ERROR([cannot find the flags to link with Boost $1])
(yes) _AC_MSG_LOG_CONFTEST
AC_DEFINE(AS_TR_CPP([HAVE_BOOST_$1]), [1], [Defined if the Boost $1 library is available])dnl
AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
;;
esac
AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
CPPFLAGS=$boost_save_CPPFLAGS
AS_VAR_POPDEF([Boost_lib])dnl
AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl
Expand Down
20 changes: 20 additions & 0 deletions contrib/metaphysicl/0.2.0/m4/common/vexcl.m4
Expand Up @@ -84,11 +84,31 @@ if test "${with_vexcl}" != no ; then
found_boost=yes
BOOST_REQUIRE([1.47],[found_boost=no]) # Chrono introduced in 1.47
BOOST_CHRONO
if test "x$boost_cv_lib_chrono" != xyes; then
found_boost=no
fi
BOOST_DATE_TIME
if test "x$boost_cv_lib_date_time" != xyes; then
found_boost=no
fi
BOOST_FILESYSTEM
if test "x$boost_cv_lib_filesystem" != xyes; then
found_boost=no
fi
BOOST_SYSTEM
if test "x$boost_cv_lib_system" != xyes; then
found_boost=no
fi
BOOST_THREADS
if test "x$boost_cv_lib_threads" != xyes; then
found_boost=no
fi
# Make sure we have OpenCL support
AX_CHECK_CL([C++])
Expand Down
15 changes: 15 additions & 0 deletions contrib/metaphysicl/0.2.0/metaphysicl_config.h.tmp.in
Expand Up @@ -21,18 +21,33 @@
/* Defined if the requested minimum BOOST version is satisfied */
#undef HAVE_BOOST

/* Defined if the Boost chrono library is available */
#undef HAVE_BOOST_CHRONO

/* Define to 1 if you have <boost/chrono.hpp> */
#undef HAVE_BOOST_CHRONO_HPP

/* Defined if the Boost date_time library is available */
#undef HAVE_BOOST_DATE_TIME

/* Define to 1 if you have <boost/date_time/posix_time/posix_time.hpp> */
#undef HAVE_BOOST_DATE_TIME_POSIX_TIME_POSIX_TIME_HPP

/* Defined if the Boost filesystem library is available */
#undef HAVE_BOOST_FILESYSTEM

/* Define to 1 if you have <boost/filesystem/path.hpp> */
#undef HAVE_BOOST_FILESYSTEM_PATH_HPP

/* Defined if the Boost system library is available */
#undef HAVE_BOOST_SYSTEM

/* Define to 1 if you have <boost/system/error_code.hpp> */
#undef HAVE_BOOST_SYSTEM_ERROR_CODE_HPP

/* Defined if the Boost thread library is available */
#undef HAVE_BOOST_THREAD

/* Define to 1 if you have <boost/thread.hpp> */
#undef HAVE_BOOST_THREAD_HPP

Expand Down

0 comments on commit e614ab0

Please sign in to comment.