From 1d2971bb99c02eaafc2959b6c6d64de51def76b2 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 10 Jan 2012 15:52:41 +0100 Subject: [PATCH] move UltraGrid version to autoconf --- ultragrid/Makefile.in | 6 +----- ultragrid/VERSION | 1 - ultragrid/configure.ac | 3 ++- ultragrid/src/audio/audio.c | 5 ++--- ultragrid/src/main.c | 9 ++++----- 5 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 ultragrid/VERSION diff --git a/ultragrid/Makefile.in b/ultragrid/Makefile.in index e45c3fc8c..c01911472 100644 --- a/ultragrid/Makefile.in +++ b/ultragrid/Makefile.in @@ -104,11 +104,7 @@ DVS_UV_LIB_LIB = @DVS_LIB@ # ------------------------------------------------------------------------------------------------- all: $(TARGET) $(DVS_UV_LIB) ag-plugins suggest-tests -src/version.h: VERSION - @echo "Generating src/version.h" - @sed -e 's/.*/#define ULTRAGRID_VERSION "UltraGrid v&"/' VERSION > src/version.h - -$(TARGET): src/version.h $(OBJS) src/main.o +$(TARGET): $(OBJS) src/main.o @if [ ! -d bin ]; then mkdir bin; fi $(LINKER) $(CFLAGS) $(LDFLAGS) $(OBJS) src/main.o $(LIBS) -o $(TARGET) diff --git a/ultragrid/VERSION b/ultragrid/VERSION deleted file mode 100644 index d3827e75a..000000000 --- a/ultragrid/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.0 diff --git a/ultragrid/configure.ac b/ultragrid/configure.ac index cf31bb9f7..79d1084c6 100644 --- a/ultragrid/configure.ac +++ b/ultragrid/configure.ac @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT +AC_INIT([UltraGrid], [1.0], [ultragrid-dev@cesnet.cz]) +AM_INIT_AUTOMAKE([1.9]) AC_CONFIG_SRCDIR([src/main.c]) PARENT=`echo $PWD | sed -e 's%/[[^/]]*$%%'` diff --git a/ultragrid/src/audio/audio.c b/ultragrid/src/audio/audio.c index f4748aeb2..56a4be8ff 100644 --- a/ultragrid/src/audio/audio.c +++ b/ultragrid/src/audio/audio.c @@ -63,7 +63,6 @@ #include "rtp/rtp.h" #include "rtp/rtp_callback.h" #include "rtp/pbuf.h" -#include "version.h" #include "tv.h" #include "transmit.h" #include "pdb.h" @@ -238,7 +237,7 @@ void print_audio_playback_devices() struct state_audio * audio_cfg_init(char *addrs, char *send_cfg, char *recv_cfg, char *jack_cfg) { struct state_audio *s = NULL; - char *tmp, *unused; + char *tmp, *unused = NULL; char *addr; int i; @@ -454,7 +453,7 @@ static struct rtp *initialize_audio_network(char *addr, struct pdb *participants pdb_add(participants, rtp_my_ssrc(r)); rtp_set_option(r, RTP_OPT_WEAK_VALIDATION, TRUE); rtp_set_sdes(r, rtp_my_ssrc(r), RTCP_SDES_TOOL, - ULTRAGRID_VERSION, strlen(ULTRAGRID_VERSION)); + PACKAGE_STRING, strlen(PACKAGE_VERSION)); } return r; diff --git a/ultragrid/src/main.c b/ultragrid/src/main.c index 0c5b82c2b..e7451b675 100644 --- a/ultragrid/src/main.c +++ b/ultragrid/src/main.c @@ -72,7 +72,6 @@ #include "tv.h" #include "transmit.h" #include "tfrc.h" -#include "version.h" #include "ihdtv/ihdtv.h" #include "compat/platform_semaphore.h" #include "audio/audio.h" @@ -331,7 +330,7 @@ static struct rtp **initialize_network(char *addrs, struct pdb *participants) TRUE); rtp_set_sdes(devices[index], rtp_my_ssrc(devices[index]), RTCP_SDES_TOOL, - ULTRAGRID_VERSION, strlen(ULTRAGRID_VERSION)); + PACKAGE_STRING, strlen(PACKAGE_STRING)); pdb_add(participants, rtp_my_ssrc(devices[index])); } else { @@ -413,7 +412,7 @@ static void *receiver_thread(void *arg) int i = 0; int ret; unsigned int tiles_post = 0; - struct timeval last_tile_received; + struct timeval last_tile_received = {0, 0}; struct state_decoder *dec_state; dec_state = decoder_init(uv->decoder_mode, uv->postprocess); @@ -667,7 +666,7 @@ int main(int argc, char *argv[]) uv->postprocess = optarg; break; case 'v': - printf("%s\n", ULTRAGRID_VERSION); + printf("%s\n", PACKAGE_STRING); return EXIT_SUCCESS; case 'c': uv->requested_compression = TRUE; @@ -726,7 +725,7 @@ int main(int argc, char *argv[]) if(audio_does_receive_sdi(uv->audio)) display_flags |= DISPLAY_FLAG_ENABLE_AUDIO; - printf("%s\n", ULTRAGRID_VERSION); + printf("%s\n", PACKAGE_STRING); printf("Display device: %s\n", uv->requested_display); printf("Capture device: %s\n", uv->requested_capture); printf("MTU : %d\n", uv->requested_mtu);