Hello Rémi,

* Rémi Denis-Courmont wrote on Fri, Jun 09, 2006 at 10:34:43PM CEST:
> 
> When passing the --enable-static option to the configure script of a
> package that has disabled static libraries by default using
> AC_DISABLE_STATIC in its configure.ac, both static and *shared*
> libraries that libtool builds are non-PIC. Shared libraries should NEVER
> EVER be non-PIC.

I have not heard of such behavior before (that I remember),
and cannot reproduce it with the test below.  Could you show
what you did differently to expose this?

Cheers,
Ralf

$ cat configure.ac
AC_INIT([non-pic-shared], [1], [devnull])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_FILES([Makefile])
AC_PROG_CC
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_OUTPUT
$ cat Makefile.am
lib_LTLIBRARIES = libfoo.la
$ touch libfoo.c
$ autoreconf -v -i
$ ./configure --enable-static
$ make | grep -i pic
 gcc -DPACKAGE_NAME=\"a\" -DPACKAGE_TARNAME=\"a\" -DPACKAGE_VERSION=\"1\" 
"-DPACKAGE_STRING=\"a 1\"" -DPACKAGE_BUGREPORT=\"b\" -DPACKAGE=\"a\" 
-DVERSION=\"1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. 
-I. -g -O2 -c libfoo.c  -fPIC -DPIC -o .libs/libfoo.o

Reply via email to