From 171100c5ea6ed3d5cbad59cd80b0832905c30d0f Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 16 Oct 2007 11:55:31 +0000 Subject: [PATCH] Correction. --- salome_adm/unix/config_files/Makefile.am | 3 +- salome_adm/unix/config_files/check_libxml.m4 | 39 ++++++++++++++------ src/Container/Makefile.am | 2 +- src/LifeCycleCORBA/Makefile.am | 2 +- src/ModuleCatalog/Makefile.am | 4 +- src/ResourcesManager/Makefile.am | 5 ++- 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/salome_adm/unix/config_files/Makefile.am b/salome_adm/unix/config_files/Makefile.am index 0c325253e..bd95886a5 100644 --- a/salome_adm/unix/config_files/Makefile.am +++ b/salome_adm/unix/config_files/Makefile.am @@ -79,7 +79,8 @@ check_withihm.m4 \ enable_pthreads.m4 \ production.m4 \ pyembed.m4 \ -python.m4 +python.m4 \ +check_libxml.m4 dist_salome4depr_DATA=\ $(DEPRECATED_FILES) diff --git a/salome_adm/unix/config_files/check_libxml.m4 b/salome_adm/unix/config_files/check_libxml.m4 index 29fc1c31b..ad4841c00 100644 --- a/salome_adm/unix/config_files/check_libxml.m4 +++ b/salome_adm/unix/config_files/check_libxml.m4 @@ -1,38 +1,53 @@ AC_DEFUN([CHECK_LIBXML],[ -AC_CHECKING(for libxml) +AC_CHECKING(for libxml library) + +AC_SUBST(LIBXML_INCLUDES) +AC_SUBST(LIBXML_LIBS) + +LIBXML_INCLUDES="" +LIBXML_LIBS="" + +libxml_ok=no + +LOCAL_INCLUDES="" +LOCAL_LIBS="" -# Custom location of libxml2 package can be specified -# through LIBXML_DIR variable if test "x$LIBXML_DIR" != "x" then - CPPFLAGS="$CPPFLAGS -I$LIBXML_DIR/include/libxml2" - TMPLIBS="-L$LIBXML_DIR/lib -lxml2 $LIBS" + LOCAL_INCLUDES="-I$LIBXML_DIR/include/libxml2" + LOCAL_LIBS="-L$LIBXML_DIR/lib -lxml2" else - CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2" - TMPLIBS="-lxml2 $LIBS" + LOCAL_INCLUDES="-I/usr/include/libxml2" + LOCAL_LIBS="-lxml2" fi +dnl libxml2 headers + +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" AC_CHECK_HEADER(libxml/parser.h,libxml_ok="yes",libxml_ok="no") +CPPFLAGS="$CPPFLAGS_old" if test "x$libxml_ok" = "xyes" then + +dnl libxml2 library + LIBS_old=$LIBS - LIBS=$TMPLIBS + LIBS="$LIBS $LOCAL_LIBS" AC_CHECK_LIB(xml2,xmlInitParser,libxml_ok="yes",libxml_ok="no",) LIBS=$LIBS_old fi if test "x$libxml_ok" = "xyes" then - LIBS=$TMPLIBS + LIBXML_INCLUDES="$LOCAL_INCLUDES" + LIBXML_LIBS="$LOCAL_LIBS" fi AC_MSG_RESULT(for libxml: $libxml_ok) -LIBXML_LIBS=$LIBS -AC_SUBST(LIBXML_LIBS) - ])dnl dnl diff --git a/src/Container/Makefile.am b/src/Container/Makefile.am index 4b681f518..e9e6f065b 100644 --- a/src/Container/Makefile.am +++ b/src/Container/Makefile.am @@ -75,7 +75,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../HDFPersist \ -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ - @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ diff --git a/src/LifeCycleCORBA/Makefile.am b/src/LifeCycleCORBA/Makefile.am index 2012177ed..208e60a7b 100644 --- a/src/LifeCycleCORBA/Makefile.am +++ b/src/LifeCycleCORBA/Makefile.am @@ -58,7 +58,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../ResourcesManager \ -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ - @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ diff --git a/src/ModuleCatalog/Makefile.am b/src/ModuleCatalog/Makefile.am index b0a7fb204..83f138d3d 100644 --- a/src/ModuleCatalog/Makefile.am +++ b/src/ModuleCatalog/Makefile.am @@ -62,6 +62,7 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Utils \ -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ + @LIBXML_INCLUDES@ \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. @@ -70,7 +71,8 @@ COMMON_LIBS =\ ../Utils/libOpUtil.la \ ../SALOMELocalTrace/libSALOMELocalTrace.la \ ../Basics/libSALOMEBasics.la \ - $(top_builddir)/idl/libSalomeIDLKernel.la + $(top_builddir)/idl/libSalomeIDLKernel.la \ + @LIBXML_LIBS@ libSalomeCatalog_la_SOURCES =\ SALOME_ModuleCatalog_Handler.cxx \ diff --git a/src/ResourcesManager/Makefile.am b/src/ResourcesManager/Makefile.am index b617b4b2f..4205f9361 100755 --- a/src/ResourcesManager/Makefile.am +++ b/src/ResourcesManager/Makefile.am @@ -54,14 +54,15 @@ COMMON_CPPFLAGS=\ -I$(srcdir)/../Utils \ -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ - -I/usr/include/libxml2 \ + @LIBXML_INCLUDES@ \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ # This local variable defines the list of dependant libraries common to all target in this package. COMMON_LIBS =\ ../NamingService/libSalomeNS.la \ ../Utils/libOpUtil.la \ - $(top_builddir)/idl/libSalomeIDLKernel.la + $(top_builddir)/idl/libSalomeIDLKernel.la \ + @LIBXML_LIBS@ # # =============================================================== -- 2.39.2