X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=cc6f03d49a511563f95bed776edbf1c2ff27ae06;hp=0c15200e20bdfc1daf7c0f266b7c0a30d957661c;hb=11ca5f62994c7a14c4e500510bd242e1e721f8be;hpb=8f527f87c0b979d9c2598ef5c3394463af288468 diff --git a/aclocal.m4 b/aclocal.m4 index 0c15200e..cc6f03d4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.451 2008/08/04 10:26:11 tom Exp $ +dnl $Id: aclocal.m4,v 1.452 2008/08/16 23:19:46 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -4862,6 +4862,32 @@ fi ]) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WEAK_SYMBOLS version: 1 updated: 2008/08/16 19:18:06 +dnl --------------- +dnl Check for compiler-support for weak symbols. +dnl This works with "recent" gcc. +AC_DEFUN([CF_WEAK_SYMBOLS],[ +AC_CACHE_CHECK(if $CC supports weak symbols,cf_cv_weak_symbols,[ + +AC_TRY_COMPILE([ +#include ], +[ +#if defined(__GNUC__) +# if defined __USE_ISOC99 +# define _cat_pragma(exp) _Pragma(#exp) +# define _weak_pragma(exp) _cat_pragma(weak name) +# else +# define _weak_pragma(exp) +# endif +# define _declare(name) __extension__ extern __typeof__(name) name +# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak)) +#endif + +weak_symbol(fopen); +],[cf_cv_weak_symbols=yes],[cf_cv_weak_symbols=no]) +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49 dnl ------------------- dnl Allow library's ABI to be overridden. Generally this happens when a