build: remove awk and non-standard autoconf output processing

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>
This commit is contained in:
Alon Bar-Lev 2012-02-29 22:11:58 +02:00 committed by David Sommerseth
parent e02570fd7d
commit fcff80aac1
5 changed files with 5 additions and 86 deletions

View 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

View 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"

View file

@ -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")
}

View file

@ -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
}

View file

@ -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