Finish the --without-curses support.
authorYann Dirson <ydirson@free.fr>
Sat, 19 Oct 2013 19:27:11 +0000 (21:27 +0200)
committerYann Dirson <ydirson@free.fr>
Sat, 19 Oct 2013 19:27:11 +0000 (21:27 +0200)
Now that all the silly problems refering to Curses-specific functions from
unrelated places are all solved, we can spare linking cursesdsp when not
required.

configure.ac
gnushogi/Makefile.in

index 6a710a0..5d16f66 100644 (file)
@@ -36,7 +36,8 @@ AC_ARG_WITH([curses],
 LIBCURSES=
 AS_IF([test "x$with_curses" != xno],
   [AC_CHECK_LIB([curses], [clrtoeol],
-    [AC_SUBST([LIBCURSES], ["-lcurses"])
+    [AC_SUBST([LIBCURSES], [-lcurses])
+     AC_SUBST([CURSESDSP], [cursesdsp.o])
      AC_DEFINE([HAVE_LIBCURSES], [1],
                [Define if you have lib])
     ],
index 09d4245..013beb6 100644 (file)
@@ -60,7 +60,7 @@ INFODIR = $(prefix)/info
 LIBS    = -lm
 
 # Display routines.
-LCURSES =   -lcurses -ltermcap
+LCURSES = @LIBCURSES@
 
 
 #
@@ -112,7 +112,7 @@ COMMONFILES = \
                 attacks.o      \
                 book.o         \
                 commondsp.o    \
-                cursesdsp.o    \
+                @CURSESDSP@    \
                 dspwrappers.o  \
                 eval.o         \
                 genmove.o      \