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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
# Init autoconf (and check for presence of fribidi.c)
AC_INIT(fribidi.c)
# Define different version variables.
#
# Making releases:
# FRIBIDI_MICRO_VERSION++;
# FRIBIDI_INTERFACE_AGE++;
# FRIBIDI_BINARY_AGE++;
# FRIBIDI_RPM_RELEASE = 0;
#
# If any major functions have been added:
# FRIBIDI_INTERFACE_AGE = 0;
# FRIBIDI_INTERFACE_VERSION++;
#
# If backwards compatibility has been broken:
# FRIBIDI_BINARY_AGE = FRIBIDI_INTERFACE_AGE = 0;
#
# Building RPMs:
# FRIBIDI_RPM_RELEASE++;
#
FRIBIDI_MAJOR_VERSION=0
FRIBIDI_MINOR_VERSION=10
FRIBIDI_MICRO_VERSION=3
FRIBIDI_INTERFACE_VERSION=2
FRIBIDI_INTERFACE_AGE=3
FRIBIDI_BINARY_AGE=3
FRIBIDI_RPM_RELEASE=0
FRIBIDI_VERSION=$FRIBIDI_MAJOR_VERSION.$FRIBIDI_MINOR_VERSION.$FRIBIDI_MICRO_VERSION
AC_SUBST(FRIBIDI_MAJOR_VERSION)
AC_SUBST(FRIBIDI_MINOR_VERSION)
AC_SUBST(FRIBIDI_MICRO_VERSION)
AC_SUBST(FRIBIDI_VERSION)
AC_SUBST(FRIBIDI_INTERFACE_VERSION)
AC_SUBST(FRIBIDI_INTERFACE_AGE)
AC_SUBST(FRIBIDI_BINARY_AGE)
AC_SUBST(FRIBIDI_RPM_RELEASE)
PACKAGE=fribidi
VERSION=$FRIBIDI_VERSION
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PATH_PROG(SED, sed, $PATH)
dnl Checks for libraries
dnl Initialize libtool
AM_PROG_LIBTOOL
dnl Checks for header files.
AC_HEADER_STDC
dnl Checks for typedefs
AC_CHECK_SIZEOF(int, 2)
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(char*, 2)
dnl Checks for compiler characteristics
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall " ;;
esac
fi
changequote([,])dnl
dnl Cygwin does not set srcdir to ".".
if test x$srcdir = x; then
xsrcdir=.
else
xsrcdir="$srcdir"
fi
dnl check for fribidi_tab_char_type_*.i files
for n in 2 3 4 5 6 7 8 9; do
if test -f "${srcdir}/fribidi_tab_char_type_$n.i" ||
test -f "./fribidi_tab_char_type_$n.i"; then
AC_DEFINE_UNQUOTED(HAS_FRIBIDI_TAB_CHAR_TYPE_${n}_I)
fi
done
echo "creating fribidi_tab_char_type_stamp"
echo "time-stamp" > fribidi_tab_char_type_stamp
dnl Check for configure options
dnl --enable-debug
AC_ARG_ENABLE(debug, dnl
[ --enable-debug turn debugging information on [default=no]],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false])
if test x"$debug" = xtrue; then
AC_DEFINE(DEBUG)
fi
dnl --enable-malloc
AC_ARG_ENABLE(malloc, dnl
[ --enable-malloc do not allocate chunks of memory [default=no]],
[case "${enableval}" in
yes) malloc=true ;;
no) malloc=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-malloc) ;;
esac],[malloc=false])
if test x"$malloc" = xtrue; then
AC_DEFINE(USE_SIMPLE_MALLOC)
fi
dnl --enable-memopt
AC_ARG_ENABLE(memopt, dnl
[ --enable-memopt optimize for memory usage [default=no]],
[case "${enableval}" in
yes) memopt=true ;;
no) memopt=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-memopt) ;;
esac],[memopt=false])
if test x"$memopt" = xtrue; then
AC_DEFINE(MEM_OPTIMIZED)
fi
dnl --without-charsets
AC_ARG_WITH(charsets, dnl
[ --without-charsets exclude character set converters from library
causes command-line tool to use iconv],
[case "${withval}" in
yes) charsets=true ;;
no) charsets=false ;;
*) AC_MSG_ERROR(bad value ${withval} for --without-charsets) ;;
esac],[charsets=true])
if test x"$charsets" = xfalse; then
AC_DEFINE(FRIBIDI_NO_CHARSETS)
FRIBIDI_NO_CHARSETS=1
else
FRIBIDI_NO_CHARSETS=0
fi
AC_SUBST(FRIBIDI_NO_CHARSETS)
AC_OUTPUT([
Makefile
fribidi_config.h
fribidi-config
fribidi.pc
fribidi.spec
],[case "$CONFIG_FILES" in
*fribidi-config*)chmod +x fribidi-config;;
esac])
|