summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorjin-eld <jin at mediatomb dot cc>2013-08-27 14:06:19 +0300
committerjin-eld <jin at mediatomb dot cc>2013-08-27 14:25:09 +0300
commit14a8ee4e0d37034f27c03e2b4dfd32085ddee677 (patch)
tree67c8854db3ebd145222c95b834c5b49e0fdf62d2 /configure.ac
parent9b249c5ca852c004bc2dcd248152c6e2d1214c26 (diff)
Make nTox work on MinGW/Win32
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac56
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
115case $host_os in 115case $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.
204AC_FUNC_FORK 202AC_FUNC_FORK
205AC_FUNC_MALLOC
206AC_FUNC_REALLOC 203AC_FUNC_REALLOC
207AC_CHECK_FUNCS([gettimeofday memset socket strchr]) 204AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc])
208 205
209# pkg-config based tests 206# pkg-config based tests
210PKG_PROG_PKG_CONFIG 207PKG_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
292fi 308fi