Commit a7e814e3 authored by Petri Hintukainen's avatar Petri Hintukainen

generate version.h

parent 417a9cb2
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src/dvdcss
EXTRA_DIST = msvc libdvdcss.spec INSTALL
......@@ -46,7 +47,9 @@ test_dvd_region_LDADD = libdvdcss.la
test_dvd_region_CFLAGS = -I $(top_srcdir)/src
pkgincludedir = $(includedir)/dvdcss
pkginclude_HEADERS = src/dvdcss/dvdcss.h
pkginclude_HEADERS = \
src/dvdcss/dvdcss.h \
src/dvdcss/version.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = src/libdvdcss.pc
......
AC_INIT(libdvdcss, 1.3.99, , , https://www.videolan.org/developers/libdvdcss.html)
dnl library version number
m4_define([dvdcss_major], 1)
m4_define([dvdcss_minor], 3)
m4_define([dvdcss_micro], 99)
m4_define([dvdcss_version],[dvdcss_major.dvdcss_minor.dvdcss_micro])
AC_INIT(libdvdcss, dvdcss_version, , , https://www.videolan.org/developers/libdvdcss.html)
AC_CONFIG_SRCDIR([src/libdvdcss.c])
AC_PREREQ(2.50)
......@@ -231,10 +237,19 @@ AM_CONDITIONAL([APIDOC], [test "x$DOXYGEN" != "x"])
AC_PATH_PROG([GIT], [git])
AM_CONDITIONAL([GIT], [test "x$GIT" != "x"])
dnl export library version number
DVDCSS_VERSION_MAJOR=dvdcss_major()
DVDCSS_VERSION_MINOR=dvdcss_minor()
DVDCSS_VERSION_MICRO=dvdcss_micro()
AC_SUBST(DVDCSS_VERSION_MAJOR)
AC_SUBST(DVDCSS_VERSION_MINOR)
AC_SUBST(DVDCSS_VERSION_MICRO)
AC_SUBST(DVDCSS_LDFLAGS)
AC_OUTPUT([
Makefile
libdvdcss.spec
doc/doxygen.cfg
src/libdvdcss.pc
src/dvdcss/version.h
])
......@@ -33,6 +33,8 @@
#include <stdint.h>
#include "version.h"
#ifdef __cplusplus
extern "C" {
#endif
......
/*
* This file is part of libdvdcss
* Copyright (C) 2015 VideoLAN
*
* This file 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 file 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 library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef DVDCSS_VERSION_H_
#define DVDCSS_VERSION_H_
#define DVDCSS_VERSION_CODE(major, minor, micro) \
(((major) * 10000) + \
((minor) * 100) + \
((micro) * 1))
#define DVDCSS_VERSION_MAJOR @DVDCSS_VERSION_MAJOR@
#define DVDCSS_VERSION_MINOR @DVDCSS_VERSION_MINOR@
#define DVDCSS_VERSION_MICRO @DVDCSS_VERSION_MICRO@
#define DVDCSS_VERSION_STRING "@DVDCSS_VERSION_MAJOR@.@DVDCSS_VERSION_MINOR@.@DVDCSS_VERSION_MICRO@"
#define DVDCSS_VERSION \
DVDCSS_VERSION_CODE(DVDCSS_VERSION_MAJOR, DVDCSS_VERSION_MINOR, DVDCSS_VERSION_MICRO)
#endif /* DVDCSS_VERSION_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment