diff src/flac-1.2.1/strip_non_asm_libtool_args.sh @ 1:05aa0afa9217

Bring in flac, ogg, vorbis
author Chris Cannam
date Tue, 19 Mar 2013 17:37:49 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/flac-1.2.1/strip_non_asm_libtool_args.sh	Tue Mar 19 17:37:49 2013 +0000
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# libtool assumes that the compiler can handle the -fPIC flag.
+# This isn't always true (for example, nasm can't handle it).
+# Also, on some versions of OS X it tries to pass -fno-common
+# to 'as' which causes problems.
+command=""
+while [ $1 ]; do
+	if [ "$1" != "-fPIC" ]; then
+		if [ "$1" != "-DPIC" ]; then
+			if [ "$1" != "-fno-common" ]; then
+				command="$command $1"
+			fi
+		fi
+	fi
+	shift
+done
+echo $command
+exec $command