]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Porting on Mandriva 64
authorapo <apo@opencascade.com>
Mon, 3 Apr 2006 06:59:43 +0000 (06:59 +0000)
committerapo <apo@opencascade.com>
Mon, 3 Apr 2006 06:59:43 +0000 (06:59 +0000)
salome_adm/unix/config_files/Makefile.am
salome_adm/unix/config_files/ac_linker_options.m4
salome_adm/unix/config_files/check_opengl.m4
salome_adm/unix/config_files/check_qt.m4
salome_adm/unix/config_files/production.m4
salome_adm/unix/config_files/python.m4
src/SALOMEDS/Makefile.am
src/SALOMEDSImpl/Makefile.am

index fde1071757e779a4390158756ccd5e231743d5ea..4b45e158009b315cf10036e3813d49846038c846 100644 (file)
@@ -11,12 +11,7 @@ DEPRECATED_FILES=\
        DEPRECATED/ac_cxx_typename.m4 \
        DEPRECATED/check_mico.m4 \
        DEPRECATED/check_pthreads.m4 \
-       DEPRECATED/config.sub \
-       DEPRECATED/config.guess \
-       DEPRECATED/install-sh \
-       DEPRECATED/libtool.m4 \
-       DEPRECATED/ltconfig \
-       DEPRECATED/ltmain.sh
+       DEPRECATED/install-sh
 
 ## The following scripts are required for modules not built with autotools
 #dist_salomem4_SCRIPTS=\
@@ -62,4 +57,7 @@ enable_pthreads.m4 \
 production.m4 \
 pyembed.m4 \
 python.m4 \
+config.sub \
+config.guess \
+ltmain.sh \
 $(DEPRECATED_FILES)
index 392107c773ddcad09657f81207349e3001494a8e..9006a46fe54a09849d110c61f088cb93001fbd95 100644 (file)
@@ -26,6 +26,16 @@ dnl
 dnl @author Bernard Secher (CEA) - 04/12/2003
 dnl
 AC_DEFUN([AC_LINKER_OPTIONS],[
+
+  AC_CHECKING(for LIB_LOCATION_SUFFIX)
+  LIB_LOCATION_SUFFIX=""
+  case "$build_cpu" in
+  x86_64*)  LIB_LOCATION_SUFFIX="64" ;;
+  *)        LIB_LOCATION_SUFFIX="" ;;
+  esac
+  AC_SUBST(LIB_LOCATION_SUFFIX)
+  AC_MSG_RESULT(LIB_LOCATION_SUFFIX is $LIB_LOCATION_SUFFIX)
+
   for opt in "-Xlinker -export-dynamic" -transitive_link; do
     AC_CXX_OPTION($opt,LDEXPDYNFLAGS,flag=yes,flag=no)
     if test "$flag" = "yes"; then
@@ -33,6 +43,7 @@ AC_DEFUN([AC_LINKER_OPTIONS],[
     fi
   done
   AC_SUBST(LDEXPDYNFLAGS)
+
 dnl 
   case $host_os in
     osf*)
index bb549fac2cfbefb716db06a557edf00f3a1b48b9..0552a4bb5fa5fa180af84ffd3eb67ff1643bfc10 100644 (file)
@@ -22,122 +22,171 @@ dnl
 AC_DEFUN([CHECK_OPENGL],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
 AC_ARG_WITH(opengl,
   [AC_HELP_STRING([--with-opengl=DIR],[root directory path of OpenGL installation])],
-  [
-    opengl_dir="$withval"
-    local_opengl=yes
-  ], [
-    dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib"
-    ])dnl
+  [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
 
 AC_CHECKING(for OpenGL)
-
-AC_SUBST(OGL_INCLUDES)
-AC_SUBST(OGL_LIBS)
+AC_CHECKING(for OpenGL headers)
 
 OGL_INCLUDES=""
 OGL_LIBS=""
 
 OpenGL_ok=no
+OpenGL_libs_ok=no
+OpenGL_headers_ok=no
 
 dnl openGL headers
-
 # by default
-
-if test "x$local_opengl" = "xyes" ; then
-   if test -f "${opengl_dir}/include/GL/gl.h" ; then
-      OpenGL_ok=yes
-      OGL_INCLUDES="-I${opengl_dir}/include"
-      if test "x${opengl_dir}" = "x/usr"
-      then
-        OGL_LIBS=""
-      else
-        OGL_LIBS="-L${opengl_dir}/lib"
-      fi
-      AC_MSG_RESULT(select OpenGL distribution in ${opengl_dir})
-   else
-      AC_MSG_RESULT(no gl.h header file in ${opengl_dir}/include/GL)
-   fi
+if test "x${opengl_dir}" != "x" ; then
+  AC_MSG_RESULT(for opengl_dir: $opengl_dir)
+  AC_CHECK_HEADER([${opengl_dir}/include/GL/gl.h],
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I${opengl_dir}/include"],
+                  [OpenGL_headers_ok=no])
+  if test "x${OpenGL_headers_ok}" = "xyes" ; then
+    AC_CHECKING(for default OpenGL library)
+    if test "x${opengl_dir}" = "x/usr" ; then
+      OGL_LIBS=""
+    else
+      OGL_LIBS="-L${opengl_dir}/lib"
+    fi
+    LDFLAGS_old="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $OGL_LIBS"
+    AC_CHECK_LIB([GL],
+                 [glBegin],
+                 [OpenGL_libs_ok=yes],
+                 [OpenGL_libs_ok=no])
+    if test "x${OpenGL_libs_ok}" = "xyes" ; then
+      AC_TRY_LINK([],
+                  [],
+                  [OpenGL_libs_ok=yes ; OpenGL_ok=yes; OGL_LIBS="$OGL_LIBS -lGL"],
+                  [OpenGL_libs_ok=no])
+    fi
+    LDFLAGS="$LDFLAGS_old"
+  fi
 fi
 
-if  test "x$OpenGL_ok" = "xno"
-then
-  AC_CHECK_HEADERS(GL/gl.h, [OpenGL_ok=yes])
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  AC_CHECK_HEADER(GL/gl.h,
+                  [OpenGL_headers_ok=yes],
+                  [OpenGL_headers_ok=no])
 fi
 
-if  test "x$OpenGL_ok" = "xno"
-then
 # under SunOS ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
   AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h,
-                  [OpenGL_ok=yes]
-                  OGL_INCLUDES="-I/usr/openwin/share/include/")
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/openwin/share/include/"],
+                  [OpenGL_headers_ok=no])
 fi
 
-if  test "x$OpenGL_ok" = "xno"
-then
 # under IRIX ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
   AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h,
-                  [OpenGL_ok=yes]
-                  OGL_INCLUDES="-I/opt/graphics/OpenGL/include")
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/opt/graphics/OpenGL/include"],
+                  [OpenGL_headers_ok=no])
 fi
-if  test "x$OpenGL_ok" = "xno"
-then
+
 # some linux OpenGL servers hide the includes in /usr/X11R6/include/GL
+if test "x${OpenGL_headers_ok}" = "xno" ; then
   AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h,
-                  [OpenGL_ok=yes]
-                  OGL_INCLUDES="-I/usr/X11R6/include")
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/X11R6/include"],
+                  [OpenGL_headers_ok=no])
 fi
 
-if  test "x$OpenGL_ok" = "xyes"
-then
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
   AC_CHECKING(for OpenGL library)
-  OpenGL_ok=no
-  for i in $dirs; do
-    if test -r "$i/libGL.so"; then
-dnl      AC_MSG_RESULT(in $i)
-      if test "x$i" = "x/usr/lib"
-      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
         OGL_LIBS=""
       else
-        OGL_LIBS="-L$i"
+        OGL_LIBS="-L${idir}"
       fi
       break
     fi
-# under IRIX ?
-    if test -r "$i/libGL.sl"; then
-dnl      AC_MSG_RESULT(in $i)
-      if test "x$i" = "x/usr/lib"
-      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
         OGL_LIBS=""
       else
-        OGL_LIBS="-L$i"
+        OGL_LIBS="-L${idir}"
       fi
       break
     fi
   done
   LDFLAGS_old="$LDFLAGS"
   LDFLAGS="$LDFLAGS $OGL_LIBS"
-  AC_CHECK_LIB(GL,glBegin,OpenGL_ok=yes,OpenGL_ok=no)
+  AC_CHECK_LIB([GL],
+               [glBegin],
+               [OpenGL_libs_ok=yes],
+               [OpenGL_libs_ok=no])
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    AC_TRY_LINK([],
+                [],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="$OGL_LIBS -lGL"],
+                [OpenGL_libs_ok=no])
+  fi
   LDFLAGS="$LDFLAGS_old"
 fi
 
-if test "x$OpenGL_ok" = "xyes" ; then
-  OGL_LIBS="$OGL_LIBS -lGL"
+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
+        OGL_LIBS=""
+      else
+        OGL_LIBS="-L${idir}"
+      fi
+      break
+    fi
+    # 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
+        OGL_LIBS=""
+      else
+        OGL_LIBS="-L${idir}"
+      fi
+      break
+    fi
+  done
+  LDFLAGS_old="$LDFLAGS"
+  LDFLAGS="$LDFLAGS $OGL_LIBS"
+  AC_CHECK_LIB([GLU],
+               [gluBeginSurface],
+               [OpenGL_libs_ok=yes],
+               [OpenGL_libs_ok=no])
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    AC_TRY_LINK([],
+                [],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="$OGL_LIBS -lGLU"],
+                [OpenGL_libs_ok=no])
+  fi
+  LDFLAGS="$LDFLAGS_old"
 fi
 
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    OpenGL_ok=yes
+  fi
+fi
 
-OpenGLU_ok=no
-LDFLAGS_old="$LDFLAGS"
-LDFLAGS="$LDFLAGS $OGL_LIBS"
-AC_CHECK_LIB(GLU,gluBeginSurface,OpenGLU_ok=yes,OpenGLU_ok=no)
-LDFLAGS="$LDFLAGS_old"
+AC_MSG_RESULT(for OpenGL_headers_ok: $OpenGL_headers_ok)
+AC_MSG_RESULT(for OpenGL_libs_ok: $OpenGL_libs_ok)
+AC_MSG_RESULT(for OpenGL_ok: $OpenGL_ok)
 
-if test "x$OpenGLU_ok" = "xyes" ; then
-  OGL_LIBS="$OGL_LIBS -lGLU"
-fi
+AC_SUBST(OGL_INCLUDES)
+AC_SUBST(OGL_LIBS)
 
-# Save cache
-AC_CACHE_SAVE
+AC_LANG_RESTORE
 
 ])dnl
index 3fe9ad7ea4a7973c99b2c2625fbf18a346c01717..ba72a02d4b6c95fcf41399b0b5a32141cadb44ed 100644 (file)
@@ -26,8 +26,14 @@ AC_REQUIRE([AC_PROG_CXX])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
 AC_REQUIRE([AC_PROG_CXXCPP])dnl
 AC_REQUIRE([CHECK_OPENGL])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
 
 AC_CHECKING(for QT)
+
+if test "x$OpenGL_ok" != "xyes" ; then
+   AC_MSG_WARN(Qt needs OpenGL correct configuration, check configure output)
+fi
+
 qt_ok=yes
 
 AC_LANG_SAVE
@@ -117,7 +123,7 @@ then
   then
     LIBS="$LIBS -lqt-mt $OGL_LIBS"
   else
-    LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS"
+    LIBS="$LIBS -L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt $OGL_LIBS"
   fi
 
   CXXFLAGS_old=$CXXFLAGS
@@ -145,8 +151,8 @@ then
          QT_LIBS=" -lqt-mt"
       QT_MT_LIBS=" -lqt-mt"
     else
-         QT_LIBS="-L$QTDIR/lib -lqt-mt"
-      QT_MT_LIBS="-L$QTDIR/lib -lqt-mt"
+         QT_LIBS="-L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
+      QT_MT_LIBS="-L$QTDIR/lib${LIB_LOCATION_SUFFIX} -lqt-mt"
     fi
   fi
 
index dd6bce2d1b614879322f5381cb4fe71543f2cbe5..8157d677d18b8ea404667e66b2ef6f74f89b75a7 100644 (file)
@@ -59,6 +59,7 @@ AC_CXX_OPTION(-Wreturn-type,CXXFLAGS)
 AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS)
 AC_CXX_OPTION(-fmessage-length=0,CXXFLAGS)
 AC_CXX_OPTION(-Wunused,CXXFLAGS)
+AC_CXX_OPTION(-pipe,CXXFLAGS)
 
 if test "X$enable_production" = "Xyes"; then
   CFLAGS="$CFLAGS -O"
@@ -102,5 +103,4 @@ fi
 ])
 
 # AC_DISABLE_DEBUG - set the default flag to --disable-debug
-AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)])
-
+AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)])
\ No newline at end of file
index 240f6ec0d15e3790e83a3b30e1b184d606f324c0..0a04ff3c7fde055472c919f80572dfe98bfbc7a3 100644 (file)
@@ -45,6 +45,9 @@ AC_DEFUN([CHECK_PYTHON],
     ])
   
   AC_CHECKING([local Python configuration])
+
+  AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
   PYTHON_PREFIX=`echo $PYTHON | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
   PYTHON_PREFIX=`echo $PYTHON_PREFIX | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
   PYTHONHOME=$PYTHON_PREFIX
@@ -57,7 +60,7 @@ AC_DEFUN([CHECK_PYTHON],
   changequote([, ])dnl
   AC_SUBST(PYTHON_VERSION)
 
-  PY_MAKEFILE=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config/Makefile
+  PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile
   if test ! -f "$PY_MAKEFILE"; then
      AC_MSG_ERROR([*** Couldn't find ${PY_MAKEFILE}.  Maybe you are
 *** missing the development portion of the python installation])
@@ -67,9 +70,9 @@ AC_DEFUN([CHECK_PYTHON],
   AC_SUBST(PYTHON_LIBS)
 
   PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
-  PYTHON_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+  PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
   PYTHON_LIB=$PYTHON_LIBS
-  PYTHON_LIBA=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a
+  PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a
 
   dnl At times (like when building shared libraries) you may want
   dnl to know which OS Python thinks this is.
@@ -91,7 +94,7 @@ dnl python_site_given=no]
 
    [PYTHON_SITE="$withval"
     python_site_given=yes],
-   [PYTHON_SITE=$prefix"/lib/python"$PYTHON_VERSION/site-packages
+   [PYTHON_SITE=${prefix}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
     python_site_given=no])
 
   AC_SUBST(PYTHON_SITE_PACKAGE)
@@ -109,7 +112,7 @@ dnl python_site_given=no]
     [if test "$python_site_given" = yes; then
        PYTHON_SITE_EXEC=$PYTHON_SITE
      else
-       PYTHON_SITE_EXEC=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
+       PYTHON_SITE_EXEC=${PYTHON_EXEC_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
      fi])
 
   dnl Set up the install directory
@@ -120,7 +123,7 @@ dnl python_site_given=no]
 
   dnl Also lets automake think PYTHON means something.
 
-  pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/
+  pythondir=${PYTHON_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/
   AC_SUBST(pythondir)
 
  AC_MSG_CHECKING([if we need libdb])
index f0b80d248a554d02b8d4940b57c268fa221b6165..979af229e2e8b73bf86512cb19079b1b4c9727e1 100644 (file)
@@ -53,7 +53,7 @@ COMMON_CPPFLAGS=\
        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
 
 # This flag is used to resolve the dependencies of OCC libraries.
-LDXMUFLAGS = -L/usr/X11R6/lib -lXmu
+LDXMUFLAGS = -L/usr/X11R6/lib@LIB_LOCATION_SUFFIX@ -lXmu
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 COMMON_LIBS =\
index 22cd3b6ea3ecfc3e5dea8980a03a569225291c82..45f661a2347d40e5f618d9c01d961e982c403f27 100644 (file)
@@ -74,7 +74,7 @@ COMMON_CPPFLAGS=\
        @HDF5_INCLUDES@
 
 # This flag is used to resolve the dependencies of OCC libraries.
-LDXMUFLAGS = -L/usr/X11R6/lib -lXmu
+LDXMUFLAGS = -L/usr/X11R6/lib@LIB_LOCATION_SUFFIX@ -lXmu
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 COMMON_LIBS =\