2004-01-08 16:34:31 +03:00
|
|
|
dnl -*- shell-script -*-
|
|
|
|
dnl
|
2004-11-22 04:38:40 +03:00
|
|
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
dnl All rights reserved.
|
|
|
|
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
dnl All rights reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
dnl University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
dnl All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
dnl $COPYRIGHT$
|
|
|
|
dnl
|
|
|
|
dnl Additional copyrights may follow
|
|
|
|
dnl
|
2004-01-08 16:34:31 +03:00
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
define([OMPI_C_WEAK_SYMBOLS],[
|
2004-01-08 16:34:31 +03:00
|
|
|
#
|
|
|
|
# Arguments: None
|
|
|
|
#
|
|
|
|
# Depdencies: None
|
|
|
|
#
|
|
|
|
# Check to see if the C compiler can handle weak symbols
|
|
|
|
#
|
2004-06-07 19:33:53 +04:00
|
|
|
# Sets OMPI_C_WEAK_SYMBOLS=1 if the C compiler has support for weak
|
2004-01-08 16:34:31 +03:00
|
|
|
# symbols.
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for weak symbols])
|
|
|
|
AC_LINK_IFELSE(AC_LANG_SOURCE([[#pragma weak fake = real
|
|
|
|
extern int fake(int i);
|
|
|
|
int real(int i);
|
|
|
|
int real(int i) { return i; }
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
return fake(3);
|
2004-06-07 19:33:53 +04:00
|
|
|
}]]), ompi_happy=1, ompi_happy=0)
|
|
|
|
if test "$ompi_happy" = "1"; then
|
2004-01-08 16:34:31 +03:00
|
|
|
AC_MSG_RESULT([yes])
|
2004-06-07 19:33:53 +04:00
|
|
|
OMPI_C_HAVE_WEAK_SYMBOLS=1
|
2004-01-08 16:34:31 +03:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
2004-06-07 19:33:53 +04:00
|
|
|
OMPI_C_HAVE_WEAK_SYMBOLS=0
|
2004-01-08 16:34:31 +03:00
|
|
|
fi
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
unset ompi_happy])dnl
|