From 00ac322adfa155a53570f162acaacfc0891e77fa Mon Sep 17 00:00:00 2001 From: maintenance team Date: Tue, 12 Feb 2008 14:53:59 +0000 Subject: [PATCH] Fix for problem of correct checking of libGL.la --- adm_local/unix/config_files/check_opengl.m4 | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/adm_local/unix/config_files/check_opengl.m4 b/adm_local/unix/config_files/check_opengl.m4 index 8a56e0f54..a1eb48ee2 100644 --- a/adm_local/unix/config_files/check_opengl.m4 +++ b/adm_local/unix/config_files/check_opengl.m4 @@ -162,6 +162,40 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then break fi done + + # workaround a problem with libGL library location + for idir in $dirs; do + if test -r "${idir}/libGLU.la"; then + GLU_LA_PATH="${idir}/libGLU.la" + GL_LA_PATH_TO_CHECK=`cat ${GLU_LA_PATH} | awk '{ for(i=1;i0) print $i } }'` + if test -z ${GL_LA_PATH_TO_CHECK} || test -r ${GL_LA_PATH_TO_CHECK}; then + # nothing to do + break + fi + for jdir in $dirs; do + if test -r "${jdir}/libGL.la"; then + GL_LA_PATH="${jdir}/libGL.la" + # copy the libGLU.la file and set correct libGL.la path in it + NEW_GLU_LA_PATH=${ROOT_BUILDDIR} + NEW_GLU_LA_FILE="${NEW_GLU_LA_PATH}/libGLU.la" + sed -e "s%${GL_LA_PATH_TO_CHECK}%${GL_LA_PATH}%" ${GLU_LA_PATH} > "${NEW_GLU_LA_FILE}" + chmod -f --reference=${GLU_LA_PATH} "${NEW_GLU_LA_FILE}" + # set a new libGLU.la path + GLU_LIB_PATH="-L${NEW_GLU_LA_PATH}" + # create a simbolic link to libGLU.so + for kdir in $dirs; do + if test -r "${kdir}/libGLU.so"; then + cp -fs "${kdir}/libGLU.so" "${NEW_GLU_LA_PATH}/libGLU.so" + break + fi + done + break + fi + done + break + fi + done + LDFLAGS_old="${LDFLAGS}" LDFLAGS="${LDFLAGS} ${OGL_LIBS} ${GLU_LIB_PATH}" AC_CHECK_LIB([GLU], @@ -193,3 +227,4 @@ AC_SUBST(OGL_LIBS) AC_LANG_RESTORE ])dnl + -- 2.39.2