diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /kjs/configure.in.in | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjs/configure.in.in')
-rw-r--r-- | kjs/configure.in.in | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/kjs/configure.in.in b/kjs/configure.in.in new file mode 100644 index 000000000..1ffa6cedd --- /dev/null +++ b/kjs/configure.in.in @@ -0,0 +1,93 @@ +dnl KDE JavaScript specific configure tests + +AC_CHECK_HEADERS(ieeefp.h float.h) +AC_CHECK_LIB(m, finite, [ + AC_DEFINE_UNQUOTED(HAVE_FUNC_FINITE, 1, [Define if you have finite]) +]) +AC_CHECK_LIB(m, _finite, [ + AC_DEFINE_UNQUOTED(HAVE_FUNC__FINITE, 1, [Define if you have _finite]) +]) + +dnl The C99 standard says that isinf and isnan are macros, but they might +dnl be functions on some platforms. +AC_DEFUN([AC_CHECK_ISNAN], +[ + ac_save_libs="$LIBS" + LIBS="-lm" + AC_MSG_CHECKING([for isnan with <math.h>]) + AC_TRY_LINK( + [#include <math.h> + float f;], [return isnan(f)], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_FUNC_ISNAN], [1], [Define if you have isnan])], + AC_MSG_RESULT(no) + ) + LIBS="$ac_save_libs" +]) +AC_DEFUN([AC_CHECK_ISINF], +[ + ac_save_libs="$LIBS" + LIBS="-lm" + AC_MSG_CHECKING([for isinf with <math.h>]) + AC_TRY_LINK( + [#include <math.h> + float f;], [return isinf(f)], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_FUNC_ISINF], [1], [Define if you have isinf])], + AC_MSG_RESULT(no) + ) + LIBS="$ac_save_libs" +]) + +AC_CHECK_ISNAN +AC_CHECK_ISINF + +AC_DEFUN([AC_CHECK_PCREPOSIX], +[ + dnl define the configure option that disables pcre + AC_ARG_ENABLE(pcre,AC_HELP_STRING([--disable-pcre],[don't require libpcre (poor RegExp support in Javascript)]), + with_pcre=$enableval, with_pcre=yes) + + 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 <pcre.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) + +AM_CONFIG_HEADER([kjs/global.h]) |