Add support for CONNMAN_VERSION declaration
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 7 Jan 2009 15:47:13 +0000 (16:47 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 7 Jan 2009 15:47:13 +0000 (16:47 +0100)
configure.ac
include/Makefile.am
include/plugin.h
include/version.h.in [new file with mode: 0644]

index 570d95f..eafe9e6 100644 (file)
@@ -209,6 +209,7 @@ AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
                [enable fake device support]), [enable_fake=${enableval}])
 AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")
 
-AC_OUTPUT(Makefile gdbus/Makefile include/Makefile src/Makefile doc/Makefile
-               test/Makefile plugins/Makefile client/Makefile scripts/Makefile
-               scripts/connman src/connman.service doc/version.xml connman.pc)
+AC_OUTPUT(Makefile gdbus/Makefile include/Makefile include/version.h
+               src/Makefile src/connman.service scripts/connman
+               scripts/Makefile plugins/Makefile client/Makefile
+               test/Makefile doc/Makefile doc/version.xml connman.pc)
index 84eece9..2db0249 100644 (file)
@@ -4,12 +4,20 @@ includedir = @includedir@/connman
 include_HEADERS = types.h log.h plugin.h security.h resolver.h \
                                        storage.h device.h network.h
 
+nodist_include_HEADERS = version.h
+
 noinst_HEADERS = driver.h element.h property.h ipv4.h rtnl.h dbus.h
 
 MAINTAINERCLEANFILES = Makefile.in
 
 all-local:
-       @if [ ! -e connman ] ; then $(LN_S) $(top_srcdir)/include connman ; fi
+       @if [ ! -e connman ]; then \
+         mkdir connman; \
+         list='$(include_HEADERS) $(noinst_HEADERS)'; for i in $$list; \
+           do cp $(top_srcdir)/include/$$i connman/; done; \
+         list='$(nodist_include_HEADERS)'; for i in $$list; \
+           do cp $(top_builddir)/include/$$i connman/; done; \
+       fi
 
 clean-local:
-       @rm -f connman
+       @rm -rf connman
index 11a0609..d538dc7 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef __CONNMAN_PLUGIN_H
 #define __CONNMAN_PLUGIN_H
 
+#include <connman/version.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/include/version.h.in b/include/version.h.in
new file mode 100644 (file)
index 0000000..c163f8a
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *
+ *  Connection Manager
+ *
+ *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef __CONNMAN_VERSION_H
+#define __CONNMAN_VERSION_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CONNMAN_VERSION        @VERSION@
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNMAN_VERSION_H */