From c62d9d7b1bfec39b499a9fa0c0b343debe8f8e43 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 7 Apr 2019 17:31:38 +0200 Subject: [PATCH] Replaced inclusion of version numbers from autotools by those from libisofs.h --- Makefile.am | 6 ++++-- libisofs/util.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index d9892a1..0ec79f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,9 @@ libincludedir=$(includedir)/libisofs lib_LTLIBRARIES = libisofs/libisofs.la ACLOCAL_AMFLAGS = -I ./ -AM_CPPFLAGS = -I $(top_builddir)/libisofs + +# Enable this if the source includes generated files like version.h +# AM_CPPFLAGS = -I $(top_builddir)/libisofs ## ========================================================================= ## @@ -118,7 +120,7 @@ noinst_PROGRAMS = \ # ts A90807 -# Consolidated demo code for having less linker mesages with a make run. +# Consolidated demo code for having less linker messages with a make run. demo_demo_CPPFLAGS = -I $(top_srcdir)/libisofs demo_demo_LDADD = $(libisofs_libisofs_la_OBJECTS) $(libisofs_libisofs_la_LIBADD) demo_demo_SOURCES = demo/demo.c diff --git a/libisofs/util.c b/libisofs/util.c index 4ef9de6..ac6791f 100644 --- a/libisofs/util.c +++ b/libisofs/util.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Mario Danic - * Copyright (c) 2009 - 2015 Thomas Schmitt + * Copyright (c) 2009 - 2019 Thomas Schmitt * * This file is part of the libisofs project; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -18,7 +18,6 @@ #include "messages.h" #include "joliet.h" #include "node.h" -#include "../version.h" #include #include @@ -1978,9 +1977,18 @@ ex:; void iso_lib_version(int *major, int *minor, int *micro) { + + *major = iso_lib_header_version_major; + *minor = iso_lib_header_version_minor; + *micro = iso_lib_header_version_micro; + +/* No more: values from version.h generated from version.h.in and + macro values defined in configure.ac + *major = LIBISOFS_MAJOR_VERSION; *minor = LIBISOFS_MINOR_VERSION; *micro = LIBISOFS_MICRO_VERSION; +*/ } int iso_lib_is_compatible(int major, int minor, int micro)