1 # Configure template for strace.
3 # Copyright (c) 1999-2001 Wichert Akkerman <wichert@deephackmode.org>
4 # Copyright (c) 2002-2009 Roland McGrath <roland@redhat.com>
5 # Copyright (c) 2006-2016 Dmitry V. Levin <ldv@altlinux.org>
6 # Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org>
7 # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions
13 # 1. Redistributions of source code must retain the above copyright
14 # notice, this list of conditions and the following disclaimer.
15 # 2. Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in the
17 # documentation and/or other materials provided with the distribution.
18 # 3. The name of the author may not be used to endorse or promote products
19 # derived from this software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 m4_esyscmd([./git-version-gen .tarball-version]),
35 [strace-devel@lists.sourceforge.net])
36 AC_CONFIG_SRCDIR([strace.c])
37 AC_CONFIG_AUX_DIR([.])
38 AC_CONFIG_HEADERS([config.h])
39 AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules parallel-tests])
49 AC_USE_SYSTEM_EXTENSIONS
51 AC_MSG_CHECKING([for supported architecture])
57 AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.])
61 AC_DEFINE([I386], 1, [Define for the i386 architecture.])
65 AC_DEFINE([IA64], 1, [Define for the IA64 architecture.])
69 AC_DEFINE([M68K], 1, [Define for the m68k architecture.])
74 AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.])
78 AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.])
82 AC_DEFINE([METAG], 1, [Define for the Meta architecture.])
86 AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.])
90 AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.])
93 AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.])
97 #endif], [], arch=powerpc64, arch=powerpc)
98 if test "$arch" = "powerpc64"; then
100 AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.])
105 AC_DEFINE([ARM], 1, [Define for the ARM architecture.])
110 AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.])
114 AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
118 AC_DEFINE([ARC], 1, [Define for the ARC architecture.])
122 AC_DEFINE([S390], 1, [Define for the S390 architecture.])
126 AC_DEFINE([S390X], 1, [Define for the S390x architecture.])
130 AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.])
134 AC_DEFINE([SH64], 1, [Define for the SH64 architecture.])
138 AC_DEFINE([SH], 1, [Define for the SH architecture.])
145 #endif], [], arch=x32, arch=x86_64)
146 if test "$arch" = "x86_64"; then
148 AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.])
150 AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.])
155 AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.])
159 AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.])
163 AC_DEFINE([TILE], 1, [Define for the Tile architecture])
167 AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.])
171 AC_DEFINE([NIOS2], 1, [Define for the Nios-II architecture.])
176 AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.])
181 AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture])
186 AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
191 test -n "$arch_m32" ||
193 test -n "$arch_mx32" ||
199 if test "$arch" = mips; then
200 AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
201 [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
202 [#include <sgidefs.h>],
203 [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])])
205 AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
207 [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
208 [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])],
209 [st_cv_mips_abi=o32],
211 [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
212 [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])],
213 [st_cv_mips_abi=n32],
215 [AC_LANG_PROGRAM([[#include <sgidefs.h>]],
216 [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])],
217 [st_cv_mips_abi=n64],
218 [st_cv_mips_abi=unknown])])])])
220 case "$st_cv_mips_abi" in
221 o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _MIPS_SIM_ABI32.]);;
222 n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _MIPS_SIM_NABI32.]);;
223 n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _MIPS_SIM_ABI64.]);;
224 *) AC_MSG_ERROR([Unsupported _MIPS_SIM]);;
228 AC_ARG_ENABLE([arm-oabi],
229 [AS_HELP_STRING([--enable-arm-oabi],
230 [enable OABI support on ARM EABI])],
231 [], [enable_arm_oabi=no])
232 case "$enable_arm_oabi" in
233 yes) enable_arm_oabi=1 ;;
234 no) enable_arm_oabi=0 ;;
235 *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;;
237 AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
238 [Define to 1 if you want OABI support on ARM EABI.])
241 gl_WARN_ADD([-Wwrite-strings])
242 gl_WARN_ADD([-Wsign-compare])
243 AC_ARG_ENABLE([gcc-Werror],
244 [AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])],
246 yes) gl_WARN_ADD([-Werror]) ;;
248 *) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;;
251 AC_SUBST([WARN_CFLAGS])
268 AC_CHECK_FUNCS(m4_normalize([
294 AC_CHECK_TYPES([sig_atomic_t, struct sigcontext],,, [#include <signal.h>])
296 AC_CHECK_TYPES([struct mmsghdr],,, [#include <sys/socket.h>])
298 AC_CHECK_TYPES([__kernel_long_t, __kernel_ulong_t],,,
299 [#include <asm/posix_types.h>])
301 AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,,
302 [#include <sys/types.h>
303 #include <asm/stat.h>])
305 AC_CHECK_TYPES([struct statfs64],,, [#include <sys/vfs.h>])
307 AC_CHECK_TYPES(m4_normalize([
308 struct pt_all_user_regs,
310 struct ptrace_peeksiginfo_args
311 ]),,, [#include <sys/ptrace.h>])
313 AC_CHECK_TYPES(m4_normalize([
316 struct __kernel_flock,
317 struct __kernel_flock64
319 [#include <sys/types.h>
320 #include <linux/fcntl.h>])
322 AC_CHECK_MEMBERS(m4_normalize([
323 struct stat.st_atim.tv_nsec,
324 struct stat.st_blksize,
325 struct stat.st_blocks,
326 struct stat.st_ctim.tv_nsec,
327 struct stat.st_flags,
328 struct stat.st_fstype,
330 struct stat.st_mtim.tv_nsec,
334 AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>])
336 AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>])
338 AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
340 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
341 [#include <sys/types.h>
342 #include <sys/socket.h>
343 #include <netinet/in.h>])
345 AC_CHECK_MEMBERS(m4_normalize([
346 struct stat.st_atime_nsec,
347 struct stat.st_ctime_nsec,
348 struct stat.st_mtime_nsec
349 ]),,, [#include <sys/types.h>
350 #include <asm/stat.h>])
352 AC_CHECK_MEMBERS(m4_normalize([
353 siginfo_t.si_syscall,
354 siginfo_t.si_timerid,
356 ]),,, [#include <signal.h>])
358 AC_CHECK_HEADERS(m4_normalize([
361 bluetooth/bluetooth.h
398 AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include <signal.h>])
400 AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
402 AC_CHECK_HEADERS([linux/mqueue.h],,, [#include <linux/types.h>])
404 AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],,,
406 #include <sys/socket.h>
407 #include <asm/types.h>])
409 AC_CHECK_HEADERS(m4_normalize([
410 linux/netfilter_arp/arp_tables.h
411 linux/netfilter_bridge/ebtables.h
412 linux/netfilter_ipv4/ip_tables.h
413 linux/netfilter_ipv6/ip6_tables.h
414 ]),,, [#include <netinet/in.h>
415 #include <net/if.h>])
417 AC_CHECK_HEADERS([linux/input.h], [
418 AC_CHECK_MEMBERS([struct input_absinfo.resolution],,, [#include <linux/input.h>])
421 AC_CHECK_HEADERS([linux/bpf.h], [
422 AC_CACHE_CHECK([whether union bpf_attr.log_buf initialization works],
423 [st_cv_have_union_bpf_attr_log_buf],
425 [AC_LANG_PROGRAM([[#include <linux/bpf.h>]],
426 [[union bpf_attr a = { .log_buf = 0 };]])],
427 [st_cv_have_union_bpf_attr_log_buf=yes],
428 [st_cv_have_union_bpf_attr_log_buf=no])])
429 if test $st_cv_have_union_bpf_attr_log_buf = yes; then
430 AC_DEFINE(HAVE_UNION_BPF_ATTR_LOG_BUF, [1],
431 [Define to 1 if union bpf_attr.log_buf initialization works])
435 AC_CHECK_DECLS([sys_errlist])
436 AC_CHECK_DECLS(m4_normalize([
439 ]),,, [#include <sys/ptrace.h>])
441 AC_CHECK_DECLS(m4_normalize([
451 ]),,, [#include <sys/wait.h>])
453 AC_CHECK_DECLS(m4_normalize([
457 ]),,, [#include <linux/loop.h>])
459 AC_CHECK_DECLS(m4_normalize([
489 KERN_PPC_HTABRECLAIM,
491 KERN_PPC_POWERSAVE_NAP,
514 KERN_IEEE_EMULATION_WARNINGS,
515 KERN_S390_USER_DEBUG_LOGGING,
524 KERN_PRINTK_RATELIMIT,
525 KERN_PRINTK_RATELIMIT_BURST,
528 KERN_SPARC_SCONS_PWROFF,
530 KERN_UNKNOWN_NMI_PANIC,
531 KERN_BOOTLOADER_TYPE,
533 KERN_SETUID_DUMPABLE,
535 KERN_ACPI_VIDEO_FLAGS,
564 NET_CORE_WMEM_DEFAULT,
565 NET_CORE_RMEM_DEFAULT,
566 NET_CORE_DESTROY_DELAY,
567 NET_CORE_MAX_BACKLOG,
572 NET_CORE_HOT_LIST_LENGTH,
573 NET_CORE_DIVERT_VERSION,
574 NET_CORE_NO_CONG_THRESH,
581 NET_CORE_AEVENT_ETIME,
582 NET_CORE_AEVENT_RSEQTH,
591 NET_IPV4_TCP_TIMESTAMPS,
592 NET_IPV4_TCP_WINDOW_SCALING,
594 NET_IPV4_TCP_RETRANS_COLLAPSE,
595 NET_IPV4_DEFAULT_TTL,
597 NET_IPV4_NO_PMTU_DISC,
598 NET_IPV4_TCP_SYN_RETRIES,
599 NET_IPV4_IPFRAG_HIGH_THRESH,
600 NET_IPV4_IPFRAG_LOW_THRESH,
601 NET_IPV4_IPFRAG_TIME,
602 NET_IPV4_TCP_MAX_KA_PROBES,
603 NET_IPV4_TCP_KEEPALIVE_TIME,
604 NET_IPV4_TCP_KEEPALIVE_PROBES,
605 NET_IPV4_TCP_RETRIES1,
606 NET_IPV4_TCP_RETRIES2,
607 NET_IPV4_TCP_FIN_TIMEOUT,
608 NET_IPV4_IP_MASQ_DEBUG,
612 NET_TCP_SYN_TAILDROP,
613 NET_TCP_MAX_SYN_BACKLOG,
614 NET_IPV4_LOCAL_PORT_RANGE,
615 NET_IPV4_ICMP_ECHO_IGNORE_ALL,
616 NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS,
617 NET_IPV4_ICMP_SOURCEQUENCH_RATE,
618 NET_IPV4_ICMP_DESTUNREACH_RATE,
619 NET_IPV4_ICMP_TIMEEXCEED_RATE,
620 NET_IPV4_ICMP_PARAMPROB_RATE,
621 NET_IPV4_ICMP_ECHOREPLY_RATE,
622 NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES,
623 NET_IPV4_IGMP_MAX_MEMBERSHIPS,
625 NET_IPV4_ALWAYS_DEFRAG,
626 NET_IPV4_TCP_KEEPALIVE_INTVL,
627 NET_IPV4_INET_PEER_THRESHOLD,
628 NET_IPV4_INET_PEER_MINTTL,
629 NET_IPV4_INET_PEER_MAXTTL,
630 NET_IPV4_INET_PEER_GC_MINTIME,
631 NET_IPV4_INET_PEER_GC_MAXTIME,
632 NET_TCP_ORPHAN_RETRIES,
633 NET_TCP_ABORT_ON_OVERFLOW,
634 NET_TCP_SYNACK_RETRIES,
636 NET_TCP_MAX_TW_BUCKETS,
645 NET_TCP_ADV_WIN_SCALE,
646 NET_IPV4_NONLOCAL_BIND,
647 NET_IPV4_ICMP_RATELIMIT,
648 NET_IPV4_ICMP_RATEMASK,
652 NET_IPV4_IPFRAG_SECRET_INTERVAL,
653 NET_IPV4_IGMP_MAX_MSF,
654 NET_TCP_NO_METRICS_SAVE,
655 NET_TCP_DEFAULT_WIN_SCALE,
656 NET_TCP_MODERATE_RCVBUF,
657 NET_TCP_TSO_WIN_DIVISOR,
659 NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
660 NET_TCP_CONG_CONTROL,
662 NET_IPV4_IPFRAG_MAX_DIST,
665 NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS,
666 NET_TCP_DMA_COPYBREAK,
667 NET_TCP_SLOW_START_AFTER_IDLE,
668 NET_CIPSOV4_CACHE_ENABLE,
669 NET_CIPSOV4_CACHE_BUCKET_SIZE,
670 NET_CIPSOV4_RBM_OPTFMT,
671 NET_CIPSOV4_RBM_STRICTVALID,
672 NET_TCP_AVAIL_CONG_CONTROL,
673 NET_TCP_ALLOWED_CONG_CONTROL,
674 NET_TCP_MAX_SSTHRESH,
675 NET_TCP_FRTO_RESPONSE,
676 NET_IPV4_ROUTE_FLUSH,
677 NET_IPV4_ROUTE_MIN_DELAY,
678 NET_IPV4_ROUTE_MAX_DELAY,
679 NET_IPV4_ROUTE_GC_THRESH,
680 NET_IPV4_ROUTE_MAX_SIZE,
681 NET_IPV4_ROUTE_GC_MIN_INTERVAL,
682 NET_IPV4_ROUTE_GC_TIMEOUT,
683 NET_IPV4_ROUTE_GC_INTERVAL,
684 NET_IPV4_ROUTE_REDIRECT_LOAD,
685 NET_IPV4_ROUTE_REDIRECT_NUMBER,
686 NET_IPV4_ROUTE_REDIRECT_SILENCE,
687 NET_IPV4_ROUTE_ERROR_COST,
688 NET_IPV4_ROUTE_ERROR_BURST,
689 NET_IPV4_ROUTE_GC_ELASTICITY,
690 NET_IPV4_ROUTE_MTU_EXPIRES,
691 NET_IPV4_ROUTE_MIN_PMTU,
692 NET_IPV4_ROUTE_MIN_ADVMSS,
693 NET_IPV4_ROUTE_SECRET_INTERVAL,
694 NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS,
695 NET_IPV4_CONF_FORWARDING,
696 NET_IPV4_CONF_MC_FORWARDING,
697 NET_IPV4_CONF_PROXY_ARP,
698 NET_IPV4_CONF_ACCEPT_REDIRECTS,
699 NET_IPV4_CONF_SECURE_REDIRECTS,
700 NET_IPV4_CONF_SEND_REDIRECTS,
701 NET_IPV4_CONF_SHARED_MEDIA,
702 NET_IPV4_CONF_RP_FILTER,
703 NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE,
704 NET_IPV4_CONF_BOOTP_RELAY,
705 NET_IPV4_CONF_LOG_MARTIANS,
707 NET_IPV4_CONF_ARPFILTER,
708 NET_IPV4_CONF_MEDIUM_ID,
709 NET_IPV4_CONF_NOXFRM,
710 NET_IPV4_CONF_NOPOLICY,
711 NET_IPV4_CONF_FORCE_IGMP_VERSION,
712 NET_IPV4_CONF_ARP_ANNOUNCE,
713 NET_IPV4_CONF_ARP_IGNORE,
714 NET_IPV4_CONF_PROMOTE_SECONDARIES,
715 NET_IPV4_CONF_ARP_ACCEPT,
716 NET_IPV4_CONF_ARP_NOTIFY,
722 NET_IPV6_IP6FRAG_HIGH_THRESH,
723 NET_IPV6_IP6FRAG_LOW_THRESH,
724 NET_IPV6_IP6FRAG_TIME,
725 NET_IPV6_IP6FRAG_SECRET_INTERVAL,
726 NET_IPV6_MLD_MAX_MSF,
727 NET_IPV6_ROUTE_FLUSH,
728 NET_IPV6_ROUTE_GC_THRESH,
729 NET_IPV6_ROUTE_MAX_SIZE,
730 NET_IPV6_ROUTE_GC_MIN_INTERVAL,
731 NET_IPV6_ROUTE_GC_TIMEOUT,
732 NET_IPV6_ROUTE_GC_INTERVAL,
733 NET_IPV6_ROUTE_GC_ELASTICITY,
734 NET_IPV6_ROUTE_MTU_EXPIRES,
735 NET_IPV6_ROUTE_MIN_ADVMSS,
736 NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS,
737 NET_UNIX_DESTROY_DELAY,
738 NET_UNIX_DELETE_DELAY,
739 NET_UNIX_MAX_DGRAM_QLEN,
740 VM_OVERCOMMIT_MEMORY,
746 VM_NR_PDFLUSH_THREADS,
751 VM_LOWMEM_RESERVE_RATIO,
757 VM_VFS_CACHE_PRESSURE,
759 VM_SWAP_TOKEN_TIMEOUT
761 [#include <sys/types.h>
762 #include <linux/sysctl.h>])
764 AC_CHECK_DECLS(m4_normalize([
769 V4L2_FIELD_INTERLACED,
772 V4L2_FIELD_ALTERNATE,
773 V4L2_FIELD_INTERLACED_TB,
774 V4L2_FIELD_INTERLACED_BT,
775 V4L2_BUF_TYPE_VIDEO_CAPTURE,
776 V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
777 V4L2_BUF_TYPE_VIDEO_OUTPUT,
778 V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
779 V4L2_BUF_TYPE_VIDEO_OVERLAY,
780 V4L2_BUF_TYPE_VBI_CAPTURE,
781 V4L2_BUF_TYPE_VBI_OUTPUT,
782 V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,
783 V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,
784 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY,
786 V4L2_TUNER_ANALOG_TV,
787 V4L2_TUNER_DIGITAL_TV,
792 V4L2_COLORSPACE_SMPTE170M,
793 V4L2_COLORSPACE_SMPTE240M,
794 V4L2_COLORSPACE_REC709,
795 V4L2_COLORSPACE_BT878,
796 V4L2_COLORSPACE_470_SYSTEM_M,
797 V4L2_COLORSPACE_470_SYSTEM_BG,
798 V4L2_COLORSPACE_JPEG,
799 V4L2_COLORSPACE_SRGB,
801 V4L2_PRIORITY_BACKGROUND,
802 V4L2_PRIORITY_INTERACTIVE,
803 V4L2_PRIORITY_RECORD,
804 V4L2_FRMSIZE_TYPE_DISCRETE,
805 V4L2_FRMSIZE_TYPE_CONTINUOUS,
806 V4L2_FRMSIZE_TYPE_STEPWISE,
807 V4L2_FRMIVAL_TYPE_DISCRETE,
808 V4L2_FRMIVAL_TYPE_CONTINUOUS,
809 V4L2_FRMIVAL_TYPE_STEPWISE,
810 V4L2_CTRL_TYPE_INTEGER,
811 V4L2_CTRL_TYPE_BOOLEAN,
813 V4L2_CTRL_TYPE_BUTTON,
814 V4L2_CTRL_TYPE_INTEGER64,
815 V4L2_CTRL_TYPE_CTRL_CLASS,
816 V4L2_CTRL_TYPE_STRING,
817 V4L2_CTRL_TYPE_BITMASK,
818 V4L2_CTRL_TYPE_INTEGER_MENU
819 ]),,, [#include <linux/videodev2.h>])
821 AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
822 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
824 #include <linux/fs.h>], [return !BLKGETSIZE64;])],
825 [ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])]
826 if test $ac_cv_have_blkgetsize64 = yes; then
827 AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.])
830 AC_CHECK_SIZEOF([long])
831 AC_CHECK_SIZEOF([long long])
832 AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>])
833 AC_CHECK_SIZEOF([struct i64_i32],,[struct i64_i32 {long long i64; int i32;};])
835 AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN],
836 [[st_cv_SIGRTMIN="$(echo SIGRTMIN |
837 $CPP $CPPFLAGS -P -imacros asm/signal.h - |
839 test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]])
840 if test "x$st_cv_SIGRTMIN" != xno; then
841 AC_DEFINE_UNQUOTED([ASM_SIGRTMIN], [$st_cv_SIGRTMIN],
842 [SIGRTMIN defined in <asm/signal.h>])
844 AC_CACHE_CHECK([for SA_RESTORER], [st_cv_SA_RESTORER],
845 [st_cv_SA_RESTORER="$(echo SA_RESTORER |
846 $CPP $CPPFLAGS -P -imacros asm/signal.h - |
848 test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no])
849 if test "x$st_cv_SA_RESTORER" != xno; then
850 AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_SA_RESTORER],
851 [SA_RESTORER defined in <asm/signal.h>])
854 AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount],
855 [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])],
856 [st_cv_have___builtin_popcount=yes],
857 [st_cv_have___builtin_popcount=no])])
858 if test "x$st_cv_have___builtin_popcount" = xyes; then
859 AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1],
860 [Define to 1 if the system provides __builtin_popcount function])
863 AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=])
864 if test "x$ac_cv_lib_dl_dladdr" = xyes; then
865 AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if the system provides dladdr])
869 AC_PATH_PROG([PERL], [perl])
871 dnl stack trace with libunwind
875 AC_ARG_WITH([libunwind],
876 [AS_HELP_STRING([--with-libunwind],
877 [use libunwind to implement stack tracing support])],
878 [case "${withval}" in
880 *) with_libunwind=yes
881 libunwind_CPPFLAGS="-I${withval}/include"
882 libunwind_LDFLAGS="-L${withval}/lib" ;;
884 [with_libunwind=check]
888 AS_IF([test "x$with_libunwind" != xno],
889 [saved_CPPFLAGS="$CPPFLAGS"
890 CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS"
892 AC_CHECK_HEADERS([libunwind-ptrace.h],
893 [saved_LDFLAGS="$LDFLAGS"
894 LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
896 AC_CHECK_LIB([unwind], [backtrace],
897 [libunwind_LIBS="-lunwind $libunwind_LIBS"
899 AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
901 LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
904 [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
905 [[return !unw_create_addr_space(0, 0)]])
907 [AC_MSG_RESULT([yes])
908 libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
910 AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
911 [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
914 [if test "x$with_libunwind" != xcheck; then
915 AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
922 if test "x$with_libunwind" != xcheck; then
923 AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
930 [if test "x$with_libunwind" != xcheck; then
931 AC_MSG_FAILURE([failed to find libunwind])
937 LDFLAGS="$saved_LDFLAGS"
939 [if test "x$with_libunwind" != xcheck; then
940 AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
945 CPPFLAGS="$saved_CPPFLAGS"
950 AC_MSG_CHECKING([whether to enable stack tracing support using libunwind])
951 if test "x$use_libunwind" = xyes; then
952 AC_DEFINE([USE_LIBUNWIND], 1, [Compile stack tracing functionality])
953 AC_SUBST(libunwind_LIBS)
954 AC_SUBST(libunwind_LDFLAGS)
955 AC_SUBST(libunwind_CPPFLAGS)
957 AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes])
958 AC_MSG_RESULT([$use_libunwind])
960 if test "$arch" = mips && test "$no_create" != yes; then
962 if $srcdir/linux/mips/genstub.sh linux/mips; then
963 AC_MSG_RESULT([Generated MIPS syscallent stubs])
965 AC_MSG_FAILURE([Failed to generate syscallent stubs])
969 st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64])
970 st_MPERS([mx32], [x86_64])
972 AC_CONFIG_FILES([Makefile tests/Makefile tests-m32/Makefile tests-mx32/Makefile])