]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Replace ncurses by curses.
authorAndre Noll <maan@systemlinux.org>
Fri, 25 Feb 2011 16:13:08 +0000 (17:13 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 12 Mar 2011 17:36:49 +0000 (18:36 +0100)
Ncurses is not available on all platforms, and para_gui should work
with any curses implementation.

So this patch replaces the --with-ncurses-headers and
--with-ncurses-libs configure options by --with-ncurses-headers and
--with-ncurses-libs, and makes configure check for libcurses instead
of libncurses. Moreover, the para_gui executable is now linked against
libcurses rather than libncurses.

On linux systems, this should be a no-op.

Makefile.in
configure.ac

index c64b5ae7250ce5cceb178f39089319ae38894a11..8a769607d57b4930ff62e37f73ea0d84ea4ce273 100644 (file)
@@ -54,7 +54,7 @@ CPPFLAGS += -Wbad-function-cast
 CPPFLAGS += -fno-strict-aliasing
 CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F)
 CPPFLAGS += @SSL_CPPFLAGS@
-CPPFLAGS += @ncurses_cppflags@
+CPPFLAGS += @curses_cppflags@
 CPPFLAGS += @arch_cppflags@
 CPPFLAGS += -I/usr/local/include
 CPPFLAGS += -I$(cmdline_dir)
@@ -245,7 +245,7 @@ para_client: $(client_objs)
 
 para_gui: $(gui_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
-       $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lncurses
+       $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lcurses
 
 para_audiod: audiod_command_list.c audiod_command_list.h $(audiod_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
index 1b2dc11446ef04de20e0ed24125b41c2c9b22097..e5a23438dbdcb989abe8d1f4556bc4f1bd689fa5 100644 (file)
@@ -353,31 +353,31 @@ if test ${have_ucred} = yes; then
 fi
 
 ########################################################################### curses
-have_ncurses="yes"
+have_curses="yes"
 OLD_CPPFLAGS="$CPPFLAGS"
 OLD_LD_FLAGS="$LDFLAGS"
 OLD_LIBS="$LIBS"
-AC_ARG_WITH(ncurses_headers, [AC_HELP_STRING(--with-ncurses-headers=dir,
-       [look for ncurses.h also in dir])])
-if test -n "$with_ncurses_headers"; then
-       ncurses_cppflags="-I$with_ncurses_headers"
-       CPPFLAGS="$CPPFLAGS $ncurses_cppflags"
+AC_ARG_WITH(curses_headers, [AC_HELP_STRING(--with-curses-headers=dir,
+       [look for curses.h also in dir])])
+if test -n "$with_curses_headers"; then
+       curses_cppflags="-I$with_curses_headers"
+       CPPFLAGS="$CPPFLAGS $curses_cppflags"
 fi
-AC_ARG_WITH(ncurses_libs, [AC_HELP_STRING(--with-ncurses-libs=dir,
-       [look for libncurses also in dir])])
-if test -n "$with_ncurses_libs"; then
-       ncurses_libs="-L$with_ncurses_libs"
-       LDFLAGS="$LDFLAGS $ncurses_libs"
+AC_ARG_WITH(curses_libs, [AC_HELP_STRING(--with-curses-libs=dir,
+       [look for libcurses also in dir])])
+if test -n "$with_curses_libs"; then
+       curses_libs="-L$with_curses_libs"
+       LDFLAGS="$LDFLAGS $curses_libs"
 fi
 AC_CHECK_HEADER(curses.h, [], [
-       have_ncurses="no"
+       have_curses="no"
 ])
-AC_CHECK_LIB([ncurses], [initscr], [], [
-       have_ncurses="no"
+AC_CHECK_LIB([curses], [initscr], [], [
+       have_curses="no"
 ])
-if test "$have_ncurses" = "yes"; then
-       AC_SUBST(ncurses_cppflags)
-       AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on ncurses support])
+if test "$have_curses" = "yes"; then
+       AC_SUBST(curses_cppflags)
+       AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on curses support])
        extras="$extras gui"
        executables="$executables gui"
 else