summaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure')
-rwxr-xr-xsrc/configure22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/configure b/src/configure
index 9de0fca..ff09e73 100755
--- a/src/configure
+++ b/src/configure
@@ -28,13 +28,11 @@ set -e
TARGET=`uname -s`
EBUILD_COMPAT=0
-CFLAGS='-g -O2'
-LDFLAGS='-g -Wall -O2'
-
PREFIX='/usr/local'
BINDIR=''
MANDIR=''
INSTALLMANPAGE=1
+USE_CLANG=0
print_usage() {
echo "configure --help print this"
@@ -43,6 +41,7 @@ print_usage() {
echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)"
echo " --mandir=<DIR> the path to the system man pages (default: $PREFIX/share/man)"
echo " --no-manpage dont't install manpage"
+ echo " --use-clang use clang/llvm as compiler/linker"
}
for arg
@@ -63,6 +62,9 @@ do
--no-manpage)
INSTALLMANPAGE=0
;;
+ --use-clang)
+ USE_CLANG=1
+ ;;
--ebuild-compat)
EBUILD_COMPAT=1
;;
@@ -85,7 +87,17 @@ if [ -n "$ERRORS" ] && [ $EBUILD_COMPAT -ne 1 ]; then
exit 1
fi
-CFLAGS="$CFLAGS $(pkg-config --cflags gstreamer-0.10)"
+if [ $USE_CLANG -eq 0 ]; then
+ CFLAGS='-g -Wall -O2'
+ LDFLAGS='-g -Wall -O2'
+ COMPILER='gcc'
+else
+ CFLAGS='-g -O2'
+ LDFLAGS='-g -O2'
+ COMPILER='clang'
+fi
+
+CFLAGS="$CFLAGS $(pkg-config --cflags gstreamer-0.10) -DGST_DISABLE_DEPRECATED"
LDFLAGS="$LDFLAGS $(pkg-config --libs gstreamer-0.10)"
rm -f include.mk
@@ -117,7 +129,7 @@ cat > include.mk <<EOF
# use ./configure instead
TARGET := '$TARGET'
-CC := gcc
+CC := $COMPILER
CFLAGS := $CFLAGS
LDFLAGS := $LDFLAGS
STRIP := strip