From: Jason Millard Date: Sat, 12 Jan 2013 03:08:28 +0000 (-0500) Subject: add cflags support to configure script X-Git-Tag: v3.5~105^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F222%2Fhead;p=thirdparty%2Ftvheadend.git add cflags support to configure script --- diff --git a/support/configure.inc b/support/configure.inc index 6d8524821..42975e6fa 100644 --- a/support/configure.inc +++ b/support/configure.inc @@ -14,7 +14,6 @@ [ -z "$CPU" ] && CPU=generic [ -z "$ARCH" ] && ARCH=`uname -m` [ -z "$OSENV" ] && OSENV=posix -[ -z "$CC" ] && CC=cc [ -z "$PYTHON" ] && PYTHON=python # Paths @@ -162,6 +161,7 @@ function show_help echo "" echo "Compiler/Arch" printf " $fmt Build using compiler [$CC]\n" "--cc=CC" + printf " $fmt Build using C flags\n" "--cflags=CFLAGS" printf " $fmt Build and optimize for specific CPU\n" "--cpu=CPU" printf " $fmt Build for architecture [$ARCH]\n" "--arch=ARCH" printf " $fmt Build for platform [$PLATFORM]\n" "--platform=PLATFORM" @@ -198,7 +198,7 @@ function parse_args *dir|prefix) eval "$opt=$val" ;; - cc|arch|cpu|platform|python) + cc|cflags|arch|cpu|platform|python) eval "`toupper $opt`=$val" ;; enable-*) @@ -407,6 +407,9 @@ function print_config echo "" echo "Compiler:" printf "$fmt" "Using C compiler:" "${CC}" + if [ "${CFLAGS}" != "" ]; then + printf "$fmt" "Using C flags:" "${CFLAGS}" + fi printf "$fmt" "Build for arch:" "${ARCH}" echo ""