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