]> granicus.if.org Git - strace/blobdiff - configure.ac
Fix preadv/pwritev offset decoding
[strace] / configure.ac
index aa4923a68d7d3aaf910fd8a7bd6bfbd1490fd040..09691738aefe3cd80fe51b4451c8e96b8311245b 100644 (file)
@@ -150,6 +150,18 @@ AM_CONDITIONAL([X32], [test x$arch = xx32])
 
 AC_INCLUDEDIR
 
+AC_ARG_ENABLE([arm-oabi],
+             [AS_HELP_STRING([--enable-arm-oabi],
+                             [enable OABI support on ARM EABI])],
+             [], [enable_arm_oabi=no])
+case "$enable_arm_oabi" in
+       yes) enable_arm_oabi=1 ;;
+       no) enable_arm_oabi=0 ;;
+       *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;;
+esac
+AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
+                  [Define to 1 if you want OABI support on ARM EABI.])
+
 gl_WARN_ADD([-Wall])
 gl_WARN_ADD([-Wwrite-strings])
 AC_ARG_ENABLE([gcc-Werror],
@@ -193,14 +205,12 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
 [#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>])
-AC_CHECK_TYPES([long long])
 AC_LITTLE_ENDIAN_LONG_LONG
-AC_OFF_T_IS_LONG_LONG
-AC_CHECK_TYPES([struct opthdr],,, [#include <sys/socket.h>])
-AC_CHECK_TYPES([struct t_opthdr],,, [#include <sys/tiuser.h>])
 
 AC_CHECK_FUNCS(m4_normalize([
+       fopen64
        fork
+       fputs_unlocked
        if_indextoname
        inet_ntop
        prctl
@@ -210,8 +220,6 @@ AC_CHECK_FUNCS(m4_normalize([
        stpcpy
        strerror
        strsignal
-       _sys_siglist
-       sys_siglist
 ]))
 AC_CHECK_HEADERS(m4_normalize([
        asm/cachectl.h
@@ -226,6 +234,7 @@ AC_CHECK_HEADERS(m4_normalize([
        mqueue.h
        netinet/sctp.h
        poll.h
+       scsi/sg.h
        stropts.h
        sys/acl.h
        sys/asynch.h
@@ -244,35 +253,25 @@ AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
 #include <sys/socket.h>
 #include <asm/types.h>])
 AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
-AC_CHECK_TYPES([struct sigcontext_struct,
-               struct sigcontext],,, [#include <signal.h>])
+AC_CHECK_TYPES([struct sigcontext],,, [#include <signal.h>])
 AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
 
 AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>])
 
-AC_CHECK_MEMBERS([struct T_conn_res.QUEUE_ptr,
-                  struct T_conn_res.ACCEPTOR_id],,,
-[#include <sys/stream.h>
-#include <sys/tihdr.h>])
-
 AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>])
 
 AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,,
               [#include <sys/ptrace.h>])
 
-AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
-
-AC_CHECK_MEMBERS([struct dqblk.dqb_curblocks],,, [#include <sys/quota.h>])
+AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
 
-AC_CHECK_MEMBERS([struct sigcontext.sc_hi2],,, [#include <signal.h>
-#ifdef HAVE_ASM_SIGCONTEXT_H
-# include <asm/sigcontext.h>
-#endif])
+AC_CHECK_MEMBERS([struct sigevent._sigev_un._pad,
+                 struct sigevent.__pad,
+                 siginfo_t.si_syscall],,, [#include <signal.h>])
 
-AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
+AC_CHECK_TYPES([struct flock64],,, [#include <fcntl.h>])
 
 AC_CHECK_DECLS([sys_errlist])
-AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])
 AC_CHECK_DECLS(m4_normalize([
        PTRACE_EVENT_CLONE,
        PTRACE_EVENT_EXEC,
@@ -288,6 +287,8 @@ AC_CHECK_DECLS(m4_normalize([
        PTRACE_O_TRACEFORK,
        PTRACE_O_TRACESYSGOOD,
        PTRACE_O_TRACEVFORK,
+       PTRACE_PEEKUSER,
+       PTRACE_POKEUSER,
        PTRACE_SETOPTIONS
 ]),,, [#include <sys/ptrace.h>])
 
@@ -307,12 +308,27 @@ AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
 
 AC_CHECK_SIZEOF([long])
 AC_CHECK_SIZEOF([long long])
+AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>])
 AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>])
 
-AC_CHECK_HEADERS([libaio.h], [
-       AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
-       AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
-])
+AC_CACHE_CHECK([for SA_RESTORER], [st_cv_sa_restorer],
+              [st_cv_sa_restorer="$(echo SA_RESTORER |
+                       $CPP $CPPFLAGS -P -imacros asm/signal.h - |
+                       grep ^0x)"
+               test -n "$st_cv_sa_restorer" || st_cv_sa_restorer=no])
+if test "x$st_cv_sa_restorer" != xno; then
+       AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_sa_restorer],
+                          [SA_RESTORER defined in <asm/signal.h>])
+fi
+
+AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount],
+              [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])],
+                              [st_cv_have___builtin_popcount=yes],
+                              [st_cv_have___builtin_popcount=no])])
+if test "x$st_cv_have___builtin_popcount" = xyes; then
+       AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1],
+                 [Define to 1 if the system provides __builtin_popcount function])
+fi
 
 AC_PATH_PROG([PERL], [perl])