33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
$NetBSD: patch-ab,v 1.3 2015/05/17 21:19:12 rodent Exp $
|
|
|
|
Check for #pragma weak
|
|
|
|
--- acinclude.m4.orig 2015-03-25 20:02:28.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 use option --enable-widec to turn on use of wide-character support
|