19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#!/bin/sh 29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# 39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# libtool assumes that the compiler can handle the -fPIC flag 49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall# This isn't always true (for example, nasm can't handle it) 59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallcommand="" 69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallwhile [ $# -gt 0 ]; do 79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall case "$1" in 89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall -fPIC) 99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Ignore -fPIC option 109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall -fno-common) 129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall # Ignore -fPIC and -DPIC options 139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *) 159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall command="$command $1" 169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall ;; 179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall esac 189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall shift 199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halldone 209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallecho $command 219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallexec $command 22