--Boundary-00=_TxDr++xCf0sVnkQ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sunday 27 April 2003 19:33, Thomas Gufler wrote: > Hi, > > Karbon can't use the new fontconfig 2.2(released a few days ago). Fontconfig > 2.2 doesn't have a fontconfig-config (instead AFAIK pkgconfig). I get the > following error message when running configure. > > You're missing fontconfig 1.0.1 or newer. karbon will not have text support. > You can download fontconfig from http://fontconfig.org/ The problem is that I don't know whether KOffice (or any other KDE module) should use pkg-config, no, require pkg-config during the build time. I quickly extended the test for fontconfig that it works the following way: - If fontconfig-config is found pkg-config isn't needed - If fontconfig-config is NOT found and pkg-config is missing we can't test for fontconfig.pc - If fontconfig-config is NOT found and pkg-config exists, we check for (and use fontconfig.pc). I hope that's okay. I didn't commit the patch, as I don't know the policy for pkg-config usage, but that patches should be acceptable. The first patch has to be applied inside the karbon directory, and the second one in the koffice directory. Ciao, Werner P.S. After applying the patch you have to re-run make -f Makefile.cvs --Boundary-00=_TxDr++xCf0sVnkQ Content-Type: text/x-diff; charset="iso-8859-1"; name="karbon-config.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="karbon-config.diff" Index: configure.in.in =================================================================== RCS file: /home/kde/koffice/karbon/configure.in.in,v retrieving revision 1.21 diff -b -u -p -r1.21 configure.in.in --- configure.in.in 30 Nov 2002 17:23:39 -0000 1.21 +++ configure.in.in 27 Apr 2003 20:21:00 -0000 @@ -61,7 +61,7 @@ AC_SUBST(LIBART_RPATH) # Check for fontconfig KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [ - AC_MSG_WARN([Could not find fontconfig anywhere, please check http://fontconfig.org]) + AC_MSG_WARN([Could not find fontconfig-config anywhere]) ]) if test -n "$FONTCONFIG_CONFIG"; then @@ -82,6 +82,10 @@ if test -n "$FONTCONFIG_CONFIG"; then else AC_MSG_WARN([You need at least fontconfig 1.0.1]) fi +fi + +if test -z "$FONTCONFIG_CONFIG"; then + KOFFICE_PKG_CHECK_MODULES(FONTCONFIG, fontconfig) fi AC_SUBST(FONTCONFIG_LIBS) --Boundary-00=_TxDr++xCf0sVnkQ Content-Type: text/x-diff; charset="iso-8859-1"; name="koffice-config.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="koffice-config.diff" Index: configure.in.in =================================================================== RCS file: /home/kde/koffice/configure.in.in,v retrieving revision 1.28 diff -b -u -p -r1.28 configure.in.in --- configure.in.in 14 Apr 2003 11:56:45 -0000 1.28 +++ configure.in.in 27 Apr 2003 20:23:08 -0000 @@ -48,3 +48,65 @@ AC_SUBST(LIBMAGICK_CPPFLAGS) AC_SUBST(LIBMAGICK_RPATH) # End of ImageMagick check + +########################################################################## +# This last check is copied from kdenonbeta/gsf/configure.in.in +########################################################################## +# KOFFICE_PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +# defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +# also defines GSTUFF_PKG_ERRORS on error +# Note: This is specially tweaked for karbon's fontconfig check. Please fix +# it before using it for other tests :-) +AC_DEFUN(KOFFICE_PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + echo "***" + echo "*** Due to that we can't perform the check for fontconfig..." # added for karbon (Werner) + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) +# else # removed for karbon (Werner) +# ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) --Boundary-00=_TxDr++xCf0sVnkQ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ____________________________________ koffice mailing list koffice@mail.kde.org To unsubscribe please visit: http://mail.kde.org/mailman/listinfo/koffice --Boundary-00=_TxDr++xCf0sVnkQ--