configure.in.in in kjs
Eva Brucherseifer
eva.brucherseifer at basyskom.de
Thu Mar 9 10:05:46 GMT 2006
Hi,
kjs can use the pcre library, but there seems to be a problem with the
configure.in.in file in the kjs directory.
In order to check for pcre configure.in.in contains the following lines:
---------------------------------------
if test "$with_pcre" = "yes"; then
KDE_FIND_PATH(pcre-config, PCRE_CONFIG, [${exec_prefix}/bin
${prefix}/bin], [PCRE_CONFIG="" ])
if test -n "$PCRE_CONFIG" && $PCRE_CONFIG --libs >/dev/null 2>&1; then
LIBPCRE=`$PCRE_CONFIG --libs-posix | sed -e "s,-L/usr/lib ,,"`
PCRECFLAGS=`$PCRE_CONFIG --cflags`
else
LIBPCRE="-lpcre -lpcreposix"
PCRECFLAGS=
fi
AC_CACHE_VAL(ac_cv_have_pcreposix, [
ac_save_libs="$LIBS"
LIBS="$LIBPCRE"
ac_CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PCRECFLAGS $all_includes"
ac_LDFLAGS_save="$LDFLAGS"
LDFLAGS="$LDFLAGS $all_libraries"
AC_TRY_LINK(
[#include <pcreposix.h>],
[regfree(0);],
[ac_cv_have_pcreposix="yes"],
[ac_cv_have_pcreposix="no"]
)
LIBS="$ac_save_libs"
LDFLAGS="$ac_LDFLAGS_save"
CPPFLAGS="$ac_CPPFLAGS_save"
])
if test "$ac_cv_have_pcreposix" = "yes"; then
AC_DEFINE(HAVE_PCREPOSIX, 1, [Define if you have pcreposix libraries
and header files.])
else
AC_MSG_ERROR([You're missing libpcre.
Download libpcre from http://www.pcre.org or find a binary package for your
platform.
Alternatively, you can specify --disable-pcre, but some web pages - using
regular
expressions in Javascript code - will not work correctly, the regexp support
being
quite limited if libpcre isn't present.])
fi
fi
])
AC_CHECK_PCREPOSIX
AC_SUBST(LIBPCRE)
AC_SUBST(PCRECFLAGS)
---------------------------------------
This works perfectly on common desktop installations, as libpcre and
libpcreposix are located in /usr/lib/
Please note the line
LIBPCRE=`$PCRE_CONFIG --libs-posix | sed -e "s,-L/usr/lib ,,"`
If you crosscompile Konqueror/Embedded for an embedded target, the libs are
usually installed in other directories and here comes the problem.
pcre-config returns something like this:
LIBPCRE =
-L/home/luckas/svn-slimfast/phone-oe-arm/oe-build/tmp/staging/arm-linux/lib
-lpcreposix -lpcre
Unlike -L/usr/lib the -L term is not removed from the LIBPCRE variable and
this make the library path term end up in the dependencies:
LIB_KJSHTML = $(top_builddir)/konq-embed/kdesrc/khtml/ecma/libkjs_html_i.la
$(top_builddir)/konq-embed/kdesrc/kjs/libkjs.la $(LIBPCRE)
konqueror_DEPENDENCIES = $(LIB_KJSHTML) $(LIB_KHTML) $(LIB_ADDONS)
konqueror$(EXEEXT): $(konqueror_OBJECTS) $(konqueror_DEPENDENCIES)
Which doesn't work:
make[5]: *** No rule to make target
`-L/home/luckas/svn-slimfast/phone-oe-arm/oe-build/tmp/staging/arm-linux/lib',
needed by `konqueror'. Stop.
We did a quick fix by removing pcre-config, so that the fallback is used:
LIBPCRE = -lpcre -lpcreposix
As I am no expert in configure scripts, maybe someone else wants to have a
look at this?
BTW - in Suse pcreposix is part of pcre-devel instead of pcre, isn't it
strange, that KDE software uses software from devel packages?
Greetings,
eva
--
Eva Brucherseifer
General Manager
basysKom GmbH
Robert-Bosch-Str. 7 | 64293 Darmstadt | Germany
Tel: +49 6151 3969-961 | Fax: -736 | Mobile: +49 170 5533642
eva.brucherseifer at basyskom.de | www.basyskom.de
More information about the kfm-devel
mailing list