dnl***************************************************************************
-dnl Copyright (c) 2003-2019,2020 Free Software Foundation, Inc. *
+dnl Copyright 2018-2019,2020 Thomas E. Dickey *
+dnl Copyright 2003-2017,2018 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
dnl authorization. *
dnl***************************************************************************
dnl
-dnl $Id: aclocal.m4,v 1.169 2020/01/12 00:01:40 tom Exp $
+dnl $Id: aclocal.m4,v 1.176 2020/02/09 02:02:53 tom Exp $
dnl
dnl Author: Thomas E. Dickey
dnl
test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map,[Define as needed to override ncurses prefix _nc_])
])
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_CHECK_DATA version: 7 updated: 2018/01/03 04:47:33
+dnl CF_CURSES_CHECK_DATA version: 9 updated: 2020/02/08 21:00:26
dnl --------------------
dnl Check if curses.h defines the given data/variable.
dnl Use this after CF_NCURSES_CONFIG or CF_CURSES_CONFIG.
do
AC_MSG_CHECKING(for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h})
-AC_TRY_COMPILE(CF__CURSES_HEAD,[
-void *foo = &($cf_data)
-],[cf_result=yes
+AC_TRY_COMPILE(CF__CURSES_HEAD,
+CF__CURSES_DATA(foo,$cf_data)
+,[cf_result=yes
],[cf_result=no])
AC_MSG_RESULT($cf_result)
extern char $cf_data;
int main(void)
{
- void *foo = &($cf_data);
- fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
+ ]CF__CURSES_DATA(foo,$cf_data)[
${cf_cv_main_return:-return}(foo == 0);
}],[cf_result=yes
],[cf_result=no],[
AC_TRY_LINK(CF__CURSES_HEAD
[extern char $cf_data;],[
do {
- void *foo = &($cf_data);
- fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
+ ]CF__CURSES_DATA(foo,$cf_data)[
${cf_cv_main_return:-return}(foo == 0);
} while (0)
],[cf_result=yes],[cf_result=no])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SIG_ATOMIC_T version: 3 updated: 2012/10/04 20:12:20
+dnl CF_SIG_ATOMIC_T version: 4 updated: 2020/01/18 12:30:44
dnl ---------------
-dnl signal handler, but there are some gcc depedencies in that recommendation.
+dnl signal handler, but there are some gcc dependencies in that recommendation.
dnl Try anyway.
AC_DEFUN([CF_SIG_ATOMIC_T],
[
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_X_ATHENA_CPPFLAGS version: 7 updated: 2020/01/11 17:15:41
+dnl CF_X_ATHENA_CPPFLAGS version: 8 updated: 2020/01/16 05:21:56
dnl --------------------
dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
AC_MSG_RESULT($cf_result)
CF_RESTORE_XTRA_FLAGS([CF_X_ATHENA_CPPFLAGS])
if test "$cf_result" = yes ; then
- cf_x_athena_inc=$cf_path
+ test "$cf_path" = default && cf_x_athena_inc=default
+ test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
break
fi
fi
done
if test -z "$cf_x_athena_inc" ; then
- AC_MSG_WARN(
-[Unable to successfully find Athena header files with test program])
+ AC_MSG_WARN([Unable to find Athena header files])
elif test "$cf_x_athena_inc" != default ; then
CF_APPEND_TEXT(CPPFLAGS,-I$cf_x_athena_inc)
fi
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF__CURSES_DATA version: 2 updated: 2020/02/08 21:00:26
+dnl ---------------
+dnl Attempt to make a copy of a curses data item. This is needed in the
+dnl check-data configure tests when using ncurses, because the symbol may be
+dnl actually a function return-value. That could happen if the linker is
+dnl broken (does not resolve data-only references), or if ncurses is configured
+dnl to support re-entrant code.
+dnl $1 = target
+dnl $2 = source
+define([CF__CURSES_DATA],[
+#if defined($2) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
+ const void *$1 = (const void *)($2);
+#else
+ const void *$1 = &($2);
+#endif
+ fprintf(stderr, "testing linkage of $2:%p\n", (const void *)$1);
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
dnl ---------------
dnl Define a reusable chunk which includes <curses.h> and <term.h> when they