summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure104
1 files changed, 104 insertions, 0 deletions
diff --git a/unix/configure b/unix/configure
index 9fb8ddc..42f45a1 100755
--- a/unix/configure
+++ b/unix/configure
@@ -705,6 +705,9 @@ TCL_LIBS
LIBOBJS
AR
RANLIB
+TOMMATH_INCLUDE
+TOMMATH_SRCS
+TOMMATH_OBJS
ZLIB_INCLUDE
ZLIB_SRCS
ZLIB_OBJS
@@ -4652,6 +4655,107 @@ fi
$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
+#------------------------------------------------------------------------
+# Add stuff for libtommath
+
+libtommath_ok=yes
+ac_fn_c_check_header_mongrel "$LINENO" "tommath.h" "ac_cv_header_tommath_h" "$ac_includes_default"
+if test "x$ac_cv_header_tommath_h" = xyes; then :
+
+ ac_fn_c_check_type "$LINENO" "mp_int" "ac_cv_type_mp_int" "#include <tommath.h>
+"
+if test "x$ac_cv_type_mp_int" = xyes; then :
+
+else
+ libtommath_ok=no
+fi
+
+else
+
+ libtommath_ok=no
+fi
+
+
+if test $libtommath_ok = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mp_log_u32" >&5
+$as_echo_n "checking for library containing mp_log_u32... " >&6; }
+if ${ac_cv_search_mp_log_u32+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mp_log_u32 ();
+int
+main ()
+{
+return mp_log_u32 ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' tommath; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_mp_log_u32=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_mp_log_u32+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_mp_log_u32+:} false; then :
+
+else
+ ac_cv_search_mp_log_u32=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mp_log_u32" >&5
+$as_echo "$ac_cv_search_mp_log_u32" >&6; }
+ac_res=$ac_cv_search_mp_log_u32
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+
+ libtommath_ok=no
+
+fi
+
+fi
+if test $libtommath_ok = yes; then :
+
+
+$as_echo "#define TCL_WITH_EXTERNAL_TOMMATH 1" >>confdefs.h
+
+
+else
+
+ TOMMATH_OBJS=\${TOMMATH_OBJS}
+
+ TOMMATH_SRCS=\${TOMMATH_SRCS}
+
+ TOMMATH_INCLUDE=-I\${TOMMATH_DIR}
+
+
+fi
+
#--------------------------------------------------------------------
# The statements below define a collection of compile flags. This
# macro depends on the value of SHARED_BUILD, and should be called