]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
add cflags support to configure script 222/head
authorJason Millard <jsm174@gmail.com>
Sat, 12 Jan 2013 03:08:28 +0000 (22:08 -0500)
committerJason Millard <jsm174@gmail.com>
Sat, 12 Jan 2013 03:08:28 +0000 (22:08 -0500)
support/configure.inc

index 6d85248217bc09a324173557445b3fcb5288dd48..42975e6fa5c8ef8da0b4223a9b65e29b23eb1cd8 100644 (file)
@@ -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 ""