detect C++ flags and compile horus accordingly
This commit is contained in:
parent
9b0b6ec649
commit
4945e390f1
39
configure
vendored
39
configure
vendored
@ -4998,6 +4998,45 @@ else
|
|||||||
INSTALL_MATLAB=""
|
INSTALL_MATLAB=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ac_ext=cpp
|
||||||
|
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||||
|
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||||
|
|
||||||
|
my_save_cxxflags="$CXXFLAGS"
|
||||||
|
CXXFLAGS=-std=c++0x
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CXX supports -std-c++0x" >&5
|
||||||
|
$as_echo_n "checking whether CXX supports -std-c++0x... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
yap_cv_clpbn_bp=yes
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
CXXFLAGS="$my_save_cflags"
|
||||||
|
ac_ext=c
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
if test "$yap_cv_clpbn_bp" = no
|
if test "$yap_cv_clpbn_bp" = no
|
||||||
then
|
then
|
||||||
ENABLE_CLPBN_BP="@# "
|
ENABLE_CLPBN_BP="@# "
|
||||||
|
12
configure.in
12
configure.in
@ -501,6 +501,18 @@ else
|
|||||||
INSTALL_MATLAB=""
|
INSTALL_MATLAB=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_LANG_PUSH([C++])
|
||||||
|
my_save_cxxflags="$CXXFLAGS"
|
||||||
|
CXXFLAGS=-std=c++0x
|
||||||
|
AC_MSG_CHECKING([whether CXX supports -std-c++0x])
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||||
|
[AC_MSG_RESULT([yes])]
|
||||||
|
[yap_cv_clpbn_bp=yes],
|
||||||
|
[AC_MSG_RESULT([no])]
|
||||||
|
)
|
||||||
|
CXXFLAGS="$my_save_cflags"
|
||||||
|
AC_LANG_POP()
|
||||||
|
|
||||||
if test "$yap_cv_clpbn_bp" = no
|
if test "$yap_cv_clpbn_bp" = no
|
||||||
then
|
then
|
||||||
ENABLE_CLPBN_BP="@# "
|
ENABLE_CLPBN_BP="@# "
|
||||||
|
Reference in New Issue
Block a user