sim: punt WITH_DEVICES & tconfig.h support
[deliverable/binutils-gdb.git] / sim / common / configure.ac
CommitLineData
c906108c 1dnl Process this file with autoconf to produce a configure script.
6ffe910a 2AC_PREREQ(2.64)dnl
c906108c
SS
3AC_INIT(Makefile.in)
4
6ffe910a 5SIM_AC_COMMON(cconfig.h)
c906108c
SS
6
7# Put a useful copy of CPP_FOR_TARGET in Makefile.
8# This is only used to build the target values header files. These files are
9# shipped with distributions so CPP_FOR_TARGET only needs to work in
10# developer's trees. This value is borrowed from ../../Makefile.in.
11CPP_FOR_TARGET="\` \
12 if test -f \$\${rootme}/../../gcc/Makefile ; then \
13 if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \
14 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \
15 else \
16 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \
17 fi; \
18 else \
19 if test '\$(host_canonical)' = '\$(target_canonical)' ; then \
20 echo \$(CC); \
21 else \
22 t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \
23 fi; \
24 fi\` -E"
25AC_SUBST(CPP_FOR_TARGET)
26
27# Set TARGET_SUBDIR, needed by CPP_FOR_TARGET.
28if test x"${host}" = x"${target}" ; then
29 TARGET_SUBDIR="."
30else
31 TARGET_SUBDIR=${target_alias}
32fi
33AC_SUBST(TARGET_SUBDIR)
34
35# These aren't all needed yet, but will be eventually.
764f1408 36AC_CHECK_HEADERS(stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h)
a13852d9 37AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate)
0aec8eb1 38AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
697afb65
HPN
39[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid],
40[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size],
41[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime],
0aec8eb1
RW
42[struct stat.st_mtime], [struct stat.st_ctime]], [], [],
43[[#ifdef HAVE_SYS_TYPES_H
44#include <sys/types.h>
45#endif
46#ifdef HAVE_SYS_STAT_H
47#include <sys/stat.h>
48#endif]])
75005b3a
MF
49AC_CHECK_TYPES(socklen_t, [], [],
50[#include <sys/types.h>
51#include <sys/socket.h>
52])
53
c906108c
SS
54AC_OUTPUT(Makefile,
55[case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.66627 seconds and 4 git commands to generate.