From 462b1973f28bd6f021b02cd3e6b44edc0c7f5502 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 17 Mar 2008 10:49:41 +0100 Subject: [PATCH] Fix compilation of para_fade in certain cases. We really need to do the _cmdline_objs and _errlist_objs dance in configure.ac. Also, fix the configure warning message in case linux/soundcard.h was found but alsa wasn't, and remove the object list of para_fsck from Makefile.in. --- Makefile.in | 7 ++----- configure.ac | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index 3e5239cf..1ae7ce6a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,9 +72,6 @@ all: $(BINARIES) $(man_pages) man: $(man_pages) tarball: $(tarball) -fade_objs := fade.cmdline.o fade.o exec.o close_on_fork.o string.o fd.o -fsck_objs := osl.o rbtree.o fsck.o string.o sha1.o fsck.cmdline.o - *.o: para.h config.h gcc-compat.h include Makefile.deps @@ -203,8 +200,8 @@ para_audiod: @audiod_objs@ para_audioc: @audioc_objs@ $(CC) $(LDFLAGS) -o $@ @audioc_objs@ @audioc_ldflags@ -para_fade: $(fade_objs) - $(CC) $(LDFLAGS) -o $@ $(fade_objs) +para_fade: @fade_objs@ + $(CC) $(LDFLAGS) -o $@ @fade_objs@ para_server: @server_objs@ $(CC) $(LDFLAGS) -o $@ @server_objs@ @server_ldflags@ diff --git a/configure.ac b/configure.ac index c435e371..7679b31a 100644 --- a/configure.ac +++ b/configure.ac @@ -143,6 +143,11 @@ gui_errlist_objs="exec close_on_fork signal string stat ringbuffer fd" gui_other_objs="gui gui_theme" gui_objs="$gui_cmdline_objs $gui_errlist_objs $gui_other_objs" +fade_cmdline_objs="fade.cmdline" +fade_errlist_objs="fade exec close_on_fork string fd" + + + ########################################################################### ssl dnl @synopsis CHECK_SSL dnl @@ -437,17 +442,19 @@ OLD_LIBS="$LIBS" if test "$OSTYPE" != "Linux"; then have_alsa="no" fi -msg="=> can not build para_fade, and no alsa support for para_audiod/para_write" +msg="=> will not build para_fade" if test "$have_alsa" = "yes"; then - AC_CHECK_HEADER(linux/soundcard.h, - [extras="$extras para_fade"], + AC_CHECK_HEADER(linux/soundcard.h, [ + extras="$extras para_fade" + all_executables="$all_executables fade" + ], [ have_alsa="no" AC_MSG_WARN([no linux/soundcard.h $msg]) ] ) fi - +msg="=> no alsa support for para_audiod/para_write" if test "$have_alsa" = "yes"; then AC_CHECK_HEADERS([alsa/asoundlib.h], [], [ have_alsa="no" @@ -535,7 +542,6 @@ AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)]) AC_DEFUN([objlist_to_errlist],[$(for i in $@; do printf "DEFINE_ERRLIST($(echo $i| tr 'a-z' 'A-Z'));"; done) [const char **para_errlist[[]]] = {$(for i in $@; do printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; done) }]) ############################################################# error2.h - AC_DEFUN([define_safe_error_enums], [ exe="" @@ -630,6 +636,7 @@ client_objs="$client_cmdline_objs $client_errlist_objs" fsck_objs="$fsck_cmdline_objs $fsck_errlist_objs" audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs" afh_objs="$afh_cmdline_objs $afh_errlist_objs" +fade_objs="$fade_cmdline_objs $fade_errlist_objs" AC_SUBST(recv_objs, add_dot_o($recv_objs)) AC_SUBST(recv_ldflags, $recv_ldflags) @@ -680,6 +687,10 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs)) AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS, objlist_to_errlist($gui_errlist_objs), errors used by para_gui) +AC_SUBST(fade_objs, add_dot_o($fade_objs)) +AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS, + objlist_to_errlist($fade_errlist_objs), errors used by para_fade) + enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)" AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS, enum of supported writers) -- 2.39.5