Properly generate versioning #define-s during autogen
authorThibault Saunier <thibault.saunier@collabora.com>
Sat, 15 Mar 2014 09:34:17 +0000 (10:34 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Sat, 15 Mar 2014 19:01:48 +0000 (20:01 +0100)
configure.ac
ges/ges-version.h.in [new file with mode: 0644]
ges/ges.h

index 29351ca..8f3a49a 100644 (file)
@@ -35,6 +35,16 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
  [AM_DEFAULT_VERBOSITY=1
  AC_SUBST(AM_DEFAULT_VERBOSITY)])
 
+dnl GES versioning, this is mostly informational
+GES_VERSION_MAJOR=$PACKAGE_VERSION_MAJOR
+GES_VERSION_MINOR=$PACKAGE_VERSION_MINOR
+GES_VERSION_MICRO=$PACKAGE_VERSION_MICRO
+GES_VERSION_NANO=$PACKAGE_VERSION_NANO
+AC_SUBST(GES_VERSION_MAJOR)
+AC_SUBST(GES_VERSION_MINOR)
+AC_SUBST(GES_VERSION_MICRO)
+AC_SUBST(GES_VERSION_NANO)
+
 dnl our libraries and install dirs use major.minor as a version
 GST_API_VERSION=$GST_EDITING_SERVICES_VERSION_MAJOR.$GST_EDITING_SERVICES_VERSION_MINOR
 dnl we override it here if we need to for the release candidate of new series
@@ -348,6 +358,7 @@ dnl po/Makefile.in
 
 AC_CONFIG_FILES(
 Makefile
+ges/ges-version.h
 common/Makefile
 common/m4/Makefile
 gst-editing-services.spec
diff --git a/ges/ges-version.h.in b/ges/ges-version.h.in
new file mode 100644 (file)
index 0000000..4dd00e1
--- /dev/null
@@ -0,0 +1,32 @@
+/* GStreamer Editing Services
+ * Copyright (C) 2014 Thibault Saunier <tsaunier@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GES_VERSION_H__
+#define __GES_VERSION_H__
+
+G_BEGIN_DECLS
+
+#define GES_VERSION_MAJOR (@GES_VERSION_MAJOR@)
+#define GES_VERSION_MINOR (@GES_VERSION_MINOR@)
+#define GES_VERSION_MICRO (@GES_VERSION_MICRO@)
+#define GES_VERSION_NANO  (@GES_VERSION_NANO@)
+
+G_END_DECLS
+
+#endif /* __GES_H__ */
index b385e9f..622e3a4 100644 (file)
--- a/ges/ges.h
+++ b/ges/ges.h
 #include <ges/ges-gerror.h>
 #include <ges/ges-audio-track.h>
 #include <ges/ges-video-track.h>
+#include <ges/ges-version.h>
 
 G_BEGIN_DECLS
 
-#define GES_VERSION_MAJOR (1)
-#define GES_VERSION_MINOR (0)
-#define GES_VERSION_MICRO (0)
-#define GES_VERSION_NANO  (0)
 
 gboolean ges_init    (void);