rework keyframe hide popup, keyframe auto render, textbox set_selection wide text
[goodguy/history.git] / cinelerra-5.1 / libzmpeg3 / a52dec-0.7.3 / acinclude.m4
1 dnl AC_C_ATTRIBUTE_ALIGNED
2 dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is supported
3 AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED],
4     [AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
5         [ac_cv_c_attribute_aligned],
6         [ac_cv_c_attribute_aligned=0
7         for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
8             AC_TRY_COMPILE([],
9                 [static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;],
10                 [ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try])
11         done])
12     if test x"$ac_cv_c_attribute_aligned" != x"0"; then
13         AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
14             [$ac_cv_c_attribute_aligned],[maximum supported data alignment])
15     fi])
16
17 dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
18 dnl check if $CC supports a given set of cflags
19 AC_DEFUN([AC_TRY_CFLAGS],
20     [AC_MSG_CHECKING([if $CC supports $1 flags])
21     SAVE_CFLAGS="$CFLAGS"
22     CFLAGS="$1"
23     AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
24     CFLAGS="$SAVE_CFLAGS"
25     AC_MSG_RESULT([$ac_cv_try_cflags_ok])
26     if test x"$ac_cv_try_cflags_ok" = x"yes"; then
27         ifelse([$2],[],[:],[$2])
28     else
29         ifelse([$3],[],[:],[$3])
30     fi])
31
32
33 dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
34 dnl generate a default inttypes.h if the header file does not exist already
35 AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
36     [AC_CHECK_HEADER([inttypes.h],[],
37         [AC_CHECK_SIZEOF([char])
38         AC_CHECK_SIZEOF([short])
39         AC_CHECK_SIZEOF([int])
40         if test x"$ac_cv_sizeof_char" != x"1" -o \
41             x"$ac_cv_sizeof_short" != x"2" -o \
42             x"$ac_cv_sizeof_int" != x"4"; then
43             AC_MSG_ERROR([can not build a default inttypes.h])
44         fi
45         cat >$1/inttypes.h << EOF
46 /* default inttypes.h for people who do not have it on their system */
47
48 #ifndef _INTTYPES_H
49 #define _INTTYPES_H
50 #if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
51 #define __int8_t_defined
52 typedef signed char int8_t;
53 typedef signed short int16_t;
54 typedef signed int int32_t;
55 #ifdef ARCH_X86
56 typedef signed long long int64_t;
57 #endif
58 #endif
59 #if (!defined _LINUX_TYPES_H)
60 typedef unsigned char uint8_t;
61 typedef unsigned short uint16_t;
62 typedef unsigned int uint32_t;
63 #ifdef ARCH_X86
64 typedef unsigned long long uint64_t;
65 #endif
66 #endif
67 #endif
68 EOF
69         ])])