Motion - Support Question 2010x 02x 05x 034956

configure pthread support


I am having difficulty understanding the expected operation of the configuration script. I'm running on macOSX-10.4 which runs into a problem recognizing pthread support during configuration. (More details on the error output can be found at Motion - Bug Report 2008x 12x 21x 040027). I've been looking in detail into why the script fails (pthread is definitely installed on the system) and I'm curious to understand how it's supposed to work on a standard linux system. What I see is that there are two test flags (PTHREAD_SUPPORT and PTHREAD_LIB) and a test condition (THREAD_CHECK). In tracking to code, it correctly identifies that THREAD_CHECK=yes and that pthread.h exists. Then it finds the correct library in the /usr/lib directory and sets PTHREAD_LIB=yes. But then there seems to be a logic failure (pasted below). Note, if PTHREAD_LIB==yes, then then PTHREAD_SUPPORT never gets set (it's not set anywhere before) and the config file comes to a halt. I'm thinking that it should be a test on PTHREAD_SUPPORT rather than PTHREAD_LIB...but then I'm wondering how this works for anyone else?

if test x$PTHREAD_LIB != xyes; then

        if test "${FreeBSD}" != ""; then
                TEMP_LIBS="$TEMP_LIBS -pthread"
                TEMP_LIBS="$TEMP_LIBS -lpthread"
        { echo "$as_me:$LINENO: result: $PTHREAD_SUPPORT" >&5
echo "${ECHO_T}$PTHREAD_SUPPORT" >&6; }


Motion version:
ffmpeg version: 0.5
Libraries: ffmpeg, mysql, postgresql
Server OS: MACSX 10.4

-- DavidReyna - 05 Feb 2010


Current configure have to be changed to support MacOsX as it was changed to support BSD and Linux and those changes broken

MacOsX detection of pthread , it was :
dnl Checks for Library pthread ( no cross platform )
TEMP_LIBS="$TEMP_LIBS -lpthread"
echo You do not have pthread installed

-- AngelCarpintero - 05 Feb 2010
Topic revision: r2 - 05 Feb 2010, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.