blob: 005d4349ff99f585a0972bbe5de5063509e60bbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$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 <stdio.h>
+ #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
|