$NetBSD: patch-ab,v 1.4 2020/03/22 22:32:12 tnn Exp $ Check for #pragma weak --- acinclude.m4.orig 2018-05-25 17:50:44.000000000 +0000 +++ acinclude.m4 @@ -65,6 +65,25 @@ AC_DEFUN([EL_GETPW_R_DRAFT], [AC_MSG_RESULT(no)]) ]) +AC_DEFUN([EL_PRAGMA_WEAK], +[ + AC_MSG_CHECKING([if we can use C pragma weak SYM]) + AC_RUN_IFELSE([#include + #pragma weak ___non_existent_function___ + extern void ___non_existent_function___(void); + int main(void) { + if (___non_existent_function___ == 0) { + return 0; + } + else { + return 1; + } + }], + [AC_DEFINE([HAVE_PRAGMA_WEAK], 1, [Define to 1 if we can use C pragma weak SYM.]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(cross compiling; assumed `no')]) +]) dnl dnl deprecate option --enable-widec to turn on use of wide-character support