From aa7ba2dc6ae27b3fa77bcf2ab57d8529579826f5 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 28 Nov 2001 12:23:40 +0000 Subject: [w3m-dev 02579] Use environment variables CC, CFLAGS, LDFLAGS From: Use environment variables CC, CFLAGS, LDFLAGS for default --- ChangeLog | 5 +++++ configure | 16 +++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7c046f..de3aaa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-28 Hironori Sakamoto + + * [w3m-dev 02579] + * configure: Use environment variables CC, CFLAGS, LDFLAGS + 2001-11-28 Fumitoshi UKAI * [w3m-dev 02574] sysconfdir diff --git a/configure b/configure index 5ab5ce0..9f34bdf 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.23 2001/11/27 18:29:24 ukai Exp $ +# $Id: configure,v 1.24 2001/11/28 12:23:40 ukai Exp $ # Configuration. # @@ -769,9 +769,10 @@ readdir "$dbrowser" brz=$_dir echo "dbrowser='$brz'" >> config.param -if [ -z "$dcc" ] ; then - if ./which gcc >/dev/null - then +if [ -z "$dcc" ]; then + if [ -n "$CC" ]; then + dcc="$CC" + elif ./which gcc >/dev/null ; then dcc=gcc else dcc=cc @@ -782,7 +783,9 @@ Echo "(Default: $dcc) " readanswer cc "$dcc" echo "dcc='$cc'" >> config.param -if [ -z "$dcflags" ] ; then dcflags="-O" ; fi +if [ -z "$dcflags" ]; then + dcflags=${CFLAGS-"-O"} +fi echo "Input your favorite C flags." Echo "(Default: $dcflags) " readanswer cflags "$dcflags" @@ -1042,6 +1045,9 @@ fi echo "Input additional LD flags other than listed above, if any:" +if [ -z "$dldflags" ]; then + dldflags=${LDFLAGS-""} +fi if [ -n "$dldflags" ]; then Echo "(default: $dldflags) : " else -- cgit v1.2.3