CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/08/22 10:52:52
Modified files: . : ChangeLog configure.ac macros : boost.m4 Log message: * configure.ac: bail out if boost_thread is not set to yes. * macros/boost.m4: check for boost/thread.hpp. Should fix bug #20847. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4064&r2=1.4065 http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.403&r2=1.404 http://cvs.savannah.gnu.org/viewcvs/gnash/macros/boost.m4?cvsroot=gnash&r1=1.47&r2=1.48 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4064 retrieving revision 1.4065 diff -u -b -r1.4064 -r1.4065 --- ChangeLog 22 Aug 2007 05:55:09 -0000 1.4064 +++ ChangeLog 22 Aug 2007 10:52:51 -0000 1.4065 @@ -1,3 +1,9 @@ +2007-08-22 Sandro Santilli <[EMAIL PROTECTED]> + + * configure.ac: bail out if boost_thread is not set to yes. + * macros/boost.m4: check for boost/thread.hpp. Should fix + bug #20847. + 2007-08-22 Zou Lunkai <[EMAIL PROTECTED]> * testsuite/misc-ming.all/masks_test2.c, Index: configure.ac =================================================================== RCS file: /sources/gnash/gnash/configure.ac,v retrieving revision 1.403 retrieving revision 1.404 diff -u -b -r1.403 -r1.404 --- configure.ac 21 Aug 2007 15:18:36 -0000 1.403 +++ configure.ac 22 Aug 2007 10:52:51 -0000 1.404 @@ -15,7 +15,7 @@ dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA dnl -dnl $Id: configure.ac,v 1.403 2007/08/21 15:18:36 strk Exp $ +dnl $Id: configure.ac,v 1.404 2007/08/22 10:52:51 strk Exp $ AC_PREREQ(2.50) AC_INIT(gnash, cvs) @@ -1958,6 +1958,14 @@ fi # } if test x"$BOOST_LIBS" != x; then + + if test x"$boost_thread" != xyes; then + echo " ERROR: The BOOST thread package is needed to compile cygnal!" + echo " Install it from http://boost.org" + echo " or .deb users: apt-get install libboost-thread-dev" + nogo=true + fi + # Only cygnal requires date_time at present, so it's OK if either # you don't want cygnal or do have date_time installed. if test x"$cygnal" = xno -o x"$boost_date_time" = xyes; then @@ -1974,9 +1982,9 @@ else echo " ERROR: No BOOST development package installed!" echo " Install it from http://www.boost.org" - echo " or .deb users: apt-get install libboost-thread-dev" + echo " or .deb users: apt-get install libboost-dev libboost-thread-dev" if test x"$cygnal" = xyes; then - echo " and libboost-date-time-dev" + echo " and libboost-date-time-dev (for cygnal)" fi echo " or .rpm users: yum install boost-devel" nogo=true Index: macros/boost.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/boost.m4,v retrieving revision 1.47 retrieving revision 1.48 diff -u -b -r1.47 -r1.48 --- macros/boost.m4 1 Jul 2007 10:54:11 -0000 1.47 +++ macros/boost.m4 22 Aug 2007 10:52:52 -0000 1.48 @@ -14,7 +14,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -dnl $Id: boost.m4,v 1.47 2007/07/01 10:54:11 bjacques Exp $ +dnl $Id: boost.m4,v 1.48 2007/08/22 10:52:52 strk Exp $ dnl Boost modules are: dnl date-time, filesystem. graph. iostreams, program options, python, @@ -26,10 +26,10 @@ AC_ARG_WITH(boost_incl, AC_HELP_STRING([--with-boost-incl], [directory where boost headers are]), with_boost_incl=${withval}) AC_CACHE_VAL(ac_cv_path_boost_incl, [ if test x"${with_boost_incl}" != x ; then - if test -f ${with_boost_incl}/boost/detail/lightweight_mutex.hpp ; then + if test -f ${with_boost_incl}/boost/thread.hpp ; then ac_cv_path_boost_incl=-I`(cd ${with_boost_incl}; pwd)` else - AC_MSG_ERROR([${with_boost_incl} directory doesn't contain any headers]) + AC_MSG_ERROR([${with_boost_incl} directory doesn't contain boost/thread.hpp]) fi fi ]) @@ -49,16 +49,11 @@ gnash_boost_version="" for i in $incllist; do for j in `ls -dr $i/boost* 2>/dev/null`; do - if test -f ${j}/boost/detail/lightweight_mutex.hpp; then + if test -f ${j}/boost/detail/lightweight_mutex.hpp -a -f ${j}/boost/thread.hpp; then gnash_boost_topdir=`basename $j` ac_cv_path_boost_incl="-I${j}" break fi - if test -f ${j}/detail/lightweight_mutex.hpp; then - gnash_boost_topdir=`basename $j` - ac_cv_path_boost_incl="-I${i}" - break - fi done if test x$gnash_boost_topdir != x; then gnash_boost_version=`echo ${gnash_boost_topdir} | sed -e 's:boost-::'` @@ -68,17 +63,13 @@ fi if test x"${gnash_boost_version}" = x; then - AC_MSG_RESULT([no version needed]) + AC_MSG_RESULT([no version found/needed]) else AC_MSG_RESULT(${gnash_boost_version}) fi - if test x"${ac_cv_path_boost_incl}" = x ; then - AC_CHECK_HEADERS(boost/detail/lightweight_mutex.hpp, [ac_cv_path_boost_incl="-I/usr/include"]) - fi - - AC_MSG_CHECKING([for boost header]) - AC_MSG_RESULT(${ac_cv_path_boost_incl}) + dnl AC_MSG_CHECKING([for boost header]) + dnl AC_MSG_RESULT(${ac_cv_path_boost_incl}) dnl Look for the library AC_ARG_WITH(boost_lib, AC_HELP_STRING([--with-boost-lib], [directory where boost libraries are]), with_boost_lib=${withval}) @@ -88,9 +79,6 @@ fi ]) - AC_LANG_PUSH(C++) - save_LIBS="$LIBS" - dnl Specify the list of probable names. Boost creates 8 identical dnl libraries with different names. The prefered order is to always dnl use the one with -mt on it, because it's the thread safe @@ -144,18 +132,47 @@ done AC_MSG_RESULT(${ac_cv_path_boost_lib}) - dnl we don't want any boost libraries in LIBS, we prefer to keep it seperate. + BOOST_CFLAGS="$ac_cv_path_boost_incl" + BOOST_LIBS="$ac_cv_path_boost_lib" + + dnl --------------------------------------- + dnl Check actual usability of headers + dnl (if not cross-compiling) + dnl --------------------------------------- + + if test x${cross_compiling} = xno; then + AC_LANG_PUSH(C++) + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $BOOST_CFLAGS" + AC_CHECK_HEADERS([boost/thread.hpp], [], [boost_thread=no]) + CFLAGS="$save_CFLAGS" AC_LANG_POP(C++) - LIBS="$save_LIBS" + fi # if not cross-compiling - BOOST_CFLAGS="$ac_cv_path_boost_incl" - AC_SUBST(BOOST_CFLAGS) + dnl --------------------------------------- + dnl TODO: Check actual usability of libs + dnl --------------------------------------- + + if test x${cross_compiling} = xno; then + dnl Two problems: + dnl 1) knowing the name of the required libs + dnl (needs storing the name when finding it + dnl at the beginning of this macro) + dnl 2) check how to use AC_CHECK_LIB for C++ libs + : + fi # if not cross-compiling + + + dnl ------------------------------------------------------------------ + dnl Set HAVE_BOOST conditional, BOOST_CFLAGS and BOOST_LIBS variables + dnl ------------------------------------------------------------------ - BOOST_LIBS="$ac_cv_path_boost_lib" + AC_SUBST(BOOST_CFLAGS) AC_SUBST(BOOST_LIBS) # This isn't right: you don't need boot date-time installed unless u build # cygnal, and it is sometimes a separate package from Boost core and thread. + # TODO: why is this needed, lack of boost being a fatal error? AM_CONDITIONAL(HAVE_BOOST, [test x${boost_date_time} = xyes && test x${boost_thread} = xyes]) ]) _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit