-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
81 lines (72 loc) · 2.02 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
AC_PREREQ([2.69])
AC_INIT([rux], [0.81], [[email protected]])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h:config.in)
AC_PROG_CC
AC_HEADER_STDC
AM_MAINTAINER_MODE
dnl AC_CHECK_HEADERS(stddef.h)
AC_CHECK_LIB(iconv, iconvctl)
dnl AC_EGREP_HEADER(utimbuf, utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))
dnl AC_FUNC_UTIME_NULL
AH_TEMPLATE([USE_ICONV], [If having iconv.h we able to convert text to utf-8])
AC_CHECK_HEADERS(iconv.h, AC_DEFINE(USE_ICONV))
dnl Check OS for os_dep files.
uname=`uname`
AC_MSG_CHECKING(for OS type)
case "$uname" in
*inux*)
AC_MSG_RESULT($uname found.)
OUTCP="5"
;;
*olaris*)
AC_MSG_RESULT($uname found.)
OUTCP="2"
;;
*SunOS*)
AC_MSG_RESULT($uname found.)
OUTCP="2"
;;
*OpenBSD*)
AC_MSG_RESULT($uname found.)
OUTCP="2"
;;
*BSD*)
AC_MSG_RESULT($uname found.)
OUTCP="2"
;;
*)
AC_MSG_RESULT(Unknown OS. Using default codepage koi8-r.)
OUTCP="2"
;;
esac
AC_DEFINE_UNQUOTED(DEFAULT_OUTPUT_CP, $OUTCP, [ Default output code page. ])
AC_ARG_WITH(default-codepage,
AC_HELP_STRING([--with-default-codepage=[OUT_CP_NAME]],
[Defines the default output code page]),
[ case "$withval" in
*1251*) OUTCP=1
;;
*866*) OUTCP=0
;;
*iso*) OUTCP=3
;;
*mac*) OUTCP=4
;;
*utf*8*) OUTCP=5
;;
*) OUTCP=2
;;
esac
AC_DEFINE_UNQUOTED(DEFAULT_OUTPUT_CP, $OUTCP, [ Default output code page. ])
])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[Enables the debug information output.]),
AC_DEFINE(DEBUG, 1, [ Turning on debug mode. ]))
AC_ARG_ENABLE(memdebug,
AC_HELP_STRING([--enable-memdebug],
[Enables the memory debug information output.]),
AC_DEFINE(MEMDEBUG, 1, [ Turning on memory debug mode. ]))
AC_CONFIG_FILES([Makefile])
AC_OUTPUT