fi
# make other build directories
-for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl
+for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources idl
do
# if test ! -d $rep ; then
# eval mkdir $rep
LIBS=@LIBS@
LIBSFORBIN=@LIBS@
-# LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker -L$(top_builddir)/lib/salome
-LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome
-LDFLAGSFORBIN=@LDFLAGS@ -L$(top_builddir)/lib/salome
+LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome
+LDFLAGSFORBIN=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome
# add libstdc++ to link c++ library with libtool !
LDFLAGS+= @STDLIB@
LDFLAGSFORBIN+= @STDLIB@
PYTHON_INCLUDES = @PYTHON_INCLUDES@
PYTHON_LIBS = @PYTHON_LIBS@
PYTHON_VERSION = @PYTHON_VERSION@
-PYTHON_SITE = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages
-PYTHON_SITE_INSTALL = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome
+PYTHON_SITE = $(prefix)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages
+PYTHON_SITE_INSTALL = $(prefix)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome
# QT
QT_ROOT = @QT_ROOT@
OCC_INCLUDES=@CAS_CPPFLAGS@
OCC_CXXFLAGS=@CAS_CXXFLAGS@
-#OCC_KERNEL_LIBS=@CAS_KERNEL@
-#OCC_OCAF_LIBS=@CAS_OCAF@
-#OCC_VIEWER_LIBS=@CAS_VIEWER@
-#OCC_MODELER_LIBS=@CAS_MODELER@
-#OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@
-#OCC_LIBS=@CAS_LDFLAGS@
CAS_KERNEL=@CAS_KERNEL@
CAS_MATH=@CAS_MATH@
CAS_OCAF=@CAS_OCAF@
# create a symbolic link (or a copie ?)
LN_S=@LN_S@
+KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@
+KERNEL_SITE_DIR=@KERNEL_SITE_DIR@
+KERNEL_LDFLAGS=@KERNEL_LDFLAGS@
+KERNEL_CXXFLAGS=@KERNEL_CXXFLAGS@
+
## Installation points
prefix=@prefix@
exec_prefix=@exec_prefix@
-bindir=@bindir@/salome
-libdir=@libdir@/salome
+bindir=@exec_prefix@/bin/salome
+libdir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/salome
# warning : if user give this path in configure we could have salome/salome :-(
includedir=@includedir@/salome
datadir=@datadir@/salome
idldir=${prefix}/idl/salome
-sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
+sharedpydir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
incmakedir=${prefix}/salome_adm/unix
docdir=${prefix}/doc/salome
# 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_SO = $(patsubst %.so, $(top_builddir)/lib/salome/%.so, $(filter %.so, $(LIB)))
+# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la)
+LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la, $(filter %.la, $(LIB)))
+LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a, $(filter %.a, $(LIB)))
+LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.so, $(filter %.so, $(LIB)))
ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),)
LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB)))
lib: $(LIB_BUILD) $(LIB_BUILD_SO) $(LIB_CLIENT_PY)
# we don't build static library !
-$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la
+$(LIB_BUILD): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la: %.la
-$(RM) $@
-$(RM) $(patsubst %.la, %.so, $@)
-$(RM) $(patsubst %.la, %.a, $@)
$(patsubst %.la, %.so, $@).0 || true
if test "X$(LIB_SWIG)" != "X"; then \
- ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\
+ ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/_$(LIB_SWIG) || true;\
fi;
-$(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a
+$(LIB_BUILD_A): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a: %.a
-$(RM) $@
ln -sf $(CURDIR)/$< $@ || true
-$(LIB_BUILD_SO): $(top_builddir)/lib/salome/%.so: %.so
+$(LIB_BUILD_SO): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.so: %.so
-$(RM) $@
ln -sf $(CURDIR)/$< $@ || true
-$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN)
-$(RM) TAGS *~ *# core *.core
-$(RM) -r .libs
- -$(RM) $(top_builddir)/lib/salome/$(LIB)
+ -$(RM) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/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) $(patsubst %.la, %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
+ -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
# remove idl generated files (sources)
-$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
# remove idl generated files (headers)
#
AC_DEFUN([CHECK_KERNEL],[
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
AC_CHECKING(for Kernel)
Kernel_ok=no
-AC_ARG_WITH(kernel,
- [ --with-kernel=DIR root directory path of KERNEL build or installation],
- KERNEL_DIR="$withval",KERNEL_DIR="")
-
-if test "x$KERNEL_DIR" = "x" ; then
-
-# no --with-kernel-dir option used
+KERNEL_LDFLAGS=""
+KERNEL_CXXFLAGS=""
- if test "x$KERNEL_ROOT_DIR" != "x" ; then
+AC_ARG_WITH(kernel,
+ [--with-kernel=DIR root directory path of KERNEL build or installation],
+ [KERNEL_DIR="$withval"],
+ [KERNEL_DIR=""])
+if test "x${KERNEL_DIR}" = "x" ; then
+ AC_MSG_RESULT(for \${KERNEL_ROOT_DIR}: ${KERNEL_ROOT_DIR})
+ # no --with-kernel-dir option used
+ if test "x${KERNEL_ROOT_DIR}" != "x" ; then
# KERNEL_ROOT_DIR environment variable defined
- KERNEL_DIR=$KERNEL_ROOT_DIR
-
- else
-
+ KERNEL_DIR=${KERNEL_ROOT_DIR}
+ else
# search Kernel binaries in PATH variable
- AC_PATH_PROG(TEMP, runSalome)
- if test "x$TEMP" != "x" ; then
- KERNEL_BIN_DIR=`dirname $TEMP`
- KERNEL_DIR=`dirname $KERNEL_BIN_DIR`
- fi
-
- fi
-#
+ AC_PATH_PROG(TEMP,runSalome)
+ if test "x${TEMP}" != "x" ; then
+ AC_MSG_RESULT(runSalome was found at : ${TEMP})
+ KERNEL_BIN_DIR=`dirname ${TEMP}`
+ KERNEL_DIR=`cd ${KERNEL_BIN_DIR}/../..; pwd`
+ fi
+ fi
fi
if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then
- Kernel_ok=yes
AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR})
+ Kernel_ok=yes
- if test "x$KERNEL_ROOT_DIR" = "x" ; then
+ if test "x${KERNEL_ROOT_DIR}" = "x" ; then
KERNEL_ROOT_DIR=${KERNEL_DIR}
fi
- if test "x$KERNEL_SITE_DIR" = "x" ; then
+
+ if test "x${KERNEL_SITE_DIR}" = "x" ; then
KERNEL_SITE_DIR=${KERNEL_ROOT_DIR}
fi
+
AC_SUBST(KERNEL_ROOT_DIR)
AC_SUBST(KERNEL_SITE_DIR)
+ KERNEL_LDFLAGS=-L${KERNEL_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+ KERNEL_CXXFLAGS=-I${KERNEL_DIR}/include/salome
+
+ AC_SUBST(KERNEL_LDFLAGS)
+ AC_SUBST(KERNEL_CXXFLAGS)
else
AC_MSG_WARN("Cannot find compiled Kernel module distribution")
fi
AC_REQUIRE([CHECK_OPENGL])dnl
AC_REQUIRE([AC_LINKER_OPTIONS])dnl
-AC_CHECKING(for QT)
+AC_CHECKING(for Qt)
if test "x$OpenGL_ok" != "xyes" ; then
AC_MSG_WARN(Qt needs OpenGL correct configuration, check configure output)
AC_LANG_RESTORE
-AC_MSG_RESULT(for qt: $qt_ok)
+AC_MSG_RESULT(for Qt: $qt_ok)
# Save cache
AC_CACHE_SAVE
# Standard directory for installation
salomeincludedir = $(includedir)/@PACKAGE@
-libdir = $(prefix)/lib/@PACKAGE@
+libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@
bindir = $(prefix)/bin/@PACKAGE@
salomescriptdir = $(bindir)
# Module : SALOME
# $Header$
-salomeincludedir = $(includedir)/@PACKAGE@
+include $(top_srcdir)/salome_adm/unix/make_common_starter.am
+
salomeinclude_HEADERS = BasicsGenericDestructor.hxx
-libdir = $(prefix)/lib/@PACKAGE@
lib_LTLIBRARIES = libSALOMEBasics.la
libSALOMEBasics_la_SOURCES = \
BasicsGenericDestructor.cxx \