From: Oliver O. <fr...@us...> - 2006-03-08 17:08:03
|
Update of /cvsroot/simspark/simspark/spark In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2630 Modified Files: acinclude.m4 Log Message: - changed the DevIL check so that kerosin can be built with no DevIL. If the DevIL headers are found, but libIL is not, we still throw an error. A Metavariable IL_LIBADD is defined for use in the Makefiles (for linking libIL if present) - changed messages and orderings in the SPADES checks - fixed comments to match the actual code Index: acinclude.m4 =================================================================== RCS file: /cvsroot/simspark/simspark/spark/acinclude.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** acinclude.m4 8 Mar 2006 09:22:42 -0000 1.3 --- acinclude.m4 8 Mar 2006 17:07:54 -0000 1.4 *************** *** 190,195 **** # if rcss_build_kerosin is (still) set to 'yes', check for the DEVIL # headers and libraries. ! # If DEVIL headers or libraries can not be found, building kerosin will ! # be disabled. #----------------------------------------------------------------------------- AC_DEFUN([RCSS_CHECK_DEVIL], [ --- 190,199 ---- # if rcss_build_kerosin is (still) set to 'yes', check for the DEVIL # headers and libraries. ! # If DEVIL headers can not be found, kerosin will be built with no image ! # loading/saving support. ! # If the headers can be found, but the library is not there, we stop ! # with an error. ! # Substitutes: @IL_LIBADD@ the flags for linking with libIL ! # Defines: HAVE_IL_IL_H if the IL/il.h header file is present #----------------------------------------------------------------------------- AC_DEFUN([RCSS_CHECK_DEVIL], [ *************** *** 200,218 **** fi RCSS_KEROSIN_IF_ELSE([ ! AC_CHECK_HEADERS([IL/il.h],, ! RCSS_BUILD_KEROSIN_ERROR([DevIL headers not found. ! Please set CPPFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)])) ]) ! RCSS_KEROSIN_IF_ELSE([ ! rcss_tmp="$LDFLAGS" ! LDFLAGS="$LDFLAGS -lIL" ! AC_LINK_IFELSE([#include <IL/il.h> #include <stdarg.h> /* _vsnprintf may be undefined (and it is needed by libIL) */ extern "C" int _vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0;} int main() { ilInit(); return 0; }],, ! RCSS_BUILD_KEROSIN_ERROR([The DevIL library (libIL.a or libIL.so) cannot be found. ! Please set LDFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)])) ! LDFLAGS="$rcss_tmp" ! ]) ]) # RCSS_CHECK_DEVIL --- 204,229 ---- fi RCSS_KEROSIN_IF_ELSE([ ! AC_CHECK_HEADERS([IL/il.h],rcss_tmp="yes", ! [rcss_tmp="no" ! AC_MSG_WARN([DevIL headers not found. Loading/Saving images will not be supported]) ! AC_MSG_WARN([To enable image support, please set CPPFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)])]) ]) ! if test "$rcss_tmp" = "no"; then ! IL_LIBADD="" ! else ! IL_LIBADD="-lIL" ! RCSS_KEROSIN_IF_ELSE([rcss_tmp="$LDFLAGS" ! LDFLAGS="$LDFLAGS -lIL" ! AC_LINK_IFELSE([#include <IL/il.h> #include <stdarg.h> /* _vsnprintf may be undefined (and it is needed by libIL) */ extern "C" int _vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0;} int main() { ilInit(); return 0; }],, ! [RCSS_BUILD_KEROSIN_ERROR([The DevIL headers are present but the library (libIL.a or libIL.so) cannot be found.]) ! RCSS_BUILD_KEROSIN_ERROR([Please set LDFLAGS appropriately. Alternatively you can specify the location ]) ! RCSS_BUILD_KEROSIN_ERROR([of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)])]) ! LDFLAGS="$rcss_tmp" ! ]) ! fi ! AC_SUBST(IL_LIBADD) ]) # RCSS_CHECK_DEVIL *************** *** 320,328 **** RCSS_BUILD_KEROSIN_INTERNAL fi - AM_CONDITIONAL(BUILD_KEROSIN, test x$rcss_build_kerosin = xyes) if test "$rcss_build_kerosin" = no; then AC_MSG_NOTICE([libkerosin will not be build...]) AC_MSG_NOTICE([...you can enable it using the --enable-kerosin flag]) fi ]) # RCSS_BUILD_KEROSIN --- 331,339 ---- RCSS_BUILD_KEROSIN_INTERNAL fi if test "$rcss_build_kerosin" = no; then AC_MSG_NOTICE([libkerosin will not be build...]) AC_MSG_NOTICE([...you can enable it using the --enable-kerosin flag]) fi + AM_CONDITIONAL(BUILD_KEROSIN, test x$rcss_build_kerosin = xyes) ]) # RCSS_BUILD_KEROSIN *************** *** 353,357 **** #----------------------------------------------------------------------------- AC_DEFUN([RCSS_BUILD_SPADES_SERVER], [ ! # --enable-kerosin AC_ARG_ENABLE(spades, AC_HELP_STRING([--enable-spades=@<:@yes|no@:>@], --- 364,369 ---- #----------------------------------------------------------------------------- AC_DEFUN([RCSS_BUILD_SPADES_SERVER], [ ! AC_ARG_VAR(SPADES, [location of the SPADES library]) ! # --enable-spades AC_ARG_ENABLE(spades, AC_HELP_STRING([--enable-spades=@<:@yes|no@:>@], *************** *** 363,372 **** AC_MSG_NOTICE([Checking prerequisites for building the spades server...]) RCSS_LIB_SPADES fi - AM_CONDITIONAL(BUILD_SPADES, test x$rcss_build_spades = xyes) if test "$rcss_build_spades" = no; then ! AC_MSG_NOTICE([the spades server will not be build...]) ! AC_MSG_NOTICE([...you can enable it using the --enable-spades flag]) fi ]) # RCSS_BUILD_SPADES_SERVER --- 375,387 ---- AC_MSG_NOTICE([Checking prerequisites for building the spades server...]) RCSS_LIB_SPADES + else + AC_MSG_NOTICE([======================================================]) + AC_MSG_NOTICE([You have chosen not to build the SPADES Server module.]) fi if test "$rcss_build_spades" = no; then ! AC_MSG_WARN([The SPADES server will not be build. To build this module,]) ! AC_MSG_WARN([you have to configure again using the --enable-spades option.]) fi + AM_CONDITIONAL(BUILD_SPADES_SERVER, test x$rcss_build_spades = xyes) ]) # RCSS_BUILD_SPADES_SERVER *************** *** 375,380 **** # --------------------------------------------------------- AC_DEFUN([RCSS_LIB_SPADES], ! [AS_VAR_PUSHDEF([rcss_lib_spades], [rcss_cv_lib_spades])dnl ! AC_CACHE_CHECK(whether the spades library is available, rcss_cv_lib_spades, [AC_LANG_PUSH(C++) OLD_LDFLAGS="$LDFLAGS" --- 390,400 ---- # --------------------------------------------------------- AC_DEFUN([RCSS_LIB_SPADES], ! [AS_VAR_PUSHDEF([rcss_lib_spades], [rcss_cv_lib_spades])dnl ! if test "$SPADES"; then ! PATH="$PATH:$SPADES/bin" ! LDFLAGS="$LDFLAGS -L$SPADES/lib" ! CPPFLAGS="$CPPFLAGS -I$SPADES/include" ! fi ! AC_CACHE_CHECK(whether the spades library is available, rcss_cv_lib_spades, [AC_LANG_PUSH(C++) OLD_LDFLAGS="$LDFLAGS" |