summaryrefslogtreecommitdiff
blob: 7ca30e6da689564af899b28dc1647582f939d46b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Fix build system to properly install files and prevent underlinking.

--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@
 
 AC_CANONICAL_HOST
 
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_SRCDIR([src/muse.cpp])
 
 dnl ==============================================================
@@ -56,7 +56,7 @@
 
 
 #GLOBAL_CFLAGS="-O4 -D_REENTRANT -fomit-frame-pointer -march=${host_cpu} -ffast-math -malign-double -funroll-loops -pipe"
-GLOBAL_CFLAGS="-pipe -D_REENTRANT -Wall"
+GLOBAL_CFLAGS="-D_REENTRANT -Wall"
 
 
 dnl ==============================================================
@@ -178,19 +178,12 @@
 # this is really libcdk's configuration, needs to be reviewed if correct
 # see src/ncursesgui/libcdk
 if test x$want_ncurses_gui = xyes; then
-  AC_CHECK_LIB(termcap, waddstr,
-               [have_termcap=yes], [have_termcap=no])
-
-  AC_CHECK_LIB(ncurses, start_color,
-               AC_DEFINE([HAVE_START_COLOR], 1, [Have start_color]))
-
-  AC_CHECK_LIB(ncurses, initscr,
-               [have_ncurses=yes], [have_ncurses=no])
-
-  AC_CHECK_HEADERS([ncurses.h],
-                   [have_ncurses_h=yes], [have_ncurses_h=no])
-
-  AC_CHECK_FUNC(XCursesExit, AC_DEFINE(HAVE_XCURSES, 1, [Build with xcurses]))
+  PKG_CHECK_MODULES([NCURSES], [ncurses], [
+    AC_DEFINE([HAVE_START_COLOR], 1, [Have start_color])
+    have_ncurses=yes
+    have_ncurses_h=yes
+    have_termcap=yes
+  ])
 
   if test x$have_ncurses_h = xyes; then
     AC_DEFINE([GUI_RUBIK], 1, [Have ncurses GUI])
@@ -326,8 +319,13 @@
 
 
 dnl documentation
-AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
-AM_CONDITIONAL(BUILD_DOC, [test -n "$DOXYGEN"])
+AC_ARG_ENABLE([doc],
+  AS_HELP_STRING([--enable-doc], [Enable building documentation using doxygen]))
+AS_IF([test "x$enable_doc" = "xyes"], [
+  dnl Enable doc building
+  AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
+])
+AM_CONDITIONAL(BUILD_DOC, [test "x$enable_doc" = "xyes"])
 
 
 dnl ==============================================================
@@ -402,6 +400,7 @@
 
 AC_CONFIG_FILES([
 Makefile
+src/ncursesgui/libcdk/Makefile
 doc/muse.doxygen
 ])
 AC_OUTPUT
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,9 +4,6 @@
 
 SUBDIRS = $(LIBCDKDIR)
 
-dist_docs_DATA = README COPYING AUTHORS NEWS KNOWN-BUGS ChangeLog TODO USAGE
-docsdir = ${prefix}/share/doc/${PACKAGE}
-
 dist_man_MANS = doc/muse.1
 
 ACLOCAL_AMFLAGS = -I m4
@@ -71,7 +68,9 @@
   $(SAMPLERATE_LIBS) \
   $(SHOUT_LIBS) \
   $(SNDFILE_LIBS) \
-  $(VORBIS_LIBS)
+  $(VORBIS_LIBS) \
+  $(GTK2_LIBS) \
+  $(NCURSES_LIBS)
 
 src_muse_DEPENDENCIES = \
   $(GUI_OBJECTS)