cannam@86: #!/bin/sh cannam@86: # cannam@86: # libtool assumes that the compiler can handle the -fPIC flag. cannam@86: # This isn't always true (for example, nasm can't handle it). cannam@86: # Also, on some versions of OS X it tries to pass -fno-common cannam@86: # to 'as' which causes problems. cannam@86: command="" cannam@86: while [ $1 ]; do cannam@86: if [ "$1" != "-fPIC" ]; then cannam@86: if [ "$1" != "-DPIC" ]; then cannam@86: if [ "$1" != "-fno-common" ]; then cannam@86: command="$command $1" cannam@86: fi cannam@86: fi cannam@86: fi cannam@86: shift cannam@86: done cannam@86: echo $command cannam@86: exec $command