Le 15 mars 04, à 10:25, Henrik Grubbström (Lysator) @ Pike (-) developers forum a écrit :
They want that pthreads flags and libs to be specified namely to the program it is compiling.
Ok. I guess this is due to some system-wide configuration option? Where is the option specified?
It it specified in port's Makefile... I can provide it whatever I want : gnu configure script, a environment variable, ....
It is separated into 2 parts :
PTHREAD_FLAGS PTHREAD_LIBS
But port (then pike for us) have to allow named pthreads flags and libs to be forced....
I have some patches and tryed some works on CVS but it cannot use the specified flags and libs.
So what flags are needed to compile with threads on a recent FreeBSD machine?
Here is extract of /usr/ports/Mk/bsd.ports.mk
.if ${OSVERSION} < 500016 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -pthread .elif ${OSVERSION} < 502102 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -lc_r .else PTHREAD_CFLAGS?= PTHREAD_LIBS?= -lpthread .endif
*but* is "default" values. eg some poweruser can namely specify other kind of pthreads :
-lkse -lpthr
for example...
That's why I have to find a way to specify it at configure time and fail back to the "old" way if it is not specified.
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects