From: Warren Young
Date: October 16 2011 12:13am
Subject: Re: [PATCH] for 'can not be used when making a shared object; recompile
with -fPIC' error
List-Archive: http://lists.mysql.com/plusplus/9452
Message-Id: <4E9A219B.5090407@etr-usa.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
On 10/14/2011 8:43 AM, Adrian Cornish wrote:
>
> -@PTHREAD_CFLAGS@
> +@PTHREAD_CFLAGS@ -fPIC
Doesn't that tie us to GCC? Certainly that is by far the most common
compiler for the autoconf case, but we've had reports on list in the
past from AIX and Solaris native compiler users.
You should turn this into an autoconf test. See config/socket_nsl.m4.
It shows how to conditionally figure out if certain compiler flags are
needed. Linker flags in that case, but the availability of -fPIC can be
detected the same way.