aclocal.m4 revision 33965
133965Sjdpdnl See whether we need to use fopen-bin.h rather than fopen-same.h. 233965SjdpAC_DEFUN(BFD_BINARY_FOPEN, 333965Sjdp[AC_REQUIRE([AC_CANONICAL_SYSTEM]) 433965Sjdpcase "${host}" in 533965Sjdpchangequote(,)dnl 633965Sjdpi[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows) 733965Sjdpchangequote([,])dnl 833965Sjdp AC_DEFINE(USE_BINARY_FOPEN) ;; 933965Sjdpesac])dnl 1033965Sjdp 1133965Sjdpdnl Get a default for CC_FOR_BUILD to put into Makefile. 1233965SjdpAC_DEFUN(BFD_CC_FOR_BUILD, 1333965Sjdp[# Put a plausible default for CC_FOR_BUILD in Makefile. 1433965Sjdpif test -z "$CC_FOR_BUILD"; then 1533965Sjdp if test "x$cross_compiling" = "xno"; then 1633965Sjdp CC_FOR_BUILD='$(CC)' 1733965Sjdp else 1833965Sjdp CC_FOR_BUILD=gcc 1933965Sjdp fi 2033965Sjdpfi 2133965SjdpAC_SUBST(CC_FOR_BUILD)])dnl 2233965Sjdp 2333965Sjdpdnl See whether we need a declaration for a function. 2433965SjdpAC_DEFUN(BFD_NEED_DECLARATION, 2533965Sjdp[AC_MSG_CHECKING([whether $1 must be declared]) 2633965SjdpAC_CACHE_VAL(bfd_cv_decl_needed_$1, 2733965Sjdp[AC_TRY_COMPILE([ 2833965Sjdp#include <stdio.h> 2933965Sjdp#ifdef HAVE_STRING_H 3033965Sjdp#include <string.h> 3133965Sjdp#else 3233965Sjdp#ifdef HAVE_STRINGS_H 3333965Sjdp#include <strings.h> 3433965Sjdp#endif 3533965Sjdp#endif 3633965Sjdp#ifdef HAVE_STDLIB_H 3733965Sjdp#include <stdlib.h> 3833965Sjdp#endif 3933965Sjdp#ifdef HAVE_UNISTD_H 4033965Sjdp#include <unistd.h> 4133965Sjdp#endif], 4233965Sjdp[char *(*pfn) = (char *(*)) $1], 4333965Sjdpbfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)]) 4433965SjdpAC_MSG_RESULT($bfd_cv_decl_needed_$1) 4533965Sjdpif test $bfd_cv_decl_needed_$1 = yes; then 4633965Sjdp bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 4733965Sjdp AC_DEFINE_UNQUOTED($bfd_tr_decl) 4833965Sjdpfi 4933965Sjdp])dnl 50