]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To improve the check
authorapo <apo@opencascade.com>
Mon, 10 Apr 2006 05:59:33 +0000 (05:59 +0000)
committerapo <apo@opencascade.com>
Mon, 10 Apr 2006 05:59:33 +0000 (05:59 +0000)
adm_local/unix/config_files/check_opengl.m4
adm_local/unix/config_files/check_vtk.m4

index 0552a4bb5fa5fa180af84ffd3eb67ff1643bfc10..8a56e0f54841b65eaedaf5ad1de9f2657ed7cdcf 100644 (file)
@@ -38,6 +38,9 @@ AC_CHECKING(for OpenGL headers)
 OGL_INCLUDES=""
 OGL_LIBS=""
 
+GL_LIB_PATH=""
+GLU_LIB_PATH=""
+
 OpenGL_ok=no
 OpenGL_libs_ok=no
 OpenGL_headers_ok=no
@@ -105,9 +108,9 @@ if test "x${OpenGL_headers_ok}" = "xyes" ; then
     if test -r "${idir}/libGL.so"; then
       AC_MSG_RESULT(in ${idir})
       if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
-        OGL_LIBS=""
+        GL_LIB_PATH=""
       else
-        OGL_LIBS="-L${idir}"
+        GL_LIB_PATH="-L${idir}"
       fi
       break
     fi
@@ -115,15 +118,15 @@ if test "x${OpenGL_headers_ok}" = "xyes" ; then
     if test -r "${idir}/libGL.sl"; then
       AC_MSG_RESULT(in ${idir})
       if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
-        OGL_LIBS=""
+        GL_LIB_PATH=""
       else
-        OGL_LIBS="-L${idir}"
+        GL_LIB_PATH="-L${idir}"
       fi
       break
     fi
   done
-  LDFLAGS_old="$LDFLAGS"
-  LDFLAGS="$LDFLAGS $OGL_LIBS"
+  LDFLAGS_old="${LDFLAGS}"
+  LDFLAGS="${LDFLAGS} ${GL_LIB_PATH}"
   AC_CHECK_LIB([GL],
                [glBegin],
                [OpenGL_libs_ok=yes],
@@ -131,7 +134,7 @@ if test "x${OpenGL_headers_ok}" = "xyes" ; then
   if test "x${OpenGL_libs_ok}" = "xyes" ; then
     AC_TRY_LINK([],
                 [],
-                [OpenGL_libs_ok=yes ; OGL_LIBS="$OGL_LIBS -lGL"],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GL_LIB_PATH} -lGL"],
                 [OpenGL_libs_ok=no])
   fi
   LDFLAGS="$LDFLAGS_old"
@@ -142,9 +145,9 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then
     if test -r "${idir}/libGLU.so"; then
       AC_MSG_RESULT(in ${idir})
       if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
-        OGL_LIBS=""
+        GLU_LIB_PATH=""
       else
-        OGL_LIBS="-L${idir}"
+        GLU_LIB_PATH="-L${idir}"
       fi
       break
     fi
@@ -152,15 +155,15 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then
     if test -r "${idir}/libGLU.sl"; then
       AC_MSG_RESULT(in ${idir})
       if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
-        OGL_LIBS=""
+        GLU_LIB_PATH=""
       else
-        OGL_LIBS="-L${idir}"
+        GLU_LIB_PATH="-L${idir}"
       fi
       break
     fi
   done
-  LDFLAGS_old="$LDFLAGS"
-  LDFLAGS="$LDFLAGS $OGL_LIBS"
+  LDFLAGS_old="${LDFLAGS}"
+  LDFLAGS="${LDFLAGS} ${OGL_LIBS} ${GLU_LIB_PATH}"
   AC_CHECK_LIB([GLU],
                [gluBeginSurface],
                [OpenGL_libs_ok=yes],
@@ -168,7 +171,7 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then
   if test "x${OpenGL_libs_ok}" = "xyes" ; then
     AC_TRY_LINK([],
                 [],
-                [OpenGL_libs_ok=yes ; OGL_LIBS="$OGL_LIBS -lGLU"],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GLU_LIB_PATH} -lGLU"],
                 [OpenGL_libs_ok=no])
   fi
   LDFLAGS="$LDFLAGS_old"
index ce56911f4b2b02fc1dfaf05ec68f3ecc185081f7..e124c071aa35f1ba9dd13b960011afa07c851125 100644 (file)
@@ -115,9 +115,9 @@ AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no")
 
    AC_CACHE_VAL(salome_cv_lib_vtk,[
      AC_TRY_LINK([#include "vtkPlane.h"],
-                vtkPlane::New(),
-                salome_cv_lib_vtk=yes,
-                salome_cv_lib_vtk=no)
+                [vtkPlane::New()],
+                [salome_cv_lib_vtk=yes],
+                [salome_cv_lib_vtk=no])
   ])
   vtk_ok="$salome_cv_lib_vtk"
   LIBS="$LIBS_old"
@@ -127,10 +127,10 @@ fi
 
 if  test "x$vtk_ok" = "xno"
 then
-  AC_MSG_RESULT("no")
+  AC_MSG_RESULT(no)
   AC_MSG_WARN(unable to link with vtk library)
 else
-  AC_MSG_RESULT("yes")
+  AC_MSG_RESULT(yes)
   VTK_LIBS="$LOCAL_LIBS"
   VTK_MT_LIBS="$LOCAL_LIBS"
 fi