/[gcl]/gcl/binutils/libiberty/aclocal.m4
ViewVC logotype

Diff of /gcl/binutils/libiberty/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:36:23 2002 UTC revision 1.1.1.1.20.1 by camm, Fri Sep 30 02:10:42 2005 UTC
# Line 1  Line 1 
1  sinclude(aclibdl.m4)  sinclude(../config/accross.m4)
2    sinclude(../config/acx.m4)
3    sinclude(../config/no-executables.m4)
4    
5  dnl See whether strncmp reads past the end of its string parameters.  dnl See whether strncmp reads past the end of its string parameters.
6  dnl On some versions of SunOS4 at least, strncmp reads a word at a time  dnl On some versions of SunOS4 at least, strncmp reads a word at a time
# Line 71  main () Line 73  main ()
73    ac_cv_func_strncmp_works=no)    ac_cv_func_strncmp_works=no)
74  rm -f core core.* *.core])  rm -f core core.* *.core])
75  if test $ac_cv_func_strncmp_works = no ; then  if test $ac_cv_func_strncmp_works = no ; then
76    LIBOBJS="$LIBOBJS strncmp.o"    AC_LIBOBJ([strncmp])
77  fi  fi
78  ])  ])
79    
# Line 89  then AC_DEFINE(NEED_DECLARATION_ERRNO, 1 Line 91  then AC_DEFINE(NEED_DECLARATION_ERRNO, 1
91  fi  fi
92  ])  ])
93    
94  # FIXME: We temporarily define our own version of AC_PROG_CC.  This is  dnl See whether we need a declaration for a function.
95  # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We  AC_DEFUN(libiberty_NEED_DECLARATION,
96  # are probably using a cross compiler, which will not be able to fully  [AC_MSG_CHECKING([whether $1 must be declared])
97  # link an executable.  This should really be fixed in autoconf  AC_CACHE_VAL(libiberty_cv_decl_needed_$1,
98  # itself.  [AC_TRY_COMPILE([
99    #include "confdefs.h"
100  AC_DEFUN(LIB_AC_PROG_CC,  #include <stdio.h>
101  [AC_BEFORE([$0], [AC_PROG_CPP])dnl  #ifdef HAVE_STRING_H
102  AC_PROVIDE([AC_PROG_CC])  #include <string.h>
103  AC_CHECK_PROG(CC, gcc, gcc)  #else
104  if test -z "$CC"; then  #ifdef HAVE_STRINGS_H
105    AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)  #include <strings.h>
106    test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])  #endif
107  fi  #endif
108    #ifdef HAVE_STDLIB_H
109  AC_PROG_CC_GNU  #include <stdlib.h>
110    #endif
111  if test $ac_cv_prog_gcc = yes; then  #ifdef HAVE_UNISTD_H
112    GCC=yes  #include <unistd.h>
113    ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'  #endif],
114  dnl Check whether -g works, even if CFLAGS is set, in case the package  [char *(*pfn) = (char *(*)) $1],
115  dnl plays around with CFLAGS (such as to build both debugging and  libiberty_cv_decl_needed_$1=no, libiberty_cv_decl_needed_$1=yes)])
116  dnl normal versions of a library), tasteless as that idea is.  AC_MSG_RESULT($libiberty_cv_decl_needed_$1)
117    ac_test_CFLAGS="${CFLAGS+set}"  if test $libiberty_cv_decl_needed_$1 = yes; then
118    ac_save_CFLAGS="$CFLAGS"    AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
119    CFLAGS=              [Define if $1 is not declared in system header files.])
   AC_PROG_CC_G  
   if test "$ac_test_CFLAGS" = set; then  
     CFLAGS="$ac_save_CFLAGS"  
   elif test $ac_cv_prog_cc_g = yes; then  
     CFLAGS="-g -O2"  
   else  
     CFLAGS="-O2"  
   fi  
 else  
   GCC=  
   ac_libiberty_warn_cflags=  
   test "${CFLAGS+set}" = set || CFLAGS="-g"  
120  fi  fi
121  AC_SUBST(ac_libiberty_warn_cflags)  ])dnl
 ])  
122    
123  # Work around a bug in autoheader.  This can go away when we switch to  # Work around a bug in autoheader.  This can go away when we switch to
124  # autoconf >2.50.  The use of define instead of AC_DEFUN is  # autoconf >2.50.  The use of define instead of AC_DEFUN is
# Line 191  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_ Line 180  AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_
180          STACK_DIRECTION < 0 => grows toward lower addresses          STACK_DIRECTION < 0 => grows toward lower addresses
181          STACK_DIRECTION = 0 => direction of growth unknown])          STACK_DIRECTION = 0 => direction of growth unknown])
182  ])  ])
183    
184    # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
185    # ----------------------------------
186    # Don't include <ctype.h> because on OSF/1 3.0 it includes
187    # <sys/types.h> which includes <sys/select.h> which contains a
188    # prototype for select.  Similarly for bzero.
189    #
190    # This test used to merely assign f=$1 in main(), but that was
191    # optimized away by HP unbundled cc A.05.36 for ia64 under +O3,
192    # presumably on the basis that there's no need to do that store if the
193    # program is about to exit.  Conversely, the AIX linker optimizes an
194    # unused external declaration that initializes f=$1.  So this test
195    # program has both an external initialization of f, and a use of f in
196    # main that affects the exit status.
197    #
198    m4_define([AC_LANG_FUNC_LINK_TRY(C)],
199    [AC_LANG_PROGRAM(
200    [/* System header to define __stub macros and hopefully few prototypes,
201        which can conflict with char $1 (); below.
202        Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
203        <limits.h> exists even on freestanding compilers.  Under hpux,
204        including <limits.h> includes <sys/time.h> and causes problems
205        checking for functions defined therein.  */
206    #if defined (__STDC__) && !defined (_HPUX_SOURCE)
207    # include <limits.h>
208    #else
209    # include <assert.h>
210    #endif
211    /* Override any gcc2 internal prototype to avoid an error.  */
212    #ifdef __cplusplus
213    extern "C"
214    {
215    #endif
216    /* We use char because int might match the return type of a gcc2
217       builtin and then its argument prototype would still apply.  */
218    char $1 ();
219    /* The GNU C library defines this for functions which it implements
220        to always fail with ENOSYS.  Some functions are actually named
221        something starting with __ and the normal name is an alias.  */
222    #if defined (__stub_$1) || defined (__stub___$1)
223    choke me
224    #else
225    char (*f) () = $1;
226    #endif
227    #ifdef __cplusplus
228    }
229    #endif
230    ], [return f != $1;])])
231    

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.20.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26