-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
98 lines (79 loc) · 2.71 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
dnl Process this file with autoconf to produce a configure script.
AC_INIT
dnl When you can seen swf_parse.c, you're in the source directory
AC_CONFIG_SRCDIR([swf_parse.c])
dnl Library versioning
dnl ====================================
dnl Check for programs
dnl ====================================
AC_PROG_CC
AC_PROG_CPP
AC_MSG_NOTICE([starting libtool test])
AC_PROG_LIBTOOL
AC_MSG_NOTICE([libtool test done])
dnl ====================================
dnl Set some general compile options
dnl ====================================
dnl ==============================
dnl Check for libraries
dnl ==============================
dnl ==============================
dnl Checks for header files
dnl ==============================
AC_CHECK_HEADERS([stdlib.h string.h])
dnl ==============================
dnl Checks for library functions
dnl ==============================
AC_CHECK_FUNCS([strdup])
dnl ==============================
dnl Checks for types
dnl ==============================
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
case 1 in
$ac_cv_sizeof_char) SWF_U8="unsigned char"; SWF_S8="signed char";
pSWF_U8="uc"; pSWF_S8="c";;
esac
case 2 in
$ac_cv_sizeof_char) SWF_U16="unsigned char"; SWF_S16="signed char";
pSWF_U16="uc"; pSWF_S16="c";;
$ac_cv_sizeof_short) SWF_U16="unsigned short"; SWF_S16="signed short";
pSWF_U16="u"; pSWF_S16="d";;
$ac_cv_sizeof_int) SWF_U16="unsigned int"; SWF_S16="signed int";
pSWF_U16="u"; pSWF_S16="d";;
esac
case 4 in
$ac_cv_sizeof_short) SWF_U32="unsigned short"; SWF_S32="signed short";
pSWF_U32="u"; pSWF_S32="d";;
$ac_cv_sizeof_int) SWF_U32="unsigned int"; SWF_S32="signed int";
pSWF_U32="u"; pSWF_S32="d";;
$ac_cv_sizeof_long) SWF_U32="unsigned long"; SWF_S32="signed long";
pSWF_U32="ul"; pSWF_S32="ld";;
esac
if test -z "$SWF_U8"; then
AC_MSG_ERROR(No 8 bit type found on this platform!)
fi
if test -z "$SWF_U16"; then
AC_MSG_ERROR(No 16 bit type found on this platform!)
fi
if test -z "$SWF_U32"; then
AC_MSG_ERROR(No 32 bit type found on this platform!)
fi
AC_SUBST(CC)
AC_SUBST(SWF_U8)
AC_SUBST(SWF_S8)
AC_SUBST(SWF_U16)
AC_SUBST(SWF_S16)
AC_SUBST(SWF_U32)
AC_SUBST(SWF_S32)
AC_SUBST(pSWF_U8)
AC_SUBST(pSWF_S8)
AC_SUBST(pSWF_U16)
AC_SUBST(pSWF_S16)
AC_SUBST(pSWF_U32)
AC_SUBST(pSWF_S32)
dnl What to do with all this information
AC_CONFIG_FILES([Makefile swf_memory.h])
AC_OUTPUT