]> git.wh0rd.org - patches.git/blame - ed-0.5-build.patch
more random patches. who knows.
[patches.git] / ed-0.5-build.patch
CommitLineData
5e993f12 12007-04-16 Mike Frysinger <vapier@gentoo.org>
2
3 * Clean locale vars from environment to maintain a sane state.
4 * Do not set CC/CXX/CPPFLAGS/LDFLAGS to "" so that user can
5 override if they so choose.
6 * Only set CFLAGS/CXXFLAGS if user did not specify any.
7
8--- ed/configure
9+++ ed/configure
10@@ -14,6 +14,19 @@
11 progversion=0.5
12 srctrigger=ed.h
13
14+# NLS nuisances.
15+for as_var in \
16+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18+ LC_TELEPHONE LC_TIME
19+do
20+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21+ eval $as_var=C; export $as_var
22+ else
23+ unset $as_var
24+ fi
25+done
26+
27 # clear some things potentially inherited from environment.
28 srcdir=
29 prefix=/usr/local
30@@ -23,12 +36,6 @@
31 infodir='$(datadir)/info'
32 mandir='$(datadir)/man'
33 sysconfdir='$(prefix)/etc'
34-CC=
35-CXX=
36-CPPFLAGS=
37-CFLAGS='-Wall -W -O2'
38-CXXFLAGS='-Wall -W -O2'
39-LDFLAGS=
40
41 # Loop over all args
42 while [ x"$1" != x ] ; do
43@@ -102,6 +109,14 @@
44 esac
45 done
46
47+# Defaults if the user did not select any
48+if [ x"${CFLAGS}" = x ] ; then
49+ CFLAGS='-Wall -W -O2'
50+fi
51+if [ x"${CXXFLAGS}" = x ] ; then
52+ CXXFLAGS='-Wall -W -O2'
53+fi
54+
55 # Find the source files, if location was not specified.
56 srcdirtext=
57 if [ x"${srcdir}" = x ] ; then