openbsd-ports/lang/python/3.2/patches/patch-configure_in
2011-09-20 10:51:26 +00:00

54 lines
1.5 KiB
Plaintext

$OpenBSD: patch-configure_in,v 1.1.1.1 2011/09/20 10:51:26 fgsch Exp $
--- configure.in.orig Sat Sep 3 18:16:50 2011
+++ configure.in Mon Sep 5 20:00:17 2011
@@ -1773,7 +1773,7 @@
BSD/OS*/4*)
LDSHARED="gcc -shared"
LDCXXSHARED="g++ -shared";;
- FreeBSD*)
+ FreeBSD*|OpenBSD*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
LDSHARED='$(CC) -shared'
@@ -1781,22 +1781,6 @@
else
LDSHARED="ld -Bshareable"
fi;;
- OpenBSD*)
- if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
- then
- LDSHARED='$(CC) -shared $(CCSHARED)'
- LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
- else
- case `uname -r` in
- [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
- LDSHARED="ld -Bshareable ${LDFLAGS}"
- ;;
- *)
- LDSHARED='$(CC) -shared $(CCSHARED)'
- LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
- ;;
- esac
- fi;;
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
@@ -1946,9 +1930,14 @@
# only check for sem_init if thread support is requested
if test "$with_threads" = "yes" -o -z "$with_threads"; then
- AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
- # posix4 on Solaris 2.6
- # pthread (first!) on Linux
+ case $ac_sys_system/$ac_sys_release in
+ OpenBSD*)
+ LIBS="-pthread $(LIBS)" ;;
+ *)
+ AC_SEARCH_LIBS(sem_init, pthread rt posix4) ;; # 'Real Time' functions on Solaris
+ # posix4 on Solaris 2.6
+ # pthread (first!) on Linux
+ esac
fi
# check if we need libintl for locale functions