]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
build: remove awk and non-standard autoconf output processing
authorAlon Bar-Lev <alon.barlev@gmail.com>
Wed, 29 Feb 2012 20:11:58 +0000 (22:11 +0200)
committerDavid Sommerseth <davids@redhat.com>
Thu, 22 Mar 2012 21:07:07 +0000 (22:07 +0100)
Replace with simpler environment solution.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
Makefile.am
configure.ac
configure_h.awk [deleted file]
configure_log.awk [deleted file]
options.c

index 6c0b2b45fa38ec8d592297d88a7bb3aed9e66464..a8ff4572aa57d2c2c0d792503ae44b5c6418e630 100644 (file)
@@ -36,7 +36,7 @@ MAINTAINERCLEANFILES = \
        $(srcdir)/depcomp $(srcdir)/aclocal.m4 \
        $(srcdir)/config.guess $(srcdir)/config.sub \
        $(srcdir)/openvpn.spec
-CLEANFILES = openvpn.8.html configure.h
+CLEANFILES = openvpn.8.html
 
 EXTRA_DIST = \
        sample-config-files \
@@ -57,8 +57,7 @@ dist_doc_DATA = \
 
 dist_noinst_SCRIPTS = \
        $(TESTS) \
-       t_cltsrv-down.sh \
-       configure_h.awk configure_log.awk
+       t_cltsrv-down.sh
 
 dist_doc_DATA = \
        COPYRIGHT.GPL \
@@ -156,13 +155,6 @@ openvpn_SOURCES = \
        win32.h win32.c \
        cryptoapi.h cryptoapi.c
 
-nodist_openvpn_SOURCES = configure.h
-options.$(OBJEXT): configure.h
-
-configure.h: Makefile
-       awk -f $(srcdir)/configure_h.awk config.h > $@
-       awk -f $(srcdir)/configure_log.awk config.log >> $@
-
 if WIN32
 dist_noinst_DATA += openvpn.8
 nodist_html_DATA = openvpn.8.html
index 81bf933ded8d65e41fd44a6bdca41a0098c75f17..0b703256b4cc2a63b6c8bad2b3a5a245366bf15d 100644 (file)
@@ -913,6 +913,9 @@ if test "${enable_strict}" = "yes"; then
        CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function"
 fi
 
+CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`"
+AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings])
+
 TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID"
 TAP_WIN_MIN_MAJOR="PRODUCT_TAP_WIN_MIN_MAJOR"
 TAP_WIN_MIN_MINOR="PRODUCT_TAP_WIN_MIN_MINOR"
diff --git a/configure_h.awk b/configure_h.awk
deleted file mode 100644 (file)
index 672e745..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-#  OpenVPN -- An application to securely tunnel IP networks
-#             over a single UDP port, with support for SSL/TLS-based
-#             session authentication and key exchange,
-#             packet encryption, packet authentication, and
-#             packet compression.
-#
-#  Copyright (C) 2010  David Sommerseth <dazo@users.sourceforge.net>
-#
-#  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 (see the file COPYING included with this
-#  distribution); if not, write to the Free Software Foundation, Inc.,
-#  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-#
-#  This script will build up a line which can be included into a C program.
-#  The line will contain all interesting #define statements from f.ex. ./config.h
-#
-
-BEGIN {
-       printf ("#define CONFIGURE_DEFINES \"")
-}
-
-/^#define (ENABLE|DISABLE|DEPRECATED|USE)_/ {
-       printf (" %s", $2)
-}
-
-END {
-       printf ("\"\n")
-}
diff --git a/configure_log.awk b/configure_log.awk
deleted file mode 100644 (file)
index 099e5c4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-#  OpenVPN -- An application to securely tunnel IP networks
-#             over a single UDP port, with support for SSL/TLS-based
-#             session authentication and key exchange,
-#             packet encryption, packet authentication, and
-#             packet compression.
-#
-#  Copyright (C) 2010  David Sommerseth <dazo@users.sourceforge.net>
-#
-#  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 (see the file COPYING included with this
-#  distribution); if not, write to the Free Software Foundation, Inc.,
-#  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-#
-#  This script will build up a line which can be included into a C program.
-#  The line will only contain the first entry of the ./configure line from
-#  ./config.log.
-#
-
-/\$ (.*)\/configure/ {
-       printf ("#define CONFIGURE_CALL \"%s\"\n", $0)
-       exit 0
-}
index b0ae7fd77dcf83bac1fc3fc7885a1e274081d59c..d7f848e7f5ea420563878b1ddd1b8a02fc63953a 100644 (file)
--- a/options.c
+++ b/options.c
@@ -49,7 +49,6 @@
 #include "helper.h"
 #include "manage.h"
 #include "forward.h"
-#include "configure.h"
 #include <ctype.h>
 
 #include "memdbg.h"
@@ -3403,9 +3402,6 @@ usage_version (void)
   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>");
 #ifndef ENABLE_SMALL
-#ifdef CONFIGURE_CALL
-  msg (M_INFO|M_NOPREFIX, "\n%s\n", CONFIGURE_CALL);
-#endif
 #ifdef CONFIGURE_DEFINES
   msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES);
 #endif