From be05afb30b10c13a0d61a3a0850e0530d27f0f05 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Tue, 26 Jun 2018 17:26:32 +0900
Subject: [PATCH 1/2] xrdp: print configure options to --version more pretty
---
configure.ac | 7 ++++++-
xrdp/xrdp.c | 11 +++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9fd35942..9385801a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -397,4 +397,9 @@ echo " exec_prefix $exec_prefix"
echo " libdir $libdir"
echo " bindir $bindir"
echo " sysconfdir $sysconfdir"
-echo "#define CONFIGURE_STRING \"$@\"" > configure_params.h
+
+# configure_params.h will be written to the build directory, not the source directory
+echo '#define CONFIGURE_STRING \' > ./configure_params.h
+./config.status --config | xargs -n 1 | sed -e 's/^/" /' -e 's/$/\\n" \\/' >> ./configure_params.h
+echo '""' >> ./configure_params.h
+
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c
index a5293896..fec1385a 100644
--- a/xrdp/xrdp.c
+++ b/xrdp/xrdp.c
@@ -56,17 +56,20 @@ print_version(void)
"Neutrino Labs, and all contributors.");
g_writeln(" See https://github.com/neutrinolabs/xrdp for more information.");
g_writeln("%s", "");
+
+#if defined(CONFIGURE_STRING)
+ g_writeln(" Configure options:");
+ g_writeln("%s", CONFIGURE_STRING);
+#endif
+
g_writeln(" Compiled with %s", get_openssl_version());
+
}
/*****************************************************************************/
void
print_help(void)
{
-#if defined(CONFIGURE_STRING)
- g_writeln("xrdp configure command line parameters [%s]", CONFIGURE_STRING);
- g_writeln("%s", "");
-#endif
g_writeln("Usage: xrdp [options]");
g_writeln(" -h, --help show help");
g_writeln(" -n, --nodaemon don't fork into background");
From c0c7c3f106f53228afa33ba7854a15d7aedb867b Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Tue, 26 Jun 2018 17:57:07 +0900
Subject: [PATCH 2/2] xrdp: unify inconsistent mixed use of
* configure params
* configure options
* configure string
---
Makefile.am | 2 +-
configure.ac | 8 ++++----
xrdp/xrdp.c | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 18b131bc..2d15c7d7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,4 +67,4 @@ SUBDIRS = \
$(XRDPVRDIR)
distclean-local:
- -rm -f configure_params.h
+ -rm -f xrdp_configure_options.h
diff --git a/configure.ac b/configure.ac
index 9385801a..693b31af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,8 +398,8 @@ echo " libdir $libdir"
echo " bindir $bindir"
echo " sysconfdir $sysconfdir"
-# configure_params.h will be written to the build directory, not the source directory
-echo '#define CONFIGURE_STRING \' > ./configure_params.h
-./config.status --config | xargs -n 1 | sed -e 's/^/" /' -e 's/$/\\n" \\/' >> ./configure_params.h
-echo '""' >> ./configure_params.h
+# xrdp_configure_options.h will be written to the build directory, not the source directory
+echo '#define XRDP_CONFIGURE_OPTIONS \' > ./xrdp_configure_options.h
+./config.status --config | xargs -n 1 | sed -e 's/^/" /' -e 's/$/\\n" \\/' >> ./xrdp_configure_options.h
+echo '""' >> ./xrdp_configure_options.h
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c
index fec1385a..d2643e98 100644
--- a/xrdp/xrdp.c
+++ b/xrdp/xrdp.c
@@ -24,7 +24,7 @@
#include "xrdp.h"
#include "log.h"
-#include "configure_params.h"
+#include "xrdp_configure_options.h"
#if !defined(PACKAGE_VERSION)
#define PACKAGE_VERSION "???"
@@ -57,9 +57,9 @@ print_version(void)
g_writeln(" See https://github.com/neutrinolabs/xrdp for more information.");
g_writeln("%s", "");
-#if defined(CONFIGURE_STRING)
+#if defined(XRDP_CONFIGURE_OPTIONS)
g_writeln(" Configure options:");
- g_writeln("%s", CONFIGURE_STRING);
+ g_writeln("%s", XRDP_CONFIGURE_OPTIONS);
#endif
g_writeln(" Compiled with %s", get_openssl_version());