strip_fPIC.sh
author Ryan C. Gordon <icculus@icculus.org>
Mon, 12 Dec 2005 09:22:36 +0000
changeset 1200 8f418dce02b2
parent 22 48c34d68918e
permissions -rwxr-xr-x
Date: Sun, 11 Dec 2005 20:37:04 +0100
From: Olivier Boudeville <olivier.boudeville@online.fr>
To: "A list for developers using the SDL library. \(includes SDL-announce\)" <sdl@libsdl.org>
Subject: [SDL] NetBSD build patch


Hi everybody,

apparently the SDL-1.2.9 source archive could not compile "as is" on
NetBSD 2.0_STABLE due to a pthread detection issue in the configure script.

I attached a small patch that can be applied to configure.in so that SDL
can be directly (i.e. without the NetBSD package manager) configured and
built successfully on NetBSD (at least on the one I tried !).

Hope this helps,

Olivier.
slouken@0
     1
#!/bin/sh
slouken@0
     2
#
slouken@0
     3
# libtool assumes that the compiler can handle the -fPIC flag
slouken@0
     4
# This isn't always true (for example, nasm can't handle it)
slouken@0
     5
command=""
slouken@1
     6
while [ $# -gt 0 ]; do
slouken@22
     7
    case "$1" in
slouken@22
     8
        -?PIC)
slouken@22
     9
            # Ignore -fPIC and -DPIC options
slouken@22
    10
            ;;
slouken@22
    11
        *)
slouken@0
    12
            command="$command $1"
slouken@22
    13
            ;;
slouken@22
    14
    esac
slouken@0
    15
    shift
slouken@0
    16
done
slouken@0
    17
echo $command
slouken@0
    18
exec $command