1999-04-16 01:35:26 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2011-10-18 00:17:24 +00:00
|
|
|
AC_PREREQ(2.64)dnl
|
1999-04-16 01:35:26 +00:00
|
|
|
AC_INIT(Makefile.in)
|
|
|
|
|
2011-10-18 00:17:24 +00:00
|
|
|
SIM_AC_COMMON(cconfig.h)
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
# Put a useful copy of CPP_FOR_TARGET in Makefile.
|
|
|
|
# This is only used to build the target values header files. These files are
|
|
|
|
# shipped with distributions so CPP_FOR_TARGET only needs to work in
|
|
|
|
# developer's trees. This value is borrowed from ../../Makefile.in.
|
|
|
|
CPP_FOR_TARGET="\` \
|
|
|
|
if test -f \$\${rootme}/../../gcc/Makefile ; then \
|
|
|
|
if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \
|
|
|
|
echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \
|
|
|
|
else \
|
|
|
|
echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \
|
|
|
|
fi; \
|
|
|
|
else \
|
|
|
|
if test '\$(host_canonical)' = '\$(target_canonical)' ; then \
|
|
|
|
echo \$(CC); \
|
|
|
|
else \
|
|
|
|
t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \
|
|
|
|
fi; \
|
|
|
|
fi\` -E"
|
|
|
|
AC_SUBST(CPP_FOR_TARGET)
|
|
|
|
|
|
|
|
# Set TARGET_SUBDIR, needed by CPP_FOR_TARGET.
|
|
|
|
if test x"${host}" = x"${target}" ; then
|
|
|
|
TARGET_SUBDIR="."
|
|
|
|
else
|
|
|
|
TARGET_SUBDIR=${target_alias}
|
|
|
|
fi
|
|
|
|
AC_SUBST(TARGET_SUBDIR)
|
|
|
|
|
|
|
|
# These aren't all needed yet, but will be eventually.
|
2001-03-20 17:13:39 +00:00
|
|
|
AC_CHECK_HEADERS(stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h)
|
2011-11-07 16:28:52 +00:00
|
|
|
AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate)
|
2009-08-29 11:36:26 +00:00
|
|
|
AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
|
* configure.in (SIM_CHECK_MEMBERS): Call for struct stat members
st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev,
st_size, st_blksize, st_blocks, st_atime, st_mtime and st_ctime.
* aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS_1)
(SIM_CHECK_MEMBERS): New macros.
* callback.c (cb_host_to_target_stat): Use temporary macro ST_x
for struct stat member test and write. Add ST_x calls for each
struct stat member tested in configure.in. Wrap each ST_x call in
#ifdef of configure macro for that member.
* configure, config.in: Regenerate.
2004-12-03 19:36:53 +00:00
|
|
|
[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid],
|
|
|
|
[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size],
|
|
|
|
[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime],
|
2009-08-29 11:36:26 +00:00
|
|
|
[struct stat.st_mtime], [struct stat.st_ctime]], [], [],
|
|
|
|
[[#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_STAT_H
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#endif]])
|
2010-03-30 23:09:48 +00:00
|
|
|
AC_CHECK_TYPES(socklen_t, [], [],
|
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
])
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
AC_OUTPUT(Makefile,
|
|
|
|
[case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac])
|