1 dnl $Id: have-pragma-weak.m4,v 1.3.34.1 2004/04/01 07:27:33 joda Exp $
3 AC_DEFUN([AC_HAVE_PRAGMA_WEAK], [
4 if test "${enable_shared}" = "yes"; then
5 AC_MSG_CHECKING(for pragma weak)
6 AC_CACHE_VAL(ac_have_pragma_weak, [
8 cat > conftest_foo.$ac_ext <<'EOF'
9 [#]line __oline__ "configure"
11 #pragma weak foo = _foo
14 cat > conftest_bar.$ac_ext <<'EOF'
15 [#]line __oline__ "configure"
27 if AC_TRY_EVAL('CC -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest_foo.$ac_ext conftest_bar.$ac_ext 1>&AC_FD_CC'); then
28 ac_have_pragma_weak=yes
32 if test "$ac_have_pragma_weak" = "yes"; then
33 AC_DEFINE(HAVE_PRAGMA_WEAK, 1, [Define this if your compiler supports \`#pragma weak.'])dnl
35 AC_MSG_RESULT($ac_have_pragma_weak)