2004-01-08 13:34:31 +00:00
|
|
|
dnl -*- shell-script -*-
|
|
|
|
dnl
|
2004-11-22 01:38:40 +00: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 20:09:25 +00:00
|
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
dnl University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
dnl All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
dnl $COPYRIGHT$
|
|
|
|
dnl
|
|
|
|
dnl Additional copyrights may follow
|
|
|
|
dnl
|
2004-01-08 13:34:31 +00:00
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
|
|
|
|
2005-07-09 18:52:53 +00:00
|
|
|
# OMPI_C_WEAK_SYMBOLS()
|
|
|
|
# ---------------------
|
|
|
|
# sets OMPI_C_WEAK_SYMBOLS=1 if C compiler has support for weak symbols
|
2004-06-07 15:33:53 +00:00
|
|
|
define([OMPI_C_WEAK_SYMBOLS],[
|
2005-07-09 18:52:53 +00:00
|
|
|
AC_CACHE_CHECK([for weak symbols],
|
|
|
|
[ompi_cv_c_weak_symbols],
|
|
|
|
[AC_LINK_IFELSE([AC_LANG_SOURCE([[#pragma weak fake = real
|
2004-01-08 13:34:31 +00:00
|
|
|
extern int fake(int i);
|
|
|
|
int real(int i);
|
|
|
|
int real(int i) { return i; }
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
return fake(3);
|
2005-07-09 18:52:53 +00:00
|
|
|
}]])],
|
|
|
|
[ompi_cv_c_weak_symbols="yes"],
|
|
|
|
[ompi_cv_c_weak_symbols="no"])])
|
2004-01-08 13:34:31 +00:00
|
|
|
|
2005-07-09 18:52:53 +00:00
|
|
|
AS_IF([test "$ompi_cv_c_weak_symbols" = "yes"],
|
|
|
|
[OMPI_C_HAVE_WEAK_SYMBOLS=1], [OMPI_C_HAVE_WEAK_SYMBOLS=0])
|
|
|
|
]) dnl
|