Commit | Line | Data |
---|---|---|
c906108c | 1 | dnl Process this file with autoconf to produce a configure script. |
b7026657 | 2 | AC_PREREQ(2.59)dnl |
c906108c | 3 | AC_INIT(Makefile.in) |
35695fd6 | 4 | AC_CONFIG_HEADER(cconfig.h:config.in) |
c906108c | 5 | |
35695fd6 AC |
6 | # Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around |
7 | # it by inlining the macro's contents. | |
8 | sinclude(../common/common.m4) | |
c906108c SS |
9 | |
10 | # Put a useful copy of CPP_FOR_TARGET in Makefile. | |
11 | # This is only used to build the target values header files. These files are | |
12 | # shipped with distributions so CPP_FOR_TARGET only needs to work in | |
13 | # developer's trees. This value is borrowed from ../../Makefile.in. | |
14 | CPP_FOR_TARGET="\` \ | |
15 | if test -f \$\${rootme}/../../gcc/Makefile ; then \ | |
16 | if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \ | |
17 | echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \ | |
18 | else \ | |
19 | echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \ | |
20 | fi; \ | |
21 | else \ | |
22 | if test '\$(host_canonical)' = '\$(target_canonical)' ; then \ | |
23 | echo \$(CC); \ | |
24 | else \ | |
25 | t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \ | |
26 | fi; \ | |
27 | fi\` -E" | |
28 | AC_SUBST(CPP_FOR_TARGET) | |
29 | ||
30 | # Set TARGET_SUBDIR, needed by CPP_FOR_TARGET. | |
31 | if test x"${host}" = x"${target}" ; then | |
32 | TARGET_SUBDIR="." | |
33 | else | |
34 | TARGET_SUBDIR=${target_alias} | |
35 | fi | |
36 | AC_SUBST(TARGET_SUBDIR) | |
37 | ||
38 | # These aren't all needed yet, but will be eventually. | |
764f1408 | 39 | AC_CHECK_HEADERS(stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h) |
33aa0cbb | 40 | AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate) |
697afb65 HPN |
41 | SIM_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino], |
42 | [struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid], | |
43 | [struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size], | |
44 | [struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime], | |
45 | [struct stat.st_mtime], [struct stat.st_ctime]]) | |
c906108c SS |
46 | AC_OUTPUT(Makefile, |
47 | [case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac]) |