1 dnl $Heimdal: have-pragma-weak.m4 15435 2005-06-16 19:45:52Z lha $
4 AC_DEFUN([AC_HAVE_PRAGMA_WEAK], [
5 if test "${enable_shared}" = "yes"; then
6 AC_MSG_CHECKING(for pragma weak)
7 AC_CACHE_VAL(ac_have_pragma_weak, [
9 cat > conftest_foo.$ac_ext <<'EOF'
10 [#]line __oline__ "configure"
12 #pragma weak foo = _foo
15 cat > conftest_bar.$ac_ext <<'EOF'
16 [#]line __oline__ "configure"
24 int main(int argc, char **argv) {
28 if AC_TRY_EVAL('CC -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest_foo.$ac_ext conftest_bar.$ac_ext 1>&AC_FD_CC'); then
29 ac_have_pragma_weak=yes
33 if test "$ac_have_pragma_weak" = "yes"; then
34 AC_DEFINE(HAVE_PRAGMA_WEAK, 1, [Define this if your compiler supports \`#pragma weak.'])dnl
36 AC_MSG_RESULT($ac_have_pragma_weak)