aclocal.m4 revision 33965
1254885Sdumbbelldnl See whether we need to use fopen-bin.h rather than fopen-same.h. 2254885SdumbbellAC_DEFUN(BFD_BINARY_FOPEN, 3254885Sdumbbell[AC_REQUIRE([AC_CANONICAL_SYSTEM]) 4254885Sdumbbellcase "${host}" in 5254885Sdumbbellchangequote(,)dnl 6254885Sdumbbelli[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows) 7254885Sdumbbellchangequote([,])dnl 8254885Sdumbbell AC_DEFINE(USE_BINARY_FOPEN) ;; 9254885Sdumbbellesac])dnl 10254885Sdumbbell 11254885Sdumbbelldnl Get a default for CC_FOR_BUILD to put into Makefile. 12254885SdumbbellAC_DEFUN(BFD_CC_FOR_BUILD, 13254885Sdumbbell[# Put a plausible default for CC_FOR_BUILD in Makefile. 14254885Sdumbbellif test -z "$CC_FOR_BUILD"; then 15254885Sdumbbell if test "x$cross_compiling" = "xno"; then 16254885Sdumbbell CC_FOR_BUILD='$(CC)' 17254885Sdumbbell else 18254885Sdumbbell CC_FOR_BUILD=gcc 19254885Sdumbbell fi 20254885Sdumbbellfi 21254885SdumbbellAC_SUBST(CC_FOR_BUILD)])dnl 22254885Sdumbbell 23254885Sdumbbelldnl See whether we need a declaration for a function. 24254885SdumbbellAC_DEFUN(BFD_NEED_DECLARATION, 25254885Sdumbbell[AC_MSG_CHECKING([whether $1 must be declared]) 26254885SdumbbellAC_CACHE_VAL(bfd_cv_decl_needed_$1, 27254885Sdumbbell[AC_TRY_COMPILE([ 28254885Sdumbbell#include <stdio.h> 29254885Sdumbbell#ifdef HAVE_STRING_H 30254885Sdumbbell#include <string.h> 31254885Sdumbbell#else 32254885Sdumbbell#ifdef HAVE_STRINGS_H 33254885Sdumbbell#include <strings.h> 34254885Sdumbbell#endif 35254885Sdumbbell#endif 36254885Sdumbbell#ifdef HAVE_STDLIB_H 37254885Sdumbbell#include <stdlib.h> 38254885Sdumbbell#endif 39254885Sdumbbell#ifdef HAVE_UNISTD_H 40254885Sdumbbell#include <unistd.h> 41254885Sdumbbell#endif], 42254885Sdumbbell[char *(*pfn) = (char *(*)) $1], 43254885Sdumbbellbfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)]) 44254885SdumbbellAC_MSG_RESULT($bfd_cv_decl_needed_$1) 45254885Sdumbbellif test $bfd_cv_decl_needed_$1 = yes; then 46254885Sdumbbell bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 47254885Sdumbbell AC_DEFINE_UNQUOTED($bfd_tr_decl) 48254885Sdumbbellfi 49254885Sdumbbell])dnl 50254885Sdumbbell