summaryrefslogtreecommitdiffstats
path: root/kcalc/knumber/configure.in.in
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /kcalc/knumber/configure.in.in
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.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/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcalc/knumber/configure.in.in')
-rw-r--r--kcalc/knumber/configure.in.in73
1 files changed, 73 insertions, 0 deletions
diff --git a/kcalc/knumber/configure.in.in b/kcalc/knumber/configure.in.in
new file mode 100644
index 0000000..8ef670b
--- /dev/null
+++ b/kcalc/knumber/configure.in.in
@@ -0,0 +1,73 @@
+AC_DEFUN([KDE_C_LONG_DOUBLE],
+[
+ AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
+ [
+ ac_save_LIBS="$LIBS"
+ LIBS="-lm $LIBS"
+ AC_TRY_RUN(
+ [
+#define _ISOC99_SOURCE 1
+#define _GNU_SOURCE 1
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+int main() {
+/* The Stardent Vistra knows sizeof(long double), but does not support it. */
+long double foo = 1.0;
+char buffer[10];
+/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+int result = (sizeof(long double) <= sizeof(double));
+/* the following is needed for a broken printf in glibc2 */
+if (!result) {
+ foo = foo * 3;
+ sprintf(buffer,"%0.0Lf",foo);
+ result = strcmp(buffer, "3");
+/* and now something mean ;-) */
+ foo = powl(fabsl(foo), 1);
+}
+exit(result); }
+ ],
+ ac_cv_c_long_double=yes, ac_cv_c_long_double=no,
+ ac_cv_c_long_double=no
+ )
+ LIBS="$ac_save_LIBS"
+ ])
+ if test $ac_cv_c_long_double = yes; then
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have support for long double in printf])
+ fi
+])
+KDE_C_LONG_DOUBLE
+
+have_l_funcs=yes
+AC_CHECK_LIB(m, sqrtl,,have_l_funcs=no)
+
+if test "xyes" = "x$have_l_funcs" ; then
+ AC_DEFINE(HAVE_L_FUNCS,1,[Define if you have *l math functions (absl, ...)])
+fi
+
+LIBGMP=
+KDE_CHECK_HEADER([gmp.h], [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ kde_save_LIBS=$LIBS
+ LIBS="$all_libraries -lgmp"
+ AC_TRY_LINK(dnl
+ [
+ #include <gmp.h>
+ ],
+ [
+ mpz_t _mpz;
+ mpz_init_set_si(_mpz, 0);
+ ],
+ [LIBGMP="-lgmp"],
+ [
+ DO_NOT_COMPILE="$DO_NOT_COMPILE kcalc"
+ ])
+ LIBS=$kde_save_LIBS
+ AC_LANG_RESTORE
+
+])
+AC_SUBST(LIBGMP)