diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index 64d53dec..a06d3598 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -115,8 +115,6 @@ AC_CANONICAL_HOST | |||
115 | case $host_os in | 115 | case $host_os in |
116 | *mingw*) | 116 | *mingw*) |
117 | WIN32="yes" | 117 | WIN32="yes" |
118 | AC_MSG_WARN([nTox is not supported on $host_os yet, disabling]) | ||
119 | BUILD_NTOX="no" | ||
120 | EXTRA_LT_LDFLAGS="$EXTRA_LT_LDFLAGS -no-undefined" | 118 | EXTRA_LT_LDFLAGS="$EXTRA_LT_LDFLAGS -no-undefined" |
121 | ;; | 119 | ;; |
122 | *solaris*) | 120 | *solaris*) |
@@ -202,9 +200,8 @@ AC_TYPE_UINT8_T | |||
202 | 200 | ||
203 | # Checks for library functions. | 201 | # Checks for library functions. |
204 | AC_FUNC_FORK | 202 | AC_FUNC_FORK |
205 | AC_FUNC_MALLOC | ||
206 | AC_FUNC_REALLOC | 203 | AC_FUNC_REALLOC |
207 | AC_CHECK_FUNCS([gettimeofday memset socket strchr]) | 204 | AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc]) |
208 | 205 | ||
209 | # pkg-config based tests | 206 | # pkg-config based tests |
210 | PKG_PROG_PKG_CONFIG | 207 | PKG_PROG_PKG_CONFIG |
@@ -271,22 +268,41 @@ if (test "x$BUILD_NTOX" = "xyes") && (test "x$NCURSES_FOUND" != "xyes"); then | |||
271 | ] | 268 | ] |
272 | ) | 269 | ) |
273 | if test "x$BUILD_NTOX" = "xyes"; then | 270 | if test "x$BUILD_NTOX" = "xyes"; then |
274 | AC_CHECK_LIB([ncurses], [clear], | 271 | if test "x$WIN32" = "xyes"; then |
275 | [], | 272 | AC_CHECK_LIB([pdcurses], [clear], |
276 | [ | 273 | [ |
277 | unset ac_cv_lib_ncurses_clear | 274 | NCURSES_LIBS="-lpdcurses" |
278 | AC_CHECK_LIB([ncurses], [clear], | 275 | AC_SUBST(NCURSES_LIBS) |
279 | [], | 276 | ], |
280 | [ | 277 | [ |
281 | AC_MSG_WARN([not building nTox client because required library ncurses was not found on your system]) | 278 | AC_MSG_ERROR([required library pdcurses was not found on your system]) |
282 | BUILD_NTOX="no" | 279 | BUILD_NTOX="no" |
283 | ], | 280 | ] |
284 | [ | 281 | ) |
285 | -ltinfo | 282 | else |
286 | ] | 283 | AC_CHECK_LIB([ncurses], [clear], |
287 | ) | 284 | [ |
288 | ] | 285 | NCURSES_LIBS="-lncurses" |
289 | ) | 286 | AC_SUBST(NCURSES_LIBS) |
287 | ], | ||
288 | [ | ||
289 | unset ac_cv_lib_ncurses_clear | ||
290 | AC_CHECK_LIB([ncurses], [clear], | ||
291 | [ | ||
292 | NCURSES_LIBS="-lncurses -ltinfo" | ||
293 | AC_SUBST(NCURSES_LIBS) | ||
294 | ], | ||
295 | [ | ||
296 | AC_MSG_WARN([not building nTox client because required library ncurses was not found on your system]) | ||
297 | BUILD_NTOX="no" | ||
298 | ], | ||
299 | [ | ||
300 | -ltinfo | ||
301 | ] | ||
302 | ) | ||
303 | ] | ||
304 | ) | ||
305 | fi | ||
290 | fi | 306 | fi |
291 | fi | 307 | fi |
292 | fi | 308 | fi |