Salome HOME
Second integration of PV3D viewer:
[modules/gui.git] / adm_local / unix / config_files / check_opengl.m4
index a1eb48ee2ab54bd59ae81f021a7f60d31a88721a..ed6d371ffcb4678bfc92d05b3a794821bc976620 100644 (file)
@@ -1,24 +1,25 @@
-dnl  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-dnl 
-dnl  This library is free software; you can redistribute it and/or 
-dnl  modify it under the terms of the GNU Lesser General Public 
-dnl  License as published by the Free Software Foundation; either 
-dnl  version 2.1 of the License. 
-dnl 
-dnl  This library is distributed in the hope that it will be useful, 
-dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-dnl  Lesser General Public License for more details. 
-dnl 
-dnl  You should have received a copy of the GNU Lesser General Public 
-dnl  License along with this library; if not, write to the Free Software 
-dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-dnl 
-dnl  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+dnl Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 dnl
+dnl Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
 AC_DEFUN([CHECK_OPENGL],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
@@ -30,7 +31,7 @@ AC_LANG_CPLUSPLUS
 AC_ARG_WITH(opengl,
   [AC_HELP_STRING([--with-opengl=DIR],[root directory path of OpenGL installation])],
   [opengl_dir="$withval"], 
-  [dirs="/usr/lib${LIB_LOCATION_SUFFIX} /usr/local/lib${LIB_LOCATION_SUFFIX} /opt/graphics/OpenGL/lib${LIB_LOCATION_SUFFIX} /usr/openwin/lib${LIB_LOCATION_SUFFIX} /usr/X11R6/lib${LIB_LOCATION_SUFFIX}"])dnl
+  [dirs="/usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/graphics/OpenGL/lib64 /opt/graphics/OpenGL/lib /usr/openwin/lib64 /usr/openwin/lib /usr/X11R6/lib64 /usr/X11R6/lib"])dnl
 
 AC_CHECKING(for OpenGL)
 AC_CHECKING(for OpenGL headers)
@@ -107,7 +108,7 @@ if test "x${OpenGL_headers_ok}" = "xyes" ; then
   for idir in $dirs; do
     if test -r "${idir}/libGL.so"; then
       AC_MSG_RESULT(in ${idir})
-      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
         GL_LIB_PATH=""
       else
         GL_LIB_PATH="-L${idir}"
@@ -117,7 +118,7 @@ if test "x${OpenGL_headers_ok}" = "xyes" ; then
     # under IRIX ?
     if test -r "${idir}/libGL.sl"; then
       AC_MSG_RESULT(in ${idir})
-      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
         GL_LIB_PATH=""
       else
         GL_LIB_PATH="-L${idir}"
@@ -144,7 +145,7 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then
   for idir in $dirs; do
     if test -r "${idir}/libGLU.so"; then
       AC_MSG_RESULT(in ${idir})
-      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
         GLU_LIB_PATH=""
       else
         GLU_LIB_PATH="-L${idir}"
@@ -154,7 +155,7 @@ if test "x${OpenGL_libs_ok}" = "xyes" ; then
     # under IRIX ?
     if test -r "${idir}/libGLU.sl"; then
       AC_MSG_RESULT(in ${idir})
-      if test "x${idir}" = "x/usr/lib${LIB_LOCATION_SUFFIX}" ; then
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
         GLU_LIB_PATH=""
       else
         GLU_LIB_PATH="-L${idir}"