Mercurial > pidgin
comparison finch/libgnt/configure.ac @ 16125:5f204f55af09
Add a utility function to create widgets from an XML description.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 15 Apr 2007 05:49:27 +0000 |
parents | 0e3a8505ebbe |
children | 36d9409dab58 |
comparison
equal
deleted
inserted
replaced
16124:ab3f93232a2d | 16125:5f204f55af09 |
---|---|
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 GNT_CFLAGS= | 204 GNT_CFLAGS= |
205 GNT_LIBS= | 205 GNT_LIBS= |
206 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR], | |
207 [compile finch against the ncurses includes in DIR])], | |
208 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""]) | |
206 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no]) | 209 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]) | 210 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no]) |
208 | 211 |
209 # If ncursesw is not found, look for plain old ncurses | 212 # If ncursesw is not found, look for plain old ncurses |
210 if test "x$enable_gnt" = "xno"; then | 213 if test "x$enable_gnt" = "xno"; then |
212 AC_CHECK_LIB(panel, update_panels, [[GNT_LIBS="$GNT_LIBS -lpanel"] [enable_gnt=yes]], [enable_gnt=no]) | 215 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.]) | 216 AC_DEFINE(NO_WIDECHAR, [1], [Define to 1 if you do not have ncursesw.]) |
214 else | 217 else |
215 dnl # Some distros put the headers in ncursesw/, some don't | 218 dnl # Some distros put the headers in ncursesw/, some don't |
216 found_ncurses_h=no | 219 found_ncurses_h=no |
217 for f in /usr/include/ncursesw/ncurses.h /usr/include/ncurses.h | 220 for location in $ac_ncurses_includes /usr/include/ncursesw /usr/include |
218 do | 221 do |
222 f="$location/ncurses.h" | |
219 AC_CHECK_HEADER($f,[ | 223 AC_CHECK_HEADER($f,[ |
220 AC_MSG_CHECKING([if $f supports wide characters]) | 224 AC_MSG_CHECKING([if $f supports wide characters]) |
221 AC_TRY_COMPILE([ | 225 AC_TRY_COMPILE([ |
222 #define _XOPEN_SOURCE_EXTENDED | 226 #define _XOPEN_SOURCE_EXTENDED |
223 #include <$f> | 227 #include <$f> |
224 ], [ | 228 ], [ |
225 #ifndef get_wch | 229 #ifndef get_wch |
226 # error get_wch not found! | 230 # error get_wch not found! |
227 #endif | 231 #endif |
228 ], [ | 232 ], [ |
229 dir=`dirname $f` | 233 dir=$location |
230 if test x"$dir" != x"." ; then | 234 if test x"$dir" != x"." ; then |
231 GNT_CFLAGS="-I$dir/" | 235 GNT_CFLAGS="-I$dir/" |
232 else | 236 else |
233 GNT_CFLAGS="" | 237 GNT_CFLAGS="" |
234 fi | 238 fi |
239 ], [ | 243 ], [ |
240 AC_MSG_RESULT([no]) | 244 AC_MSG_RESULT([no]) |
241 ]) | 245 ]) |
242 ]) | 246 ]) |
243 done | 247 done |
248 if test x"$found_ncurses_h" != "xyes"; then | |
249 enable_gnt="no" | |
250 fi | |
244 fi | 251 fi |
245 AC_SUBST(GNT_CFLAGS) | 252 AC_SUBST(GNT_CFLAGS) |
246 AC_SUBST(GNT_LIBS) | 253 AC_SUBST(GNT_LIBS) |
247 | 254 |
248 if test "x$enable_gnt" = "xno"; then | 255 if test "x$enable_gnt" = "xno"; then |
249 AC_MSG_ERROR([ | 256 AC_MSG_ERROR([ |
250 *** You need ncursesw or ncurses.]) | 257 *** You need ncursesw or ncurses and its header files.]) |
258 fi | |
259 | |
260 dnl Check for libxml | |
261 have_libxml=yes | |
262 PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [ | |
263 AC_MSG_RESULT(no) | |
264 have_libxml=no | |
265 ]) | |
266 AC_SUBST(LIBXML_CFLAGS) | |
267 AC_SUBST(LIBXML_LIBS) | |
268 | |
269 if test "x$have_libxml" = "xno"; then | |
270 AC_DEFINE(NO_LIBXML, 1, [Do not have libxml2.]) | |
251 fi | 271 fi |
252 | 272 |
253 AC_OUTPUT([Makefile | 273 AC_OUTPUT([Makefile |
254 gnt.pc | 274 gnt.pc |
255 wms/Makefile | 275 wms/Makefile |