From 3da429c98a4346549a35191b87033c4dd77aee7c Mon Sep 17 00:00:00 2001 From: nri Date: Wed, 9 Jul 2003 16:18:30 +0000 Subject: [PATCH] NRI : Merge from V1_2. --- salome_adm/unix/config_files/check_cas.m4 | 21 ++++++++ salome_adm/unix/config_files/check_pyqt.m4 | 5 +- salome_adm/unix/config_files/check_sip.m4 | 1 + salome_adm/unix/config_files/check_vtk.m4 | 56 +++++++++++++++------- salome_adm/unix/make_commence.in | 16 ++++--- salome_adm/unix/make_conclude.in | 50 +++++++++---------- 6 files changed, 97 insertions(+), 52 deletions(-) diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index e8410246d..7ad5b3c12 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -1,3 +1,24 @@ +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 +dnl +dnl AC_DEFUN([CHECK_CAS],[ AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_PROG_CXXCPP])dnl diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 index fa1f91dbc..98f92b121 100644 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ b/salome_adm/unix/config_files/check_pyqt.m4 @@ -1,10 +1,11 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D AC_DEFUN([CHECK_PYQT],[ AC_REQUIRE([CHECK_PYTHON])dnl AC_CHECKING(for pyqt) -pyqt_ok=no +pyqt_ok=yes PYTHON_SITE_PACKPYQT=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages AC_CHECK_FILES($PYTHON_SITE_PACKPYQT/qt.py $PYTHON_SITE_PACKPYQT/libqtcmodule.so,pyqt_ok=yes,pyqt_ok=no) @@ -92,8 +93,6 @@ else [ --with-pyuic=EXEC pyuic executable ], [PYUIC="$withval" AC_MSG_RESULT("select $withval as pyqt executable") - ], [ - AC_PATH_PROG(PYUIC, pyuic) ]) if test "x$PYUIC" = "x" diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index a6714b238..cf40d464e 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -1,3 +1,4 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D AC_DEFUN([CHECK_SIP],[ AC_REQUIRE([CHECK_PYTHON])dnl diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 index 168767468..523f70121 100644 --- a/salome_adm/unix/config_files/check_vtk.m4 +++ b/salome_adm/unix/config_files/check_vtk.m4 @@ -1,3 +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 +dnl +dnl + AC_DEFUN([CHECK_VTK],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CXX])dnl @@ -28,33 +50,33 @@ fi LOCAL_INCLUDES="$OGL_INCLUDES" -LOCAL_LIBS="-lVTKCommon -lVTKGraphics -lVTKImaging -lVTKContrib $OGL_LIBS -L$x_libraries -lX11 -lXt" -TRY_LINK_LIBS="-lVTKCommon $OGL_LIBS -L$x_libraries -lX11 -lXt" +LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkPatented -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS -L$x_libraries -lX11 -lXt" +TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS -L$x_libraries -lX11 -lXt" if test -z $VTKHOME then AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) else - LOCAL_INCLUDES="-I$VTKHOME/common -I$VTKHOME/imaging -I$VTKHOME/graphics -I$VTKHOME/contrib $LOCAL_INCLUDES" - LOCAL_LIBS="-L$VTKHOME/lib -L$VTKHOME/common -L$VTKHOME/graphics -L$VTKHOME/imaging -L$VTKHOME/contrib $LOCAL_LIBS" - TRY_LINK_LIBS="-L$VTKHOME/lib -L$VTKHOME/common $TRY_LINK_LIBS" + LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES" + LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS" + TRY_LINK_LIBS="-L$VTKHOME/lib/vtk $TRY_LINK_LIBS" fi dnl vtk headers CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES -Wno-deprecated" -AC_CHECK_HEADER(vtk.h,vtk_ok="yes",vtk_ok="no") +AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no") -CPPFLAGS="$CPPFLAGS_old" + CPPFLAGS="$CPPFLAGS_old" -if test "x$vtk_ok" = "xyes" -then - VTK_INCLUDES="$LOCAL_INCLUDES" + if test "x$vtk_ok" = "xyes" + then + VTK_INCLUDES="$LOCAL_INCLUDES" -dnl vtk libraries + dnl vtk libraries - AC_MSG_CHECKING(linking VTK library) + AC_MSG_CHECKING(linking VTK library) LIBS_old="$LIBS" # LIBS="$LIBS $TRY_LINK_LIBS" @@ -62,11 +84,11 @@ dnl vtk libraries CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $VTK_INCLUDES -Wno-deprecated" -dnl VTKPY_MODULES="$VTKHOME/python" + dnl VTKPY_MODULES="$VTKHOME/python" - AC_CACHE_VAL(salome_cv_lib_vtk,[ - AC_TRY_LINK( -#include + AC_CACHE_VAL(salome_cv_lib_vtk,[ + AC_TRY_LINK( +#include "vtkPlane.h" , vtkPlane *p = vtkPlane::New();, eval "salome_cv_lib_vtk=yes",eval "salome_cv_lib_vtk=no") ]) @@ -94,3 +116,5 @@ AC_LANG_RESTORE AC_CACHE_SAVE ])dnl + + diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index 6e3143e38..dbd46fcbe 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -1,5 +1,5 @@ # common directories to put headerfiles -inc_builddir=$(top_builddir)/include/salome +inc_builddir=$(top_builddir)/include @SET_MAKE@ SHELL=/bin/sh @@ -106,7 +106,11 @@ OCC_VIEWER_LIBS=@CAS_VIEWER@ OCC_MODELER_LIBS=@CAS_MODELER@ OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@ OCC_LIBS=@CAS_LDFLAGS@ - +CAS_KERNEL=@CAS_KERNEL@ +CAS_OCAF=@CAS_OCAF@ +CAS_VIEWER=@CAS_VIEWER@ +CAS_MODELER=@CAS_MODELER@ +CAS_DATAEXCHANGE=@CAS_DATAEXCHANGE@ # MPICH MPICH_INCLUDES=@MPICH_INCLUDES@ @@ -126,7 +130,7 @@ OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@ OMNIORB_IDL = @OMNIORB_IDL@ OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@ -OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/idl +OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/share/salome/idl OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@ OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@ @@ -186,8 +190,8 @@ LN_S=@LN_S@ ## Installation points prefix=@prefix@ exec_prefix=@exec_prefix@ -bindir=@bindir@/salome -libdir=@libdir@/salome +bindir=@bindir@ +libdir=@libdir@ # warning : if user give this path in configure we could have salome/salome :-( includedir=@includedir@/salome datadir=@datadir@/salome @@ -195,7 +199,7 @@ idldir=${prefix}/idl/salome sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules incmakedir=${prefix}/salome_adm/unix -docdir=$(datadir)/doc +docdir=@exec_prefix@/doc # # begin of package rules diff --git a/salome_adm/unix/make_conclude.in b/salome_adm/unix/make_conclude.in index 75773a0d9..63ea4a424 100644 --- a/salome_adm/unix/make_conclude.in +++ b/salome_adm/unix/make_conclude.in @@ -35,9 +35,9 @@ LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC))) # all libtool obj file in library LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F) -# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/salome/%.la) -LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/salome/%.la, $(filter %.la, $(LIB))) -LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/salome/%.a, $(filter %.a, $(LIB))) +# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/%.la) +LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/%.la, $(filter %.la, $(LIB))) +LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/%.a, $(filter %.a, $(LIB))) ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),) LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB))) @@ -48,23 +48,23 @@ endif lib: $(LIB_BUILD) $(LIB_CLIENT_PY) # we don't build static library ! -$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la +$(LIB_BUILD): $(top_builddir)/lib/%.la: %.la -$(RM) $@ -$(RM) $(patsubst %.la, %.so, $@) -$(RM) $(patsubst %.la, %.a, $@) - ln -s $(CURDIR)/$< $@ || true - ln -s $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \ + ln -sf $(CURDIR)/$< $@ || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \ $(patsubst %.la, %.so, $@) || true - ln -s $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ $(patsubst %.la, %.so, $@).0 || true if ! test -z $(LIB_SWIG) ; then \ - ln -s $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\ + ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/_$(LIB_SWIG) || true;\ fi; -$(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a +$(LIB_BUILD_A): $(top_builddir)/lib/%.a: %.a -$(RM) $@ - ln -s $(CURDIR)/$< $@ || true + ln -sf $(CURDIR)/$< $@ || true $(LIB): $(LIB_OBJ) @$(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) @@ -86,22 +86,22 @@ BIN_OBJ_CXX = $(patsubst %.cxx, %.o, $(filter %.cxx, $(BIN_SRC))) # all obj file in bin target BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) -bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts +bin: $(BIN:%=$(top_builddir)/bin/%) $(BIN) $(LIB) pyscripts sharedpyscripts BIN_LIB=$(LIB:lib%.la=-l%) -$(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: % +$(BIN:%=$(top_builddir)/bin/%) $(TEST_PROGS:%=$(top_builddir)/bin/%): $(top_builddir)/bin/%: % -$(RM) $@ - ln -s $(CURDIR)/$< $@ + ln -sf $(CURDIR)/$< $@ $(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) $(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS) -# copy python scripts in $(top_builddir)/bin/salome +# copy python scripts in $(top_builddir)/bin # -DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/salome/%) +DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/%) pyscripts: $(DEST_PYSCRIPTS) -$(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: % +$(DEST_PYSCRIPTS): $(top_builddir)/bin/%: % cp -f $< $@ # copy pyqt files in $(PYTHON_SHARED_SITE) @@ -120,7 +120,7 @@ check: test tests: test -test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%) +test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/%) # copy header file in $(inc_builddir) @@ -145,7 +145,7 @@ install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir fi; \ done @if ! test -z $(LIB_SWIG) ; then \ - (cd $(libdir); ln -s $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ + (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ fi; @for f in X $(BIN); do \ if test $$f != X; then \ @@ -260,10 +260,10 @@ clean: mostlyclean -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN) -$(RM) TAGS *~ *# core *.core -$(RM) -r .libs - -$(RM) $(top_builddir)/lib/salome/$(LIB) - -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN)) - -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib/salome/$(LIB)) - -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib/salome/$(LIB)) + -$(RM) $(top_builddir)/lib/$(LIB) + -$(RM) $(patsubst %,$(top_builddir)/bin/%, $(BIN)) + -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib/$(LIB)) + -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib/$(LIB)) # remove idl generated files (sources) -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC) # remove idl generated files (headers) @@ -327,11 +327,7 @@ distclean: clean $(SWIG) $(SWIG_FLAGS) -o $@ $< $(top_builddir)/share/salome/resources/%.qm: %.po - if test -e ${KERNEL_ROOT_DIR}/bin/salome/msg2qm ; then \ - ${KERNEL_ROOT_DIR}/bin/salome/msg2qm $< $@ ; \ - else \ - $(top_builddir)/bin/salome/msg2qm $< $@ ; \ - fi + $(top_builddir)/bin/msg2qm $< $@ #------------------------------------------------------------------------------ # The following section of this makefile contains dependencies between the -- 2.39.2