Mercurial > pidgin.yaz
comparison console/libgnt/configure.ac @ 14477:ca36763497d9
[gaim-migrate @ 17195]
Build libgnt with ncurses if ncursesw is not found. I uninstalled ncursesw
and it's still working for me .. of course, with no wide-character support.
Improve the mouse support a bit.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 09 Sep 2006 02:19:16 +0000 |
parents | b50aa149e09d |
children |
comparison
equal
deleted
inserted
replaced
14476:218a36c1c9e2 | 14477:ca36763497d9 |
---|---|
180 AC_SUBST(CFLAGS) | 180 AC_SUBST(CFLAGS) |
181 | 181 |
182 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0],, | 182 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0],, |
183 [ | 183 [ |
184 AC_MSG_ERROR([ | 184 AC_MSG_ERROR([ |
185 *** GLib 2.0 is required to build Gaim; please make sure you have the GLib | 185 *** GLib 2.0 is required to build LibGNT; please make sure you have the GLib |
186 *** development headers installed. The latest version of GLib is | 186 *** development headers installed. The latest version of GLib is |
187 *** always available at http://www.gtk.org/.]) | 187 *** always available at http://www.gtk.org/.]) |
188 ]) | 188 ]) |
189 AC_SUBST(GLIB_CFLAGS) | 189 AC_SUBST(GLIB_CFLAGS) |
190 AC_SUBST(GLIB_LIBS) | 190 AC_SUBST(GLIB_LIBS) |
199 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) | 199 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) |
200 AC_CHECK_HEADERS(termios.h) | 200 AC_CHECK_HEADERS(termios.h) |
201 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) | 201 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])]) |
202 #AC_VAR_TIMEZONE_EXTERNALS | 202 #AC_VAR_TIMEZONE_EXTERNALS |
203 | 203 |
204 AC_CHECK_LIB(ncursesw, initscr, , [AC_MSG_ERROR([ | 204 GNT_CFLAGS= |
205 *** You need ncursesw. ])]) | 205 GNT_LIBS= |
206 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no]) | |
207 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no]) | |
208 | |
209 # If ncursesw is not found, look for plain old ncurses | |
210 if test "x$enable_gnt" = "xno"; then | |
211 AC_CHECK_LIB(ncurses, initscr, [[GNT_LIBS="-lncurses"] [enable_gnt=yes]], [enable_gnt=no]) | |
212 AC_CHECK_LIB(panel, update_panels, [[GNT_LIBS="$GNT_LIBS -lpanel"] [enable_gnt=yes]], [enable_gnt=no]) | |
213 AC_DEFINE(NO_WIDECHAR, [1], [Define to 1 if you do not have ncursesw.]) | |
214 else | |
215 dnl # Some distros put the headers in ncursesw/, some don't | |
216 found_ncurses_h=no | |
217 for f in /usr/include/ncursesw/ncurses.h /usr/include/ncurses.h | |
218 do | |
219 AC_CHECK_HEADER($f,[ | |
220 AC_MSG_CHECKING([if $f supports wide characters]) | |
221 AC_TRY_COMPILE([ | |
222 #define _XOPEN_SOURCE_EXTENDED | |
223 #include <$f> | |
224 ], [ | |
225 #ifndef get_wch | |
226 # error get_wch not found! | |
227 #endif | |
228 ], [ | |
229 dir=`dirname $f` | |
230 if test x"$dir" != x"." ; then | |
231 GNT_CFLAGS="-I$dir/" | |
232 else | |
233 GNT_CFLAGS="" | |
234 fi | |
235 | |
236 found_ncurses_h=yes | |
237 AC_MSG_RESULT([yes]) | |
238 break | |
239 ], [ | |
240 AC_MSG_RESULT([no]) | |
241 ]) | |
242 ]) | |
243 done | |
244 fi | |
245 AC_SUBST(GNT_CFLAGS) | |
246 AC_SUBST(GNT_LIBS) | |
247 | |
248 if test "x$enable_gnt" = "xno"; then | |
249 AC_MSG_ERROR([ | |
250 *** You need ncursesw or ncurses.]) | |
251 fi | |
206 | 252 |
207 AC_OUTPUT([Makefile | 253 AC_OUTPUT([Makefile |
208 gnt.pc | 254 gnt.pc |
209 wms/Makefile | 255 wms/Makefile |
210 ]) | 256 ]) |