]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - aclocal.m4
ncurses 6.3 - patch 20220729
[ncurses.git] / aclocal.m4
index b1e5ab64bf01d3c352767274538030f056d027e7..72954be317dfd8af79b8199fd7a656b4cfcb8872 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.1001 2022/01/23 00:15:35 tom Exp $
+dnl $Id: aclocal.m4,v 1.1007 2022/07/27 23:34:31 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -5740,7 +5740,7 @@ AC_ARG_WITH(manpage-tbl,
 AC_MSG_RESULT($MANPAGE_TBL)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MAN_PAGES version: 51 updated: 2021/01/05 16:29:19
+dnl CF_MAN_PAGES version: 52 updated: 2022/02/05 12:31:08
 dnl ------------
 dnl Try to determine if the man-pages on the system are compressed, and if
 dnl so, what format is used.  Use this information to construct a script that
@@ -5813,7 +5813,8 @@ INSTALL_DATA="$INSTALL_DATA"
 transform="$program_transform_name"
 
 TMP=\${TMPDIR:=/tmp}/man\$\$
-trap "rm -f \$TMP" 0 1 2 3 15
+trap "rm -f \$TMP; exit 1" 1 2 3 15
+trap "rm -f \$TMP" 0
 
 form=\[$]1
 shift || exit 1
@@ -6093,7 +6094,7 @@ CF_UPPER(cf_map_lib_basename,$2)
 eval $1="\$${cf_map_lib_basename}_NAME"
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MATH_LIB version: 10 updated: 2020/12/31 18:40:20
+dnl CF_MATH_LIB version: 11 updated: 2022/07/27 19:01:48
 dnl -----------
 dnl Checks for libraries.  At least one UNIX system, Apple Macintosh
 dnl Rhapsody 5.5, does not have -lm.  We cannot use the simpler
@@ -6103,18 +6104,42 @@ AC_DEFUN([CF_MATH_LIB],
 AC_CACHE_CHECK(if -lm needed for math functions,
        cf_cv_need_libm,[
        AC_TRY_LINK([
-       #include <stdio.h>
-       #include <stdlib.h>
-       #include <math.h>
+               #include <stdio.h>
+               #include <stdlib.h>
+               #include <math.h>
        ],
        [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)],
        [cf_cv_need_libm=no],
        [cf_cv_need_libm=yes])])
+
 if test "$cf_cv_need_libm" = yes
 then
-ifelse($1,,[
-       CF_ADD_LIB(m)
-],[$1=-lm])
+
+       cf_save_LIBS="$LIBS"
+       LIBS="$LIBS -lm"
+       AC_CACHE_CHECK(if -lm is available for math functions,
+       cf_cv_have_libm,[
+       AC_TRY_LINK([
+               #include <stdio.h>
+               #include <stdlib.h>
+               #include <math.h>
+       ],
+       [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)],
+       [cf_cv_have_libm=yes],
+       [cf_cv_have_libm=no])])
+       LIBS="$cf_save_LIBS"
+
+       if test "$cf_cv_have_libm" = yes
+       then
+               ifelse($1,,[CF_ADD_LIB(m)],[$1=-lm])
+       fi
+else
+       cf_cv_have_libm=yes
+fi
+
+if test "$cf_cv_have_libm" = yes
+then
+       AC_DEFINE(HAVE_MATH_FUNCS,1,[Define to 1 if math functions are available])
 fi
 ])
 dnl ---------------------------------------------------------------------------
@@ -9317,7 +9342,7 @@ if test "x$with_pcre2" != xno ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PKG_CONFIG_LIBDIR version: 19 updated: 2021/11/20 14:57:36
+dnl CF_WITH_PKG_CONFIG_LIBDIR version: 20 updated: 2022/01/29 17:03:42
 dnl -------------------------
 dnl Allow the choice of the pkg-config library directory to be overridden.
 dnl
@@ -9349,7 +9374,7 @@ AC_ARG_WITH(pkg-config-libdir,
        [cf_search_path=$withval],
        [test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir])
 
-case x$cf_search_path in
+case "x$cf_search_path" in
 (xlibdir)
        PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
        AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
@@ -9357,6 +9382,9 @@ case x$cf_search_path in
        ;;
 (x)
        ;;
+(x/*\ *)
+       PKG_CONFIG_LIBDIR=
+       ;;
 (x/*)
        PKG_CONFIG_LIBDIR="$cf_search_path"
        AC_MSG_RESULT($PKG_CONFIG_LIBDIR)