pkgsrc/devel/pwlib/patches/patch-ae
2006-10-12 17:28:16 +00:00

115 lines
4 KiB
Text

$NetBSD: patch-ae,v 1.6 2006/10/12 17:28:16 rillig Exp $
--- configure.orig 2004-11-22 00:15:48.000000000 +0100
+++ configure 2006-10-12 19:26:05.000000000 +0200
@@ -2059,6 +2059,14 @@ case "$target_os" in
need_pragma=yes ;
;;
+ dragonfly* ) OSTYPE=DragonFly ;
+ OS_TAG="P_DRAGONFLY" ;
+ if test "x$OSRELEASE" = "x"; then
+ OSRELEASE="`sysctl -n kern.osreldate`" ;
+ fi
+ need_pragma=yes ;
+ ;;
+
openbsd* ) OSTYPE=OpenBSD ;
OS_TAG="P_OPENBSD" ;
OSRELEASE="`sysctl -n kern.osrevision`" ;
@@ -3144,13 +3152,13 @@ fi
-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
+echo $ECHO_N "checking for pthread_create in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3214,7 +3222,7 @@ else
fi
if test ${HAS_PTHREADS} = yes ; then
- ENDLDLIBS="$ENDLDLIBS -lpthread"
+ ENDLDLIBS="$ENDLDLIBS ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
STDCCFLAGS="$STDCCFLAGS -D_REENTRANT"
else
echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
@@ -3303,6 +3311,8 @@ fi
if test ${HAS_PTHREADS} = yes ; then
echo "$as_me:$LINENO: checking if pthread_mutex_timedlock is available" >&5
echo $ECHO_N "checking if pthread_mutex_timedlock is available... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3320,7 +3330,7 @@ pthread_mutex_timedlock(NULL, NULL);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -3346,6 +3356,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
HAS_PTHREADS_XPG6=no
fi
+LIBS=$ac_check_lib_save_LIBS
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test ${HAS_PTHREADS_XPG6} = yes ; then
echo "$as_me:$LINENO: result: yes" >&5
@@ -3360,13 +3371,13 @@ _ACEOF
echo "${ECHO_T}no" >&6
fi
- echo "$as_me:$LINENO: checking for sem_timedwait in -lpthread" >&5
-echo $ECHO_N "checking for sem_timedwait in -lpthread... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for sem_timedwait in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
+echo $ECHO_N "checking for sem_timedwait in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_sem_timedwait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3504,7 +3515,7 @@ cat >>conftest.$ac_ext <<_ACEOF
int
main ()
{
-pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
;
return 0;
}
@@ -6483,7 +6494,7 @@ fi
done
if test "${HAS_SDL:-unset}" != "unset" ; then
- if test "${X11LIBDIR:-unset}" == "unset" ; then
+ if test "${X11LIBDIR:-unset}" = "unset" ; then
X11LIBDIR=/usr/X11R6/lib
fi
echo "$as_me:$LINENO: checking for SDL_CreateYUVOverlay in -lSDL" >&5
@@ -6492,7 +6503,7 @@ if test "${ac_cv_lib_SDL_SDL_CreateYUVOv
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lSDL -L${X11LIBDIR} -lpthread -lX11 -lXext -laa $LIBS"
+LIBS="-lSDL -L${X11LIBDIR} ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} -lX11 -lXext -laa $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF