From 352d409798ec717ce481baa710994d5706c8c5b8 Mon Sep 17 00:00:00 2001 From: Jatin Rungta Date: Fri, 23 Dec 2016 20:25:44 +0530 Subject: [PATCH] Fix configure to make config.mak correctly CC?= failed to provide CC to makefile, instead always CC=cc would be used. Same can be said for CPPFLAGS,USER_CFLAGS and USER_LDFLAGS for example CC="gcc -m32" failed to work and it compiled 64 bit binary --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 0eb560c..1996575 100755 --- a/configure +++ b/configure @@ -146,10 +146,10 @@ check_compile_run 'whether OpenBSDs fclose() (illegally) calls close()' \ '#include \n#include\nint close(int x){exit(0);}int main(){fclose(stdin);return 1;}' && \ OUR_CPPFLAGS="$OUR_CPPFLAGS -DBROKEN_FCLOSE" -echo CC?=$CC>config.mak -[ -z "$CPPFLAGS" ] || echo CPPFLAGS?=$CPPFLAGS>>config.mak -[ -z "$CFLAGS" ] || echo USER_CFLAGS?=$CFLAGS>>config.mak -[ -z "$LDFLAGS" ] || echo USER_LDFLAGS?=$LDFLAGS>>config.mak +echo CC=$CC>config.mak +[ -z "$CPPFLAGS" ] || echo CPPFLAGS=$CPPFLAGS>>config.mak +[ -z "$CFLAGS" ] || echo USER_CFLAGS=$CFLAGS>>config.mak +[ -z "$LDFLAGS" ] || echo USER_LDFLAGS=$LDFLAGS>>config.mak echo prefix=$prefix>>config.mak echo exec_prefix=$exec_prefix>>config.mak echo bindir=$bindir>>config.mak