comparison configure.ac @ 28365:9fa1de6d508a

Properly detect libpanel by including ncurses libs in linking test. Patch from Brad "brad0" Smith. Closes #9972.
author Paul Aurich <paul@darkrain42.org>
date Thu, 20 Aug 2009 03:40:09 +0000
parents aa098151ca49
children a3bcf06057f0
comparison
equal deleted inserted replaced
28364:cf533027c3be 28365:9fa1de6d508a
630 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR], 630 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
631 [compile finch against the ncurses includes in DIR])], 631 [compile finch against the ncurses includes in DIR])],
632 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""]) 632 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
633 if test "x$enable_consoleui" = "xyes"; then 633 if test "x$enable_consoleui" = "xyes"; then
634 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no]) 634 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
635 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no]) 635 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
636 [enable_consoleui=no], [$GNT_LIBS])
636 637
637 if test "x$enable_consoleui" = "xyes"; then 638 if test "x$enable_consoleui" = "xyes"; then
638 dnl # Some distros put the headers in ncursesw/, some don't 639 dnl # Some distros put the headers in ncursesw/, some don't
639 found_ncurses_h=no 640 found_ncurses_h=no
640 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include 641 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
673 fi 674 fi
674 else 675 else
675 # ncursesw was not found. Look for plain old ncurses 676 # ncursesw was not found. Look for plain old ncurses
676 enable_consoleui=yes 677 enable_consoleui=yes
677 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no]) 678 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
678 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no]) 679 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
680 [enable_consoleui=no], [$GNT_LIBS])
679 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.]) 681 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
680 if test x"$ac_ncurses_includes" != "x"; then 682 if test x"$ac_ncurses_includes" != "x"; then
681 GNT_CFLAGS="-I$ac_ncurses_includes" 683 GNT_CFLAGS="-I$ac_ncurses_includes"
682 else 684 else
683 if test x"$NCURSES_HEADERS" != "x"; then 685 if test x"$NCURSES_HEADERS" != "x"; then