summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-09 09:25:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-09 09:25:56 (GMT)
commit07829dc8b97cddd8d45cd926670016a965589bf7 (patch)
tree67eef8086bee9665ad224fd6718f7022f167afa8
parentcc211af4eafca77e7d1ede7371c88c6d6fc44a80 (diff)
parent0ba9e042a2d74b086ec8c8fe1bc114a08a41cae1 (diff)
downloadtcl-07829dc8b97cddd8d45cd926670016a965589bf7.zip
tcl-07829dc8b97cddd8d45cd926670016a965589bf7.tar.gz
tcl-07829dc8b97cddd8d45cd926670016a965589bf7.tar.bz2
Put "-ltommath" in $MATH_LIBS in stead of $LIBS, so it won't be used by other checks in the configure script. Suggested by Pietro Cerutti.
-rwxr-xr-xunix/configure49
-rw-r--r--unix/configure.ac5
2 files changed, 18 insertions, 36 deletions
diff --git a/unix/configure b/unix/configure
index 04f1dbc..1098ba8 100755
--- a/unix/configure
+++ b/unix/configure
@@ -4681,12 +4681,13 @@ 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 "$as_me:${as_lineno-$LINENO}: checking for mp_log_u32 in -ltommath" >&5
+$as_echo_n "checking for mp_log_u32 in -ltommath... " >&6; }
+if ${ac_cv_lib_tommath_mp_log_u32+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltommath $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4705,40 +4706,22 @@ 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 :
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_tommath_mp_log_u32=yes
else
- ac_cv_search_mp_log_u32=no
+ ac_cv_lib_tommath_mp_log_u32=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_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"
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tommath_mp_log_u32" >&5
+$as_echo "$ac_cv_lib_tommath_mp_log_u32" >&6; }
+if test "x$ac_cv_lib_tommath_mp_log_u32" = xyes; then :
+ MATH_LIBS="$MATH_LIBS -ltommath"
else
- libtommath_ok=no
-
+ libtommath_ok=no
fi
fi
diff --git a/unix/configure.ac b/unix/configure.ac
index f0ba688..b893d1a 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -180,9 +180,8 @@ if test x"${libtommath_ok}" = x -o x"${libtommath_ok}" != xno; then
AC_CHECK_TYPE([mp_int],[],[libtommath_ok=no],[#include <tommath.h>])],[
libtommath_ok=no])
AS_IF([test $libtommath_ok = yes], [
- AC_SEARCH_LIBS([mp_log_u32],[tommath],[],[
- libtommath_ok=no
- ])])
+ AC_CHECK_LIB([tommath],[mp_log_u32],[MATH_LIBS="$MATH_LIBS -ltommath"],[
+ libtommath_ok=no])])
fi
AS_IF([test $libtommath_ok = yes], [
AC_DEFINE(TCL_WITH_EXTERNAL_TOMMATH, 1, [Tcl with external libtommath])