Mercurial > pidgin
comparison configure.ac @ 15250:85aae248c589
[gaim-migrate @ 18040]
Fix bug #1618129. Add a --with-ncurses-headers option for configure. The script
will also look in NCURSES_HEADERS environment variable.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 21 Dec 2006 23:57:27 +0000 |
parents | ce2212022a6b |
children | 4458ed5f8c4c |
comparison
equal
deleted
inserted
replaced
15249:4730550da5fa | 15250:85aae248c589 |
---|---|
368 dnl ####################################################################### | 368 dnl ####################################################################### |
369 dnl # Check for ncurses and other things used by the console UI | 369 dnl # Check for ncurses and other things used by the console UI |
370 dnl ####################################################################### | 370 dnl ####################################################################### |
371 GNT_LIBS="" | 371 GNT_LIBS="" |
372 GNT_CFLAGS="" | 372 GNT_CFLAGS="" |
373 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR], | |
374 [compile gaim-text against the ncurses includes in DIR])], | |
375 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""]) | |
373 if test "x$enable_consoleui" = "xyes"; then | 376 if test "x$enable_consoleui" = "xyes"; then |
374 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no]) | 377 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no]) |
375 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no]) | 378 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no]) |
376 | 379 |
377 if test "x$enable_consoleui" = "xyes"; then | 380 if test "x$enable_consoleui" = "xyes"; then |
378 dnl # Some distros put the headers in ncursesw/, some don't | 381 dnl # Some distros put the headers in ncursesw/, some don't |
379 found_ncurses_h=no | 382 found_ncurses_h=no |
380 for f in /usr/include/ncursesw/ncurses.h /usr/include/ncurses.h | 383 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include |
381 do | 384 do |
385 f="$location/ncurses.h" | |
382 AC_CHECK_HEADER($f,[ | 386 AC_CHECK_HEADER($f,[ |
383 AC_MSG_CHECKING([if $f supports wide characters]) | 387 AC_MSG_CHECKING([if $f supports wide characters]) |
384 AC_TRY_COMPILE([ | 388 AC_TRY_COMPILE([ |
385 #define _XOPEN_SOURCE_EXTENDED | 389 #define _XOPEN_SOURCE_EXTENDED |
386 #include <$f> | 390 #include <$f> |
387 ], [ | 391 ], [ |
388 #ifndef get_wch | 392 #ifndef get_wch |
389 # error get_wch not found! | 393 # error get_wch not found! |
390 #endif | 394 #endif |
391 ], [ | 395 ], [ |
392 dir=`dirname $f` | 396 dir=location |
393 if test x"$dir" != x"." ; then | 397 if test x"$dir" != x"." ; then |
394 GNT_CFLAGS="-I$dir/" | 398 GNT_CFLAGS="-I$dir/" |
395 else | 399 else |
396 GNT_CFLAGS="" | 400 GNT_CFLAGS="" |
397 fi | 401 fi |
417 # ncursesw was not found. Look for plain old ncurses | 421 # ncursesw was not found. Look for plain old ncurses |
418 enable_consoleui=yes | 422 enable_consoleui=yes |
419 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no]) | 423 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no]) |
420 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no]) | 424 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no]) |
421 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.]) | 425 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.]) |
426 if test x"$ac_ncurses_includes" != "x"; then | |
427 GNT_CFLAGS="-I$ac_ncurses_includes" | |
428 else | |
429 if test x"$NCURSES_HEADERS" != "x"; then | |
430 GNT_CFLAGS="-I$NCURSES_HEADERS" | |
431 fi | |
432 fi | |
422 fi | 433 fi |
423 | 434 |
424 PKG_CHECK_MODULES(X11, x11, | 435 PKG_CHECK_MODULES(X11, x11, |
425 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) | 436 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) |
426 AC_SUBST(X11_LIBS) | 437 AC_SUBST(X11_LIBS) |