configure update for threads

This commit is contained in:
Michiel Broek 2003-12-18 21:13:53 +00:00
parent ad0039cea0
commit 1130039d19
4 changed files with 2130 additions and 1479 deletions

View File

@ -35,6 +35,6 @@ JOELIB = @joelib@
CFLAGS = @CFLAGS@
LIBS = @LIBS@
PTLIBS = @PTLIBS@
DEFS = @DEFS@
LDFLAGS = @LDFLAGS@

3575
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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}
])

View File

@ -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