Changeset 1391 for branches/GNU/src/gcc/fastjar/aclocal.m4
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
fastjar/aclocal.m4 (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 dir.info 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/fastjar/aclocal.m4
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 10 10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 11 dnl PARTICULAR PURPOSE. 12 13 14 dnl Host type sizes probe. 15 dnl By Kaveh R. Ghazi. One typo fixed since. 16 dnl 17 AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF], 18 [changequote(<<, >>)dnl 19 dnl The name to #define. 20 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl 21 dnl The cache variable name. 22 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl 23 changequote([, ])dnl 24 AC_MSG_CHECKING(size of $1) 25 AC_CACHE_VAL(AC_CV_NAME, 26 [for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence. 27 AC_TRY_COMPILE([#include "confdefs.h" 28 #include <sys/types.h> 29 $2 30 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) 31 if test x$AC_CV_NAME != x ; then break; fi 32 done 33 ]) 34 if test x$AC_CV_NAME = x ; then 35 AC_MSG_ERROR([cannot determine a size for $1]) 36 fi 37 AC_MSG_RESULT($AC_CV_NAME) 38 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) 39 undefine([AC_TYPE_NAME])dnl 40 undefine([AC_CV_NAME])dnl 41 ]) 42 43 dnl Utility macro used by next two tests. 44 dnl AC_EXAMINE_OBJECT(C source code, 45 dnl commands examining object file, 46 dnl [commands to run if compile failed]): 47 dnl 48 dnl Compile the source code to an object file; then convert it into a 49 dnl printable representation. All unprintable characters and 50 dnl asterisks (*) are replaced by dots (.). All white space is 51 dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the 52 dnl output, but runs of newlines are compressed to a single newline. 53 dnl Finally, line breaks are forcibly inserted so that no line is 54 dnl longer than 80 columns and the file ends with a newline. The 55 dnl result of all this processing is in the file conftest.dmp, which 56 dnl may be examined by the commands in the second argument. 57 dnl 58 AC_DEFUN([gcc_AC_EXAMINE_OBJECT], 59 [AC_LANG_SAVE 60 AC_LANG_C 61 dnl Next bit cribbed from AC_TRY_COMPILE. 62 cat > conftest.$ac_ext <<EOF 63 [#line __oline__ "configure" 64 #include "confdefs.h" 65 $1 66 ]EOF 67 if AC_TRY_EVAL(ac_compile); then 68 od -c conftest.o | 69 sed ['s/^[0-7]*[ ]*/ / 70 s/\*/./g 71 s/ \\n/*/g 72 s/ [0-9][0-9][0-9]/./g 73 s/ \\[^ ]/./g'] | 74 tr -d ' 75 ' | tr -s '*' ' 76 ' | fold | sed '$a\ 77 ' > conftest.dmp 78 $2 79 ifelse($3, , , else 80 $3 81 )dnl 82 fi 83 rm -rf conftest* 84 AC_LANG_RESTORE]) 85 86 dnl Host endianness probe. 87 dnl Differs from AC_C_BIGENDIAN in that it does not require 88 dnl running a program on the host. 89 dnl 90 AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN], 91 [AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian, 92 [ac_cv_c_compile_endian=unknown 93 gcc_AC_EXAMINE_OBJECT([ 94 #ifdef HAVE_LIMITS_H 95 # include <limits.h> 96 #endif 97 /* This structure must have no internal padding. */ 98 struct { 99 char prefix[sizeof "\nendian:" - 1]; 100 short word; 101 char postfix[2]; 102 } tester = { 103 "\nendian:", 104 #if SIZEOF_SHORT == 4 105 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | 106 #endif 107 ('A' << CHAR_BIT) | 'B', 108 'X', '\n' 109 };], 110 [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then 111 ac_cv_c_compile_endian=big-endian 112 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then 113 ac_cv_c_compile_endian=little-endian 114 fi]) 115 ]) 116 if test $ac_cv_c_compile_endian = unknown; then 117 AC_MSG_ERROR([*** unable to determine endianness]) 118 elif test $ac_cv_c_compile_endian = big-endian; then 119 AC_DEFINE(WORDS_BIG_ENDIAN, 1, 120 [Define if the host machine stores words of multi-word integers in 121 big-endian order.]) 122 fi 123 ]) 124 125 dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead 126 dnl of the usual 2. 127 AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG, 128 [AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg, 129 [AC_TRY_COMPILE([ 130 #include <sys/types.h> 131 #ifdef HAVE_SYS_STAT_H 132 # include <sys/stat.h> 133 #endif 134 #ifdef HAVE_UNISTD_H 135 # include <unistd.h> 136 #endif 137 #ifdef HAVE_DIRECT_H 138 # include <direct.h> 139 #endif], [mkdir ("foo", 0);], 140 gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)]) 141 if test $gcc_cv_mkdir_takes_one_arg = yes ; then 142 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a 143 single argument.]) 144 fi 145 ]) 12 146 13 147 # Do all the work for Automake. This macro actually does too much -- -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
