Opened 5 years ago

Last modified 19 months ago

#1682 new change

Build without ncursesw5-config

Reported by: nicm Owned by:
Milestone: Ongoing Keywords:
Cc:

Description

OpenBSD doesn't have ncursesw5-config and I expect won't for a while (if ever), so how about checking if -lncursesw works too before bailing. Something like this (also attached):

diff --git a/acinclude.m4 b/acinclude.m4
index b623a82..e66ce49 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -350,11 +350,16 @@ AC_ARG_ENABLE(ncursestest, [  --disable-ncursestest       Do not try to compile
   AC_MSG_CHECKING(for ncurses - wide char support)
   no_ncurses=""
   if test "$NCURSES_CONFIG" = "no" ; then
-    no_ncurses=yes
-  else
+    AC_MSG_RESULT(yes)
+    AC_SEARCH_LIBS(setupterm, ncursesw, [NCURSES_LIBS="-lncursesw"], no_ncurses=no)
+  else
+    AC_MSG_RESULT(no)
     NCURSES_CFLAGS=`$NCURSES_CONFIG $ncurses_args --cflags`
     NCURSES_LIBS=`$NCURSES_CONFIG $ncurses_args --libs`
+  fi

+  if test "x$no_ncurses" = x ; then
+    AC_MSG_CHECKING(if ncurses works)
     ac_save_CFLAGS="$CFLAGS"
     ac_save_LIBS="$LIBS"
     CFLAGS="$CFLAGS $NCURSES_CFLAGS"

Attachments (2)

acinclude.m4.diff (788 bytes) - added by nicm 5 years ago.
acinclude.m4.diff2 (788 bytes) - added by nicm 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by nicm

comment:1 Changed 5 years ago by nicm

  • Summary changed from Build with ncursesw5-config to Build without ncursesw5-config

Changed 5 years ago by nicm

comment:2 Changed 5 years ago by nicm

Erm, this time with yes and no the right way round:

diff --git a/acinclude.m4 b/acinclude.m4
index b623a82..5e9d0d4 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -350,11 +350,16 @@ AC_ARG_ENABLE(ncursestest, [  --disable-ncursestest       Do not try to compile
   AC_MSG_CHECKING(for ncurses - wide char support)
   no_ncurses=""
   if test "$NCURSES_CONFIG" = "no" ; then
-    no_ncurses=yes
-  else
+    AC_MSG_RESULT(no)
+    AC_SEARCH_LIBS(setupterm, ncursesw, [NCURSES_LIBS="-lncursesw"], no_ncurses=no)
+  else 
+    AC_MSG_RESULT(yes)
     NCURSES_CFLAGS=`$NCURSES_CONFIG $ncurses_args --cflags`
     NCURSES_LIBS=`$NCURSES_CONFIG $ncurses_args --libs`
+  fi
 
+  if test "x$no_ncurses" = x ; then
+    AC_MSG_CHECKING(if ncurses works)
     ac_save_CFLAGS="$CFLAGS"
     ac_save_LIBS="$LIBS"
     CFLAGS="$CFLAGS $NCURSES_CFLAGS"

comment:3 Changed 4 years ago by takkaria

See also #1638

comment:4 Changed 19 months ago by nckmccnnll

  • Milestone changed from Triage to Ongoing

Calling this ongoing

Note: See TracTickets for help on using tickets.