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 ============================================================== @@ -67,6 +67,7 @@ AC_PROG_CPP AC_SEARCH_LIBS([strerror],[cposix]) AC_PROG_RANLIB +AM_PROG_AR dnl ============================================================== @@ -178,19 +179,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 +320,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 +401,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)