write_errlist_objs="write write_common file_write time fd string sched stdin"
write_ldflags=""
writers=" file"
+default_writer="FILE_WRITE"
client_cmdline_objs="client.cmdline"
client_errlist_objs="client net string crypt fd sched stdin stdout client_common"
write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
write_ldflags="$write_ldflags $f"
writers="$writers osx"
+ default_writer="OSX_WRITE"
AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
fi
########################################################################### gtk2
write_cmdline_objs="$write_cmdline_objs alsa_write.cmdline"
write_ldflags="$write_ldflags -lasound"
writers="$writers alsa"
+ default_writer="ALSA_WRITE"
fi
CPPFLAGS="$OLD_CPPFLAGS"
LDFLAGS="$OLD_LDFLAGS"
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)
+AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
names="$(for i in $writers; do printf \"$i\",' ' ; done)"
AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
struct writer_node_group *setup_default_wng(void)
{
struct writer_node_group *wng = wng_new(1);
- enum writer_enum default_writer;
-
- if (NUM_SUPPORTED_WRITERS == 1)
- default_writer = FILE_WRITE;
- else
- default_writer = 1;
- wng->writer_nodes[0].writer = &writers[default_writer];
+ wng->writer_nodes[0].writer = &writers[DEFAULT_WRITER];
PARA_INFO_LOG("using default writer: %s %p\n",
- writer_names[default_writer], writers[default_writer].parse_config);
- wng->writer_nodes[0].conf = writers[default_writer].parse_config("");
+ writer_names[DEFAULT_WRITER], writers[DEFAULT_WRITER].parse_config);
+ wng->writer_nodes[0].conf = writers[DEFAULT_WRITER].parse_config("");
return wng;
}