summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-05 23:58:16 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-05 23:58:35 +0100
commitd72ba23b8551ee20674c7e6e142027e77214ba1c (patch)
treead9c4e7f4bb52288835d1d66efe2fca98da2145f
parentb2554cf396abf6fdd10b1e126195c3f71dcf3b4e (diff)
downloadlibrda-d72ba23b8551ee20674c7e6e142027e77214ba1c.tar.gz
librda-d72ba23b8551ee20674c7e6e142027e77214ba1c.tar.bz2
librda-d72ba23b8551ee20674c7e6e142027e77214ba1c.zip
src/rda_supported_technologies.h.in: Generate header file that knows what RDA technologies are supported after build.
-rw-r--r--configure.ac9
-rw-r--r--src/Makefile.am13
-rw-r--r--src/rda.h2
-rw-r--r--src/rda_supported_technologies.h.in30
4 files changed, 52 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f6255c2..ffa8000 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,12 +58,14 @@ PKG_CHECK_MODULES(LIBRDA, glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GIO_REQUIRED)
dnl enable/disable awarenesses
+SUPPORTED_TECHNOLOGIES=""
+
AC_ARG_ENABLE([x2go],
[AS_HELP_STRING([--enable-x2go],
[enable awareness of X2Go sessions])],
[enable_x2go=yes])
if test "x$enable_x2go" != "x"; then
- AC_DEFINE([WITH_X2GO_AWARENESS],,[Build with X2Go awareness])
+ SUPPORTED_TECHNOLOGIES="$SUPPORTED_TECHNOLOGIES X2GO"
else
enable_x2go="no"
fi
@@ -73,11 +75,14 @@ AC_ARG_ENABLE([ogon],
[enable awareness of Ogon sessions])],
[enable_ogon=yes])
if test "x$enable_ogon" != "x"; then
- AC_DEFINE([WITH_OGON_AWARENESS],,[Build with Ogon awareness])
+ SUPPORTED_TECHNOLOGIES="$SUPPORTED_TECHNOLOGIES OGON"
else
enable_ogon="no"
fi
+# make them available for automake
+AC_SUBST([SUPPORTED_TECHNOLOGIES])
+
dnl Language Support
IT_PROG_INTLTOOL([0.50.1])
diff --git a/src/Makefile.am b/src/Makefile.am
index 83243b4..11c05a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,8 +4,21 @@ lib_LTLIBRARIES = librda.la
CLEANFILES =
DISTCLEANFILES =
+EXTRA_DIST =
+BUILT_SOURCES =
+
+st_file = rda_supported_technologies.h
+
+$(st_file): $(st_file).in
+ cp $< $@
+ for tech in $(SUPPORTED_TECHNOLOGIES); do sed -r -e "s|// \@WITH_REMOTE_AWARENESS_($$tech)\@\s+.*|#define WITH_REMOTE_AWARENESS_\1|" -i $@; done
+
+CLEANFILES += $(st_file)
+EXTRA_DIST += $(st_file).in
+BUILT_SOURCES += $(st_file)
rda_headers = \
+ rda_supported_technologies.h \
rda.h \
$(NULL)
diff --git a/src/rda.h b/src/rda.h
index 563bd7a..cfbf268 100644
--- a/src/rda.h
+++ b/src/rda.h
@@ -26,6 +26,8 @@
#include <glib.h>
+#include <rda_supported_technologies.h>
+
G_BEGIN_DECLS
enum {
diff --git a/src/rda_supported_technologies.h.in b/src/rda_supported_technologies.h.in
new file mode 100644
index 0000000..6336719
--- /dev/null
+++ b/src/rda_supported_technologies.h.in
@@ -0,0 +1,30 @@
+/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/* rda.h - Remote Desktop Awareness
+
+ Copyright (C) 2018 Mike Gabriel
+ All rights reserved.
+
+ The RDA 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.
+
+ The RDA 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 the Mate Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RDA_SUPPORTED_TECHNOLOGIES_H
+#define RDA_SUPPORTED_TECHNOLOGIES_H
+
+// @WITH_REMOTE_AWARENESS_X2GO@ not supported
+// @WITH_REMOTE_AWARENESS_OGON@ not supported
+
+#endif /* RDA_SUPPORTED_TECHNOLOGIES_H */