[Uml-devel] branches/KDE/3.5/kdesdk/umbrello
Jonathan Riddell
jr at jriddell.org
Sun Aug 27 19:35:17 UTC 2006
SVN commit 577890 by jriddell:
Remove faulty libxml checks in umbrello/configure.in.in and move checks from
umbrello/umbrello/docgenerators/configure.in.in to umbrello/configure.in.in
M +65 -11 configure.in.in
D umbrello/docgenerators/configure.in.in
--- branches/KDE/3.5/kdesdk/umbrello/configure.in.in #577889:577890
@@ -42,25 +42,79 @@
dnl ])
-AC_LANG_SAVE
-AC_LANG_C
+HAVE_XSLT=yes
-AC_CHECK_HEADER(libxml2/libxml/xmlmemory.h,
- [have_libxml2=yes],
- [have_libxml2=no])
+KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin], [
+ AC_MSG_WARN([Could not find libxml2 anywhere, check ftp://xmlsoft.org/ for libxml >= 2.4.8. (we also keep a version of it in kdesupport for CVS users' convience)])
+ HELP_SUBDIR=
+ DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
+])
-if test "$have_libxml2" = "no"; then
- DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
+if test -n "$XML_CONFIG"; then
+ vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+ if test -n "$vers" && test "$vers" -ge 2004008
+ then
+ LIBXML_LIBS="`$XML_CONFIG --libs`"
+ LIBXML_RPATH=
+ for args in $LIBXML_LIBS; do
+ case $args in
+ -L*)
+ LIBXML_RPATH="$LIBXML_RPATH $args"
+ ;;
+ esac
+ done
+ LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"`
+ LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
+
+ KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
+ AC_DEFINE_UNQUOTED(XMLLINT, "$XMLLINT", [Defines the executable of xmllint])
+ else
+ AC_MSG_WARN([You need at least libxml 2.4.8])
+ HAVE_XSLT=no
+ DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
+ fi
fi
-AC_CHECK_HEADER(libxslt/xslt.h,
- [have_libxslt=yes],
- [have_libxslt=no])
+if test "$HAVE_XSLT" = yes; then
+ KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin], [
+ AC_MSG_WARN([Could not find libxslt anywhere, check ftp://xmlsoft.org/ for libxslt >= 1.0.7. (we also keep a version of it in kdesupport for CVS users' convience)])
+ HAVE_XSLT=no
+ DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
+ ])
+
+ if test -n "$XSLT_CONFIG"; then
+ vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+ if test -n "$vers" && test "$vers" -ge 1000007; then
+ LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
+ LIBXSLT_RPATH=
+ for args in $LIBXSLT_LIBS; do
+ case $args in
+ -L*)
+ LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
+ ;;
+ esac
+ done
+ LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"`
+ LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
+
+ else
+ AC_MSG_WARN([You need at least libxslt 1.0.7])
+ HAVE_XSLT=no
+ DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
+ fi
+ fi
+fi
+
if test "$have_libxslt" = "no"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
fi
-AC_LANG_RESTORE
+AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(LIBXSLT_CFLAGS)
+AC_SUBST(LIBXSLT_RPATH)
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(LIBXML_CFLAGS)
+AC_SUBST(LIBXML_RPATH)
More information about the umbrello-devel
mailing list