[libdvdnav-devel] [Git][videolan/libdvdnav][master] 2 commits: configure.ac: use variable for dvdread version requirement

Jean-Baptiste Kempf gitlab at videolan.org
Wed Mar 4 22:28:02 CET 2020



Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav


Commits:
703b0ee9 by Francois Cartegnie at 2020-03-04T16:25:55+01:00
configure.ac: use variable for dvdread version requirement

- - - - -
054f2057 by Francois Cartegnie at 2020-03-04T17:10:05+01:00
configure.ac: use variable for dvdnav version

- - - - -


5 changed files:

- Makefile.am
- configure.ac
- misc/dvdnav.pc.in
- src/dvdnav/dvdnav.h
- + src/dvdnav/version.h.in


Changes:

=====================================
Makefile.am
=====================================
@@ -1,6 +1,9 @@
 ACLOCAL_AMFLAGS = -Im4
 
-AM_CPPFLAGS = -I$(top_srcdir)/src $(THREAD_CFLAGS) $(DVDREAD_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/src \
+              -I$(top_builddir)/src/dvdnav \
+              $(THREAD_CFLAGS) \
+              $(DVDREAD_CFLAGS)
 
 dist_doc_DATA = AUTHORS ChangeLog COPYING README TODO
 
@@ -46,7 +49,8 @@ pkgincludedir = $(includedir)/dvdnav
 pkginclude_HEADERS = \
 	src/dvdnav/dvdnav.h \
 	src/dvdnav/dvdnav_events.h \
-	src/dvdnav/dvd_types.h
+	src/dvdnav/dvd_types.h \
+	src/dvdnav/version.h
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = misc/dvdnav.pc


=====================================
configure.ac
=====================================
@@ -27,9 +27,12 @@ DVDNAV_MINOR="dvdnav_minor"
 DVDNAV_SUB="dvdnav_sub"
 DVDNAV_PRE="dvdnav_pre"
 
+DVDREAD_MIN_VERSION="6.0.0"
+
 AC_SUBST(DVDNAV_MAJOR)
 AC_SUBST(DVDNAV_MINOR)
 AC_SUBST(DVDNAV_SUB)
+AC_SUBST(DVDREAD_MIN_VERSION)
 
 dnl The libtool version numbers (DVDNAV_LT_*); Don't even think about faking this!
 dnl
@@ -94,7 +97,7 @@ esac
 AC_SUBST(THREAD_LIBS)
 AC_SUBST(THREAD_CFLAGS)
 
-PKG_CHECK_MODULES([DVDREAD], [dvdread >= 6.0.0])
+PKG_CHECK_MODULES([DVDREAD], [dvdread >= ${DVDREAD_MIN_VERSION}])
 
 dnl ---------------------------------------------
 dnl Check for bitfield compiler flag
@@ -124,4 +127,5 @@ AC_OUTPUT([
 Makefile
 misc/dvdnav.pc
 misc/libdvdnav.spec
+src/dvdnav/version.h
 ])


=====================================
misc/dvdnav.pc.in
=====================================
@@ -7,6 +7,6 @@ Name: libdvdnav
 Description: DVD Navigation library
 Version: @VERSION@
 
-Requires.private: dvdread >= 4.1.2
+Requires.private: dvdread >= @DVDREAD_MIN_VERSION@
 Cflags: -I${includedir} @THREAD_CFLAGS@
 Libs: -L${libdir} -ldvdnav @THREAD_LIBS@


=====================================
src/dvdnav/dvdnav.h
=====================================
@@ -26,12 +26,11 @@
 #ifndef LIBDVDNAV_DVDNAV_H
 #define LIBDVDNAV_DVDNAV_H
 
-#define DVDNAV_VERSION 50400
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#include "version.h"
 #include <dvdnav/dvd_types.h>
 #include <dvdread/dvd_reader.h>
 #include <dvdread/nav_types.h>


=====================================
src/dvdnav/version.h.in
=====================================
@@ -0,0 +1,35 @@
+/*
+* This file is part of libdvdnav, a DVD navigation library.
+*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+*/
+#ifndef LIBDVDNAV_VERSION_H
+#define LIBDVDNAV_VERSION_H
+
+#define DVDNAV_VERSION_CODE(major, minor, micro) \
+     (((major) * 10000) +                         \
+      ((minor) *   100) +                         \
+      ((micro) *     1))
+
+#define DVDNAV_VERSION_MAJOR @DVDNAV_MAJOR@
+#define DVDNAV_VERSION_MINOR @DVDNAV_MINOR@
+#define DVDNAV_VERSION_MICRO @DVDNAV_SUB@
+
+#define DVDNAV_VERSION_STRING "@DVDNAV_MAJOR at .@DVDNAV_MINOR at .@DVDNAV_SUB@"
+
+#define DVDNAV_VERSION \
+    DVDNAV_VERSION_CODE(DVDNAV_VERSION_MAJOR, DVDNAV_VERSION_MINOR, DVDNAV_VERSION_MICRO)
+
+#endif



View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/ac7327d23e67d6358a34b39af0a71ffa6c915520...054f205720b543013a0859df5649d8d3837569e8

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/ac7327d23e67d6358a34b39af0a71ffa6c915520...054f205720b543013a0859df5649d8d3837569e8
You're receiving this email because of your account on code.videolan.org.




More information about the libdvdnav-devel mailing list