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
-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 =\
-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 =\
-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.
../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 \
-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@
#
# ===============================================================