summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilippo Giunchedi <filippo@esaurito.net>2009-11-07 13:07:03 (GMT)
committer Filippo Giunchedi <filippo@esaurito.net>2009-11-08 13:04:46 (GMT)
commit9cf4ca63aa65f572e25924332c394973c6c7fb22 (patch)
treeffd5a88bb8c3dceee6ba989353a109739726ffd5
parentd574bd581e103c541f08e7d9d310384796caabcb (diff)
conditional compilation for ncurses/gtk GUIs
-rw-r--r--Makefile.am10
-rw-r--r--configure.ac4
2 files changed, 12 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 34eb2fc..7a52c85 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = lib/libmpeg src/ncursesgui/libcdk
+if NCURSES_GUI
+LIBCDKDIR = src/ncursesgui/libcdk
+endif
+
+SUBDIRS = lib/libmpeg $(LIBCDKDIR)
dist_docs_DATA = README COPYING AUTHORS NEWS KNOWN-BUGS ChangeLog TODO USAGE
docsdir = ${prefix}/share/doc/${PACKAGE}
@@ -103,6 +107,7 @@ EXTRA_DIST += src/vumeter.c src/xmlprofile.cpp src/profile.cpp
## src/gtkgui2
+if GTK2_GUI
noinst_LIBRARIES += src/gtkgui2/libnightolo2.a
src_gtkgui2_libnightolo2_a_SOURCES = \
src/gtkgui2/about.cpp \
@@ -147,9 +152,11 @@ noinst_HEADERS += \
src/gtkgui2/xmlprofile.h
EXTRA_DIST += src/gtkgui2/xpm2
+endif
## src/ncursesgui
+if NCURSES_GUI
noinst_LIBRARIES += src/ncursesgui/librubik.a
src_ncursesgui_librubik_a_SOURCES = \
src/ncursesgui/entry.cpp \
@@ -198,6 +205,7 @@ EXTRA_DIST += \
src/ncursesgui/coltable.c \
src/ncursesgui/muse_console.cpp \
src/ncursesgui/testgui.sh
+endif
## doc/
diff --git a/configure.ac b/configure.ac
index 7a93d49..823f652 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,10 +196,11 @@ if test x$want_ncurses_gui = xyes; then
AC_CHECK_FUNC(XCursesExit, AC_DEFINE(HAVE_XCURSES, 1, [Build with xcurses]))
- if test x$have_ncurses_h = xyes && test x$want_ncurses != xno; then
+ if test x$have_ncurses_h = xyes; then
AC_DEFINE([GUI_RUBIK], 1, [Have ncurses GUI])
fi
fi
+AM_CONDITIONAL(NCURSES_GUI, [test x$want_ncurses_gui = xyes])
dnl ==================
@@ -232,6 +233,7 @@ if test x$want_gtk2_gui = xyes || test x$want_gtk2_gui = xauto; then
want_gtk2_gui=no
fi
fi
+AM_CONDITIONAL(GTK2_GUI, [test x$want_gtk2_gui = xyes])
dnl ===============