bug-ed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ed] [PATCH] configure: respect user env settings


From: Mike Frysinger
Subject: [Bug-ed] [PATCH] configure: respect user env settings
Date: Wed, 31 Dec 2008 04:41:54 -0500

First we have to fix the locale otherwise some of the arg parsing may fail.
This NLS code is taken from latest autoconf-2.63.

Then we fix the toolchain related variables to respect the user build
settings.  This makes the configure script behave just like an autotooled
one.

Signed-off-by: Mike Frysinger <address@hidden>
---
 configure |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 984f8c1..6dee78e 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,12 @@ progname=ed
 progversion=1.1
 srctrigger=ed.h
 
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
 # clear some things potentially inherited from environment.
 srcdir=
 prefix=/usr/local
@@ -24,12 +30,6 @@ infodir='$(datadir)/info'
 mandir='$(datadir)/man'
 sysconfdir='$(prefix)/etc'
 program_prefix=
-CC=
-CXX=
-CPPFLAGS=
-CFLAGS='-Wall -W -O2'
-CXXFLAGS='-Wall -W -O2'
-LDFLAGS=
 
 # Loop over all args
 while [ x"$1" != x ] ; do
@@ -109,6 +109,14 @@ while [ x"$1" != x ] ; do
        esac
 done
 
+# Defaults if the user did not select any
+if [ x"${CFLAGS+set}" != xset ] ; then
+       CFLAGS='-Wall -W -O2'
+fi
+if [ x"${CXXFLAGS+set}" != xset ] ; then
+       CXXFLAGS='-Wall -W -O2'
+fi
+
 # Find the source files, if location was not specified.
 srcdirtext=
 if [ x"${srcdir}" = x ] ; then
-- 
1.6.0.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]