aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am10
-rw-r--r--configure_log.awk7
-rw-r--r--options.c2
3 files changed, 11 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 3b858e2..fdc9def 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -66,7 +66,8 @@ dist_noinst_SCRIPTS = \
$(TESTS) \
doclean \
domake-win \
- t_cltsrv-down.sh
+ t_cltsrv-down.sh \
+ configure_h.awk configure_log.awk
dist_noinst_DATA = \
openvpn.spec \
@@ -142,9 +143,12 @@ openvpn_SOURCES = \
win32.h win32.c \
cryptoapi.h cryptoapi.c
+nodist_openvpn_SOURCES = configure.h
+options.$(OBJEXT): configure.h
+
configure.h: Makefile
- awk -f configure_h.awk config.h > $@
- awk -f configure_log.awk config.log >> $@
+ awk -f $(srcdir)/configure_h.awk config.h > $@
+ awk -f $(srcdir)/configure_log.awk config.log >> $@
clean-local:
-rm -f configure.h
diff --git a/configure_log.awk b/configure_log.awk
index b305f71..099e5c4 100644
--- a/configure_log.awk
+++ b/configure_log.awk
@@ -27,10 +27,7 @@
# ./config.log.
#
-BEGIN {
- printf ("#define CONFIGURE_CALL \"")
-}
-/\$ .\/configure/ {
- print $0,"\""
+/\$ (.*)\/configure/ {
+ printf ("#define CONFIGURE_CALL \"%s\"\n", $0)
exit 0
}
diff --git a/options.c b/options.c
index 1f36089..a11425c 100644
--- a/options.c
+++ b/options.c
@@ -2921,7 +2921,9 @@ usage_version (void)
msg (M_INFO|M_NOPREFIX, "%s", title_string);
msg (M_INFO|M_NOPREFIX, "Originally developed by James Yonan");
msg (M_INFO|M_NOPREFIX, "Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>");
+#ifdef CONFIGURE_CALL
msg (M_INFO|M_NOPREFIX, "\n%s\n", CONFIGURE_CALL);
+#endif
msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES);
openvpn_exit (OPENVPN_EXIT_STATUS_USAGE); /* exit point */
}