$NetBSD: patch-aa,v 1.7 2009/05/25 20:56:38 drochner Exp $ --- configure.orig 2009-03-26 22:45:08.000000000 +0100 +++ configure @@ -117,7 +117,7 @@ for opt do LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}" ;; --enable-pthread) - pthread="auto" # can't skip detection, since it differs by OS + pthread="yes" ;; --disable-pthread) pthread="no" @@ -137,7 +137,7 @@ for opt do shared="yes" ;; --enable-visualize) - LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" + LDFLAGS="$LDFLAGS -lX11" CFLAGS="$CFLAGS -DVISUALIZE=1" vis="yes" ;; @@ -188,6 +188,10 @@ case $host_os in SYS="FREEBSD" LDFLAGS="$LDFLAGS -lm" ;; + dragonfly*) + SYS="DRAGONFLY" + LDFLAGS="$LDFLAGS -lm" + ;; kfreebsd*-gnu) SYS="FREEBSD" CFLAGS="$CFLAGS -DHAVE_MALLOC_H" @@ -244,7 +248,7 @@ case $host_cpu in ASFLAGS="$ASFLAGS -f elf" fi ;; - x86_64) + x86_64|amd64) ARCH="X86_64" AS="yasm" if [ "$SYS" = MACOSX ];then @@ -258,11 +262,11 @@ case $host_cpu in fi ;; powerpc|powerpc64) - ARCH="PPC" if [ $SYS = MACOSX ] then - ALTIVECFLAGS="$ALTIVECFLAGS -faltivec -fastf -mcpu=G4" + ARCH="POWERPC" else + ARCH="PPC" ALTIVECFLAGS="$ALTIVECFLAGS -maltivec -mabi=altivec -DHAVE_ALTIVEC_H" fi ;; @@ -322,7 +326,7 @@ grep -q BIGE conftest.o && CFLAGS="$CFLA # autodetect options that weren't forced nor disabled -libpthread="" +libpthread="$PTHREAD_LDFLAGS $PTHREAD_LIBS" if test "$pthread" = "auto" ; then pthread="no" case $SYS in @@ -355,7 +359,7 @@ if test "$pthread" = "auto" ; then esac fi if test "$pthread" = "yes" ; then - CFLAGS="$CFLAGS -DHAVE_PTHREAD" + CFLAGS="$CFLAGS -DHAVE_PTHREAD $PTHREAD_CFLAGS" LDFLAGS="$LDFLAGS $libpthread" fi @@ -392,7 +396,8 @@ if [ "$avis_input" = "yes" ] ; then fi if [ "$pic" = "yes" ] ; then - CFLAGS="$CFLAGS -fPIC" + CFLAGS="$CFLAGS" + PICFLAG="-prefer-pic" ASFLAGS="$ASFLAGS -DPIC" # resolve textrels in the x86 asm cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"