diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 21:07:52 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 21:07:52 +0000 |
commit | 2277da3178d75fc3259527c529f5c342f9b4f584 (patch) | |
tree | 4022d4e8fde18e8c78b0a4a1568f900976d4341a /libgo/configure.ac | |
parent | 882390bba75f5b189f4ae80f1d5b395476f83238 (diff) |
libgo: Try to fix use of <ustat.h> for Solaris and older GNU/Linux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184828 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/configure.ac')
-rw-r--r-- | libgo/configure.ac | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libgo/configure.ac b/libgo/configure.ac index f2e23a69382..8100c1c701c 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -453,7 +453,7 @@ no) ;; esac -AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h ustat.h utime.h linux/reboot.h) +AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/reboot.h) AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [], [#ifdef HAVE_SYS_SOCKET_H @@ -461,6 +461,21 @@ AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [], #endif ]) +AC_CACHE_CHECK([whether <ustat.h> can be used], +[libgo_cv_c_ustat_h], +AC_COMPILE_IFELSE( +[AC_LANG_SOURCE([ +#include <sys/types.h> +#ifdef HAVE_LINUX_FILTER_H +#include <linux/filter.h> +#endif +#include <ustat.h> +])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no])) +if test $libgo_cv_c_ustat_h = yes; then + AC_DEFINE(HAVE_USTAT_H, 1, + [Define to 1 if you have the <ustat.h> header file and it works.]) +fi + AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes) AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv) |