- build: reordered compiler flags checking. Fixed problems with finding location of wx-config when running with cached configuration. Made sure to check ${prefix}/lib when looking for libGL, libGLU, and libglut.

svn path=/trunk/boinc/; revision=16989
This commit is contained in:
Eric J. Korpela 2009-01-22 21:39:40 +00:00
parent 5b132ae4f6
commit 9e7e635bdd
6 changed files with 56 additions and 26 deletions

View File

@ -594,3 +594,14 @@ David 22 Jan 2009
client/
scheduler_op.cpp
Eric 22 Jan 2009
- build: reordered compiler flags checking. Fixed problems with finding location of wx-config when running with cached configuration. Made
sure to check ${prefix}/lib when looking for libGL, libGLU, and libglut.
m4/
boinc_wxwidgets.m4
ax_check_glut.m4
ax_check_glu.m4
ax_check_gl.m4
boinc_set_compile_flags.m4

View File

@ -58,7 +58,7 @@ else
else
ax_try_lib="${ax_lib}"
fi
LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
LIBS="-L${prefix}/lib ${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
# if HAVE_WINDOWS_H && defined(_WIN32)
@ -66,7 +66,7 @@ else
# endif
# include <GL/gl.h>]],
[[glBegin(0)]])],
[ax_cv_check_gl_libgl="${ax_try_lib}"; break])
[ax_cv_check_gl_libgl="-L${prefix}/lib ${ax_try_lib}"; break])
done
LIBS=${ax_save_LIBS}
CPPFLAGS=${ax_save_CPPFLAGS}])

View File

@ -19,7 +19,7 @@ if test "X${with_apple_opengl_framework}" != "Xyes"; then
else
ax_try_lib="${ax_lib}"
fi
LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
LIBS="-L${prefix}/lib ${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
#
# libGLU typically links with libstdc++ on POSIX platforms. However,
# setting the language to C++ means that test program source is named
@ -37,7 +37,7 @@ if test "X${with_apple_opengl_framework}" != "Xyes"; then
# endif
# include <GL/glu.h>]],
[[gluBeginCurve(0)]])],
[ax_cv_check_glu_libglu="${ax_try_lib}"; break])
[ax_cv_check_glu_libglu="-L${prefix}/lib ${ax_try_lib}"; break])
if test X$ax_compiler_ms = Xyes; then
AC_LANG_POP([C])
fi

View File

@ -35,7 +35,7 @@ else
else
ax_try_lib="${ax_lib}"
fi
LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}"
LIBS="-L${prefix}/lib ${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
# if HAVE_WINDOWS_H && (defined(_WIN32) || defined(CYGWIN_USE_WIN32))
@ -43,7 +43,7 @@ else
# endif
# include <GL/glut.h>]],
[[glutMainLoop()]])],
[ax_cv_check_glut_libglut="${ax_try_lib}"; break])
[ax_cv_check_glut_libglut="-L${prefix}/lib ${ax_try_lib}"; break])
done
LIBS=${ax_save_LIBS}

View File

@ -44,7 +44,7 @@ if test x${enable_optimize} = xyes ; then
BOINC_CHECK_FFLAG(-ffast-math)
fi
if test x${enable_generic_processor} ; then
if test x${enable_generic_processor} = xyes ; then
case ${target} in
i*86-*-darwin*)
BOINC_CHECK_CFLAG(-march=pentium4)
@ -56,20 +56,23 @@ if test x${enable_generic_processor} ; then
;;
i*86-*)
dnl gcc
BOINC_CHECK_CFLAG(-march=i486)
BOINC_CHECK_CXXFLAG(-march=i486)
BOINC_CHECK_FFLAG(-march=i486)
BOINC_CHECK_CFLAG(-mtune=generic)
BOINC_CHECK_CXXFLAG(-mtune=generic)
BOINC_CHECK_FFLAG(-mtune=generic)
if test x${ac_cv_c_compiler_gnu} = xyes ; then
BOINC_CHECK_CFLAG(-march=i486)
BOINC_CHECK_CFLAG(-mtune=generic)
else
dnl dmc
if test x${ac_cv_c_compiler_gnu} != xyes ; then
BOINC_CHECK_CFLAG(-3)
fi
if test x${ac_cv_cxx_compiler_gnu} != xyes ; then
if test x${ac_cv_cxx_compiler_gnu} = xyes ; then
BOINC_CHECK_CXXFLAG(-march=i486)
BOINC_CHECK_CXXFLAG(-mtune=generic)
else
BOINC_CHECK_CXXFLAG(-3)
fi
if test x${ac_cv_f77_compiler_gnu} != xyes ; then
if test x${ac_cv_f77_compiler_gnu} = xyes ; then
BOINC_CHECK_FFLAG(-march=i486)
BOINC_CHECK_FFLAG(-mtune=generic)
else
BOINC_CHECK_FFLAG(-3)
fi
;;
@ -87,16 +90,28 @@ if test x${enable_generic_processor} ; then
;;
sparc-*)
dnl gcc
BOINC_CHECK_CFLAG(-march=v8)
BOINC_CHECK_CXXFLAG(-march=v8)
BOINC_CHECK_FFLAG(-march=v8)
BOINC_CHECK_CFLAG(-mtune=ultrasparc)
BOINC_CHECK_CXXFLAG(-mtune=ultrasparc)
BOINC_CHECK_FFLAG(-mtune=ultrasparc)
if test x${ac_cv_c_compiler_gnu} = xyes ; then
BOINC_CHECK_CFLAG(-march=v8)
BOINC_CHECK_CFLAG(-mcpu=v8)
BOINC_CHECK_CFLAG(-mtune=ultrasparc)
else
dnl Studio 10
BOINC_CHECK_CFLAG(-xarch=v8)
BOINC_CHECK_CXXFLAG(-xarch=v8)
BOINC_CHECK_FFLAG(-xarch=v8)
BOINC_CHECK_CFLAG(-xarch=v8)
fi
if test x${ac_cv_cxx_compiler_gnu} = xyes ; then
BOINC_CHECK_CXXFLAG(-march=v8)
BOINC_CHECK_CXXFLAG(-mcpu=v8)
BOINC_CHECK_CXXFLAG(-mtune=ultrasparc)
else
BOINC_CHECK_CXXFLAG(-xarch=v8)
fi
if test x${ac_cv_f77_compiler_gnu} = xyes ; then
BOINC_CHECK_FFLAG(-march=v8)
BOINC_CHECK_FFLAG(-mcpu=v8)
BOINC_CHECK_FFLAG(-mtune=ultrasparc)
else
BOINC_CHECK_FFLAG(-xarch=v8)
fi
;;
*)
;;

View File

@ -13,7 +13,11 @@ AC_DEFUN([BOINC_OPTIONS_WXWIDGETS],[
AC_CACHE_CHECK([if wxWidgets works],[ac_cv_have_wxwidgets],
[ac_cv_have_wxwidgets="${_ac_cv_have_wxwidgets}"])
AC_CACHE_SAVE
WX_CONFIG="$ac_cv_path_WX_CONFIG_PATH"
if test "x$ac_cv_path_WX_CONFIG_PATH" != "x" ; then
WX_CONFIG="$ac_cv_path_WX_CONFIG_PATH"
elif test "x$WX_CONFIG_PATH" != "x" ; then
WX_CONFIG="$WX_CONFIG_PATH"
fi
if test "x${ac_cv_have_wxwidgets}" = "xyes" ; then
dnl Find the default wxWidgets options.
wx_default_config="`$WX_CONFIG --selected-config`"