#!/bin/sh
# $Id: cfg-thread,v 1.9 2011/08/13 21:39:04 tom Exp $
# configure ncursest

PACKAGE=ncurses
OPTS=
case `partition` in
fb*|nb*|ob*|*bsd*)
	OPTS="--with-hashed-db --enable-rpath"
	;;
esac

case `partition` in
testing-9)
	;;
*)
	OPTS="$OPTS --enable-pthreads-eintr"
	;;
esac

case `partition` in
nowhere)
	OPTS="$OPTS --enable-weak-symbols"
	;;
*)
	;;
esac

case `partition` in
*-freebsd49-*)
	# threads are in libc_r via this option
	export CFLAGS="-pthread $CFLAGS"
	export CXXFLAGS="-pthread $CXXFLAGS"
	;;
esac

MY_DIR=/usr/local/$PACKAGE
RPATH_LIST=../lib:$MY_DIR/lib \
cfg-shared $OPTS \
	--disable-overwrite \
	--enable-const \
	--enable-pc-files \
	--enable-wgetch-events \
	--with-pthread \
	--prefix=$MY_DIR \
	--with-develop \
	--with-termlib \
	--with-ticlib \
	--with-trace \
	--with-valgrind "$*"
