Lines 1-6
Link Here
|
1 |
AC_INIT(main.cc) |
1 |
AC_INIT(main.cc) |
|
|
2 |
#AC_ARG_PROGRAM |
2 |
AM_INIT_AUTOMAKE(geresh, 0.6.3) |
3 |
AM_INIT_AUTOMAKE(geresh, 0.6.3) |
3 |
AM_CONFIG_HEADER(config.h) |
4 |
AM_CONFIG_HEADER(config.h) |
4 |
|
5 |
|
5 |
AC_PROG_CC |
6 |
AC_PROG_CC |
6 |
AC_PROG_CPP |
7 |
AC_PROG_CPP |
Lines 8-25
Link Here
|
8 |
AC_PROG_CXXCPP |
9 |
AC_PROG_CXXCPP |
9 |
AC_PROG_INSTALL |
10 |
AC_PROG_INSTALL |
10 |
|
11 |
|
11 |
AC_LANG_CPLUSPLUS |
12 |
AC_LANG_CPLUSPLUS |
12 |
|
13 |
|
13 |
AC_ARG_PROGRAM |
|
|
14 |
|
15 |
debugging_support=no |
14 |
debugging_support=no |
16 |
AC_ARG_ENABLE(debug, |
15 |
AC_ARG_ENABLE(debug, |
17 |
[ --enable-debug Enable debugging support], |
16 |
[ --enable-debug Enable debugging support], |
18 |
[ if test "$enableval" = yes; then |
17 |
[ if test "$enableval" = yes; then |
19 |
debugging_support=yes |
18 |
debugging_support=yes |
20 |
AC_DEFINE(DEBUG) |
19 |
AC_DEFINE(DEBUG, [], [Turn on debugging]) |
21 |
fi |
20 |
fi |
22 |
]) |
21 |
]) |
23 |
|
22 |
|
24 |
dnl ---- fribidi ---- |
23 |
dnl ---- fribidi ---- |
25 |
|
24 |
|
Lines 35-45
Link Here
|
35 |
if test "x$FRIBIDI_CXXFLAGS" = x-I/usr/include; then |
34 |
if test "x$FRIBIDI_CXXFLAGS" = x-I/usr/include; then |
36 |
AC_CHECK_HEADER(fribidi/fribidi.h, , [CXXFLAGS="$CXXFLAGS $FRIBIDI_CXXFLAGS"]) |
35 |
AC_CHECK_HEADER(fribidi/fribidi.h, , [CXXFLAGS="$CXXFLAGS $FRIBIDI_CXXFLAGS"]) |
37 |
else |
36 |
else |
38 |
CXXFLAGS="$CXXFLAGS $FRIBIDI_CXXFLAGS" |
37 |
CXXFLAGS="$CXXFLAGS $FRIBIDI_CXXFLAGS" |
39 |
fi |
38 |
fi |
40 |
LDFLAGS="$LDFLAGS `$FRIBIDI_CONFIG --libs`" |
39 |
LIBS="`$FRIBIDI_CONFIG --libs`" |
41 |
|
40 |
|
42 |
AC_CHECK_FUNCS(fribidi_log2vis fribidi_log2vis_get_embedding_levels, , |
41 |
AC_CHECK_FUNCS(fribidi_log2vis fribidi_log2vis_get_embedding_levels, , |
43 |
[AC_MSG_ERROR(A required FriBiDi function doesn't exist)]) |
42 |
[AC_MSG_ERROR(A required FriBiDi function doesn't exist)]) |
44 |
|
43 |
|
45 |
AC_MSG_CHECKING(your FriBiDi library using a short test program) |
44 |
AC_MSG_CHECKING(your FriBiDi library using a short test program) |
Lines 153-163
Link Here
|
153 |
[ |
152 |
[ |
154 |
wchar_t ch; |
153 |
wchar_t ch; |
155 |
waddnwstr((WINDOW*)0, &ch, 1); |
154 |
waddnwstr((WINDOW*)0, &ch, 1); |
156 |
], , |
155 |
], , |
157 |
[AC_MSG_ERROR(I can't find ncursesw's header file! please check config.log)]) |
156 |
[AC_MSG_ERROR(I can't find ncursesw's header file! please check config.log)]) |
158 |
AC_DEFINE(HAVE_WIDE_CURSES) |
157 |
AC_DEFINE(HAVE_WIDE_CURSES, [], [Can link to ncursesw and use its functions]) |
159 |
else |
158 |
else |
160 |
curses_lib=ncurses |
159 |
curses_lib=ncurses |
161 |
AC_CHECK_HEADERS(curses.h ncurses.h) |
160 |
AC_CHECK_HEADERS(curses.h ncurses.h) |
162 |
AC_CHECK_LIB(ncurses, initscr, , [curses_lib=]) |
161 |
AC_CHECK_LIB(ncurses, initscr, , [curses_lib=]) |
163 |
if test "x$curses_lib" = x; then |
162 |
if test "x$curses_lib" = x; then |
Lines 171-188
Link Here
|
171 |
|
170 |
|
172 |
# test for the existance of particular curses functions |
171 |
# test for the existance of particular curses functions |
173 |
|
172 |
|
174 |
AC_CHECK_FUNCS(use_default_colors start_color curs_set) |
173 |
AC_CHECK_FUNCS(use_default_colors start_color curs_set) |
175 |
if test "$ac_cv_func_start_color" = yes; then |
174 |
if test "$ac_cv_func_start_color" = yes; then |
176 |
AC_DEFINE(HAVE_COLOR, 1) |
175 |
AC_DEFINE(HAVE_COLOR, 1, [Enable use of use_default_colors start_color curs_set ncurses functions]) |
177 |
fi |
176 |
fi |
178 |
|
177 |
|
179 |
dnl ---- gettext ---- |
178 |
dnl ---- gettext ---- |
180 |
|
179 |
|
181 |
# rudimentary gettext check, till I utilize automake's gettext support |
180 |
# rudimentary gettext check, till I utilize automake's gettext support |
182 |
|
181 |
|
183 |
AC_CHECK_HEADERS(libintl.h, [AC_CHECK_FUNCS(gettext, [AC_DEFINE(USE_GETTEXT)])]) |
182 |
AC_CHECK_HEADERS(libintl.h, [AC_CHECK_FUNCS(gettext, [AC_DEFINE(USE_GETTEXT, [], [Use Gettext])])]) |
184 |
|
183 |
|
185 |
# locale support |
184 |
# locale support |
186 |
|
185 |
|
187 |
AC_CHECK_HEADERS(locale.h) |
186 |
AC_CHECK_HEADERS(locale.h) |
188 |
|
187 |
|
Lines 191-201
Link Here
|
191 |
AC_MSG_CHECKING(for nl_langinfo and CODESET) |
190 |
AC_MSG_CHECKING(for nl_langinfo and CODESET) |
192 |
AC_TRY_LINK([#include <langinfo.h>], |
191 |
AC_TRY_LINK([#include <langinfo.h>], |
193 |
[char* s = nl_langinfo(CODESET);], |
192 |
[char* s = nl_langinfo(CODESET);], |
194 |
[ |
193 |
[ |
195 |
AC_MSG_RESULT(yes) |
194 |
AC_MSG_RESULT(yes) |
196 |
AC_DEFINE(HAVE_LANGINFO_CODESET) |
195 |
AC_DEFINE(HAVE_LANGINFO_CODESET, [], [Has nl_langinfoCODESET]) |
197 |
], |
196 |
], |
198 |
[AC_MSG_RESULT(no)]) |
197 |
[AC_MSG_RESULT(no)]) |
199 |
|
198 |
|
200 |
dnl ---- iconv ---- |
199 |
dnl ---- iconv ---- |
201 |
|
200 |
|
Lines 267-284
Link Here
|
267 |
iconv_const=const |
266 |
iconv_const=const |
268 |
) |
267 |
) |
269 |
) |
268 |
) |
270 |
AC_MSG_RESULT($iconv_const) |
269 |
AC_MSG_RESULT($iconv_const) |
271 |
|
270 |
|
272 |
AC_DEFINE(USE_ICONV) |
271 |
AC_DEFINE(USE_ICONV, [], [Will we use iconv]) |
273 |
AC_DEFINE_UNQUOTED(ICONV_CONST, $iconv_const) |
272 |
AC_DEFINE_UNQUOTED(ICONV_CONST, $iconv_const, [Does your iconv need const]) |
274 |
AC_DEFINE_UNQUOTED(INTERNAL_ENCODING, "$internal_encoding") |
273 |
AC_DEFINE_UNQUOTED(INTERNAL_ENCODING, "$internal_encoding", [internal encoding]) |
275 |
fi |
274 |
fi |
276 |
]) |
275 |
]) |
277 |
fi |
276 |
fi |
278 |
|
277 |
|
279 |
AC_DEFINE_UNQUOTED(DEFAULT_FILE_ENCODING, "$default_encoding") |
278 |
AC_DEFINE_UNQUOTED(DEFAULT_FILE_ENCODING, "$default_encoding", [Default file encoding]) |
280 |
|
279 |
|
281 |
AC_CHECK_FUNCS(wctob btowc) |
280 |
AC_CHECK_FUNCS(wctob btowc) |
282 |
|
281 |
|
283 |
dnl ---- misc ---- |
282 |
dnl ---- misc ---- |
284 |
|
283 |
|
Lines 289-299
Link Here
|
289 |
AC_MSG_ERROR([A required function does not exist])) |
288 |
AC_MSG_ERROR([A required function does not exist])) |
290 |
AC_CHECK_FUNCS(vsnprintf vasprintf) |
289 |
AC_CHECK_FUNCS(vsnprintf vasprintf) |
291 |
AC_TYPE_MODE_T |
290 |
AC_TYPE_MODE_T |
292 |
|
291 |
|
293 |
dnl AC_TYPE_SIGNAL - fails on some systems, so: |
292 |
dnl AC_TYPE_SIGNAL - fails on some systems, so: |
294 |
AC_DEFINE(RETSIGTYPE, void) |
293 |
AC_DEFINE(RETSIGTYPE, void, [Return signal type]) |
295 |
|
294 |
|
296 |
dnl ---- print out the results ---- |
295 |
dnl ---- print out the results ---- |
297 |
|
296 |
|
298 |
cat <<MSG |
297 |
cat <<MSG |
299 |
|
298 |
|