configure update for threads
This commit is contained in:
parent
ad0039cea0
commit
1130039d19
@ -35,6 +35,6 @@ JOELIB = @joelib@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
LIBS = @LIBS@
|
||||
PTLIBS = @PTLIBS@
|
||||
DEFS = @DEFS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
|
30
configure.in
30
configure.in
@ -77,10 +77,11 @@ fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl On NetBSD we need to add the pkg dirs
|
||||
dnl On NetBSD we need to add the pkg dirs for posix threads
|
||||
dnl
|
||||
if test "$SYSTEM" = "NetBSD"; then
|
||||
CFLAGS="$CFLAGS -I /usr/pkg/include"
|
||||
CFLAGS="$CFLAGS `pthread-config --cflags`"
|
||||
LDFLAGS="$LDFLAGS `pthread-config --ldflags`"
|
||||
fi
|
||||
|
||||
dnl
|
||||
@ -88,11 +89,18 @@ dnl For FreeBSD we need -pthread for GCC
|
||||
dnl
|
||||
if test "$SYSTEM" = "FreeBSD"; then
|
||||
CFLAGS="-pthread $CFLAGS"
|
||||
PTLIBS="$PTLIBS -lpthread"
|
||||
else
|
||||
PTLIBS="$PTLIBS -lpthread"
|
||||
fi
|
||||
AC_SUBST(PTLIBS)
|
||||
|
||||
|
||||
dnl
|
||||
dnl POSIX threads
|
||||
dnl
|
||||
AC_CHECK_LIB(pthread,pthread_create,result=yes,result=no)
|
||||
if test "$result" = "yes"; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
fi
|
||||
AC_CHECK_HEADERS(pthread.h,PTHREADS=Yes,PTHREADS=No)
|
||||
|
||||
|
||||
|
||||
dnl
|
||||
@ -180,15 +188,6 @@ if test "$result" = "yes"; then
|
||||
AC_CHECK_HEADERS(zlib.h,ZLIBSUP=Yes,ZLIBSUP=No)
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl POSIX threads
|
||||
dnl
|
||||
PTHREADS=No
|
||||
AC_CHECK_LIB(pthread,pthread_create,result=yes,result=no)
|
||||
dnl if test "$result" = "yes"; then
|
||||
AC_CHECK_HEADERS(pthread.h,PTHREADS=Yes,PTHREADS=No)
|
||||
dnl fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl Checks for header files.
|
||||
@ -354,7 +353,6 @@ AC_MSG_RESULT([
|
||||
|
||||
Version : ..................... ${VERSION}
|
||||
Hydra zlib compression : ...... ${ZLIBSUP}
|
||||
Posix threads : ............... ${PTHREADS}
|
||||
|
||||
])
|
||||
|
||||
|
@ -24,7 +24,7 @@ OTHER = Makefile issue issue.netbsd
|
||||
all: mbtask
|
||||
|
||||
mbtask: ${OBJS} ${LIBS}
|
||||
${CC} -o mbtask ${OBJS} ${PTLIBS} ${LIBS}
|
||||
${CC} -o mbtask ${OBJS} ${LIBS}
|
||||
|
||||
clean:
|
||||
rm -f mbtask *.o *.h~ *.c~ version.* core filelist Makefile.bak
|
||||
|
Reference in New Issue
Block a user