build-scripts/strip_fPIC.sh
author Sam Lantinga <slouken@libsdl.org>
Thu, 16 Feb 2006 10:11:48 +0000
changeset 1361 19418e4422cb
child 1711 865ba39fc96d
permissions -rwxr-xr-x
New configure-based build system. Still work in progress, but much improved
slouken@1361
     1
#!/bin/sh
slouken@1361
     2
#
slouken@1361
     3
# libtool assumes that the compiler can handle the -fPIC flag
slouken@1361
     4
# This isn't always true (for example, nasm can't handle it)
slouken@1361
     5
command=""
slouken@1361
     6
while [ $# -gt 0 ]; do
slouken@1361
     7
    case "$1" in
slouken@1361
     8
        -?PIC)
slouken@1361
     9
            # Ignore -fPIC and -DPIC options
slouken@1361
    10
            ;;
slouken@1361
    11
        *)
slouken@1361
    12
            command="$command $1"
slouken@1361
    13
            ;;
slouken@1361
    14
    esac
slouken@1361
    15
    shift
slouken@1361
    16
done
slouken@1361
    17
echo $command
slouken@1361
    18
exec $command