61 isascii memmove memset modf select setlocale socket strcasecmp \ |
58 isascii memmove memset modf select setlocale socket strcasecmp \ |
62 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \ |
59 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \ |
63 iswblank]) |
60 iswblank]) |
64 |
61 |
65 |
62 |
66 AC_CHECK_DECLS([strptime],,, |
|
67 [#define _GNU_SOURCE |
|
68 #include <time.h>]) |
|
69 |
|
70 # Check for tm_gmtoff |
|
71 MC_TM_GMTOFF |
|
72 |
|
73 # Check if we must provide a SIGWINCH handler |
|
74 AC_ARG_ENABLE(sigwinch, |
|
75 [ --enable-sigwinch compile with SIGWINCH handler], |
|
76 [with_sigwinch=$enableval], |
|
77 [with_sigwinch=$with_ext_funcs]) |
|
78 AC_MSG_RESULT($with_sigwinch) |
|
79 if test "$with_sigwinch" = yes; then |
|
80 AC_DEFINE([USE_SIGWINCH], [], [Provide own SIGWINCH handler]) |
|
81 fi |
|
82 |
|
83 # Checks for libraries. |
|
84 |
|
85 AC_CHECK_LIB(charset, locale_charset) |
|
86 |
|
87 AC_CHECK_FUNC(initscr,, |
|
88 [ |
|
89 cf_ncurses="ncurses" |
|
90 for lib in ncursesw ncurses |
|
91 do |
|
92 AC_CHECK_LIB($lib, waddnwstr, |
|
93 [cf_ncurses="$lib"; cf_ncurses_unicode="yes"; break]) |
|
94 done |
|
95 AC_CHECK_LIB($cf_ncurses, initscr, |
|
96 [LIBS="$LIBS -l$cf_ncurses" |
|
97 if test "$cf_ncurses" = ncursesw; then |
|
98 AC_CHECK_HEADERS([ncursesw/ncurses.h ncursesw/panel.h],, |
|
99 [AC_CHECK_HEADERS([ncurses.h panel.h],, |
|
100 AC_MSG_ERROR([Missing header file]))]) |
|
101 else |
|
102 AC_CHECK_HEADERS([ncurses/ncurses.h ncurses/panel.h],, |
|
103 [AC_CHECK_HEADERS([ncurses.h panel.h],, |
|
104 AC_MSG_ERROR([Missing header file]))]) |
|
105 fi |
|
106 ], |
|
107 [CF_CURSES_LIBS]) |
|
108 ]) |
|
109 |
|
110 AC_CHECK_LIB([panelw], [new_panel],, |
|
111 AC_CHECK_LIB([panel], [new_panel]) |
|
112 ) |
|
113 |
|
114 if test x"$cf_ncurses_unicode" = x"yes"; then |
|
115 AC_DEFINE([HAVE_UNICODE], [], [Define if ncurses have unicode support]) |
|
116 else |
|
117 AC_MSG_WARN([Your ncurses installation does not support unicode]) |
|
118 fi |
|
119 |
|
120 AC_CACHE_CHECK([for ESCDELAY variable], |
|
121 [mc_cv_ncurses_escdelay], |
|
122 [AC_TRY_LINK([], [ |
|
123 extern int ESCDELAY; |
|
124 ESCDELAY = 0; |
|
125 ], |
|
126 [mc_cv_ncurses_escdelay=yes], |
|
127 [mc_cv_ncurses_escdelay=no]) |
|
128 ]) |
|
129 if test "$mc_cv_ncurses_escdelay" = yes; then |
|
130 AC_DEFINE([HAVE_ESCDELAY], 1, |
|
131 [Define if ncurses has ESCDELAY variable]) |
|
132 fi |
|
133 |
|
134 AC_ARG_ENABLE(modules, [ --enable-modules enable dynamic modules loading], |
|
135 enable_modules=$enableval) |
|
136 if test "x$enable_modules" = "xyes"; then |
|
137 AC_DEFINE(MODULES_ENABLE, 1, [Define if you want dynamic modules loading]) |
|
138 gmodule_module=gmodule |
|
139 else |
|
140 gmodule_module='' |
|
141 fi |
|
142 |
|
143 # Check for glib |
63 # Check for glib |
144 AM_PATH_GLIB_2_0(2.14.0, |
64 AM_PATH_GLIB_2_0(2.14.0, |
145 [AC_DEFINE([HAVE_GLIB_REGEX], 1, |
65 [AC_DEFINE([HAVE_GLIB_REGEX], 1, |
146 [Define if GLib has regex support])], |
66 [Define if GLib has regex support])], |
147 [AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]), |
67 [AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]), |
148 [g_list_append], ["$gmodule_module"])], |
68 [g_list_append], ["$gmodule_module"])], |
149 [g_regex_new "$gmodule_module"]) |
69 [g_regex_new "$gmodule_module"]) |
150 |
|
151 # Check for loudmouth |
|
152 PKG_CHECK_MODULES(LOUDMOUTH, loudmouth-1.0 >= 1.4.2) |
|
153 AC_SUBST(LOUDMOUTH_CFLAGS) |
|
154 AC_SUBST(LOUDMOUTH_LIBS) |
|
155 |
|
156 # Check for libidn |
|
157 AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], |
|
158 [Support IDN (needs GNU Libidn)]), |
|
159 libidn=$withval, libidn=yes) |
|
160 if test "$libidn" != "no" ; then |
|
161 PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no]) |
|
162 if test "$libidn" != "yes" ; then |
|
163 libidn=no |
|
164 AC_MSG_WARN([Libidn not found]) |
|
165 else |
|
166 libidn=yes |
|
167 AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you want Libidn.]) |
|
168 fi |
|
169 fi |
|
170 |
|
171 # Check for gpgme |
|
172 AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--disable-gpgme], [disable GPGME support]), |
|
173 [ if test x"$enableval" = x"no"; then |
|
174 enable_gpgme=no |
|
175 fi |
|
176 ]) |
|
177 |
|
178 if test x"${enable_gpgme}" != x"no"; then |
|
179 AM_PATH_GPGME(1.0.0, AC_DEFINE([HAVE_GPGME], 1, |
|
180 [Define if you use GPGME to support OpenPGP])) |
|
181 fi |
|
182 |
|
183 # Check for otr |
|
184 AC_ARG_ENABLE(otr, [ --enable-otr enable OTR (Off-the-Record) messaging support], |
|
185 enable_otr=$enableval, otr="") |
|
186 if test "x$enable_otr" = "xyes"; then |
|
187 # Look for libgcrypt and libotr |
|
188 AM_PATH_LIBGCRYPT(1.2.2, [ |
|
189 AM_PATH_LIBOTR(3.1.0, , |
|
190 AC_MSG_ERROR(libotr 3.1.0 or newer is required.)) |
|
191 ], AC_MSG_ERROR(libgcrypt 1.2.2 or newer is required.) |
|
192 ) |
|
193 fi |
|
194 |
|
195 # Check for Enchant stuff |
|
196 AC_ARG_ENABLE(enchant, [ --enable-enchant enable enchant support], |
|
197 enable_enchant=$enableval, enchant="") |
|
198 # Check for Aspell stuff |
|
199 AC_ARG_ENABLE(aspell, [ --enable-aspell enable aspell support], |
|
200 enable_aspell=$enableval, aspell="") |
|
201 |
|
202 if test "x$enable_enchant" = "xyes"; then |
|
203 PKG_CHECK_MODULES(ENCHANT, [enchant], |
|
204 AC_DEFINE(WITH_ENCHANT, 1, [Define if you want enchant support]) |
|
205 ) |
|
206 else |
|
207 if test "x$enable_aspell" = "xyes"; then |
|
208 AC_CHECK_HEADERS(aspell.h, [ have_aspell_includes=yes ]) |
|
209 if test "x$have_aspell_includes" = "xyes"; then |
|
210 AC_CHECK_LIB(aspell, new_aspell_config, [ have_aspell_libs=yes ]) |
|
211 if test "x$have_aspell_libs" = "xyes"; then |
|
212 AC_DEFINE([WITH_ASPELL], 1, [Define if you want aspell support]) |
|
213 LIBS="$LIBS -laspell" |
|
214 else |
|
215 enable_aspell=no |
|
216 fi |
|
217 else |
|
218 enable_aspell=no |
|
219 fi |
|
220 fi |
|
221 fi |
|
222 |
|
223 AC_DEFINE([BUILD_JABBER], 1, [build with jabber support]) |
|
224 |
|
225 # Export $datadir to the source tree. |
|
226 if test x"${datadir}" != x""; then |
|
227 AC_DEFINE_DIR(DATA_DIR, datadir, [Data files directory]) |
|
228 fi |
|
229 |
70 |
230 # Export $libexecdir to the source tree |
71 # Export $libexecdir to the source tree |
231 AC_DEFINE_DIR(PKGLIB_DIR, "${libdir}/${PACKAGE}", [Modules directory]) |
72 AC_DEFINE_DIR(PKGLIB_DIR, "${libdir}/${PACKAGE}", [Modules directory]) |
232 |
73 |
233 AC_ARG_ENABLE(debug, |
74 AC_ARG_ENABLE(debug, |