#!/bin/sh

STRIP="/opt/hardhat/devkit/ppc/8xx/bin/ppc_8xx-strip --remove-section=.note --remove-section=.comment" 

if [ "x$1" = "xinstall" ] ; then
	install -m 755 ./src/pwconv $TARGET_DIR/bin
	$STRIP $TARGET_DIR/bin/pwconv
else
	touch aclocal.m4
	touch Makefile.in
	rm -f config.status
	autoconf
	echo "ac_cv_func_setpgrp_void=yes" > config.cache

	HOST_CC=cc CC=/opt/hardhat/devkit/ppc/8xx/bin/ppc_8xx-gcc \
	LD=/opt/hardhat/devkit/ppc/8xx/bin/ppc_8xx-ld \
	./configure    --prefix=$TARGET_DIR --host=ppc --cache-file=config.cache
fi
