head	1.3;
access;
symbols
	release-0-03:1.3.0.2;
locks; strict;
comment	@# @;


1.3
date	2006.01.26.11.11.12;	author shd;	state Exp;
branches;
next	1.2;

1.2
date	2006.01.22.22.52.21;	author shd;	state Exp;
branches;
next	1.1;

1.1
date	2006.01.22.22.36.54;	author shd;	state Exp;
branches;
next	;


desc
@@


1.3
log
@*** empty log message ***
@
text
@#!/bin/sh

prefix=/usr/local
version="0.03"

for opt in "$@@" ; do
	case $opt in
	--prefix=*)
		prefix=`echo $opt | sed -n 's/--prefix=\(.*\)/\1/p'`
		;;
	--package-prefix=*)
		packageprefix=`echo $opt | sed -n 's/--package-prefix=\(.*\)/\1/p'`
		;;
	--help)
		echo ""
		echo "Valid options are:"
		echo "--prefix=dir           Install to prefix 'dir'"
 		echo "--package-prefix=dest  Pretend to install to the prefix,"
		echo "                       but copy files to 'dest/prefix' on make install"
		exit
		;;
	esac
done

rm -f stdint.h
cat > stdinttest.c <<EOF
#include <stdint.h>
int main(void) {uint8_t a = 0; uint32_t b = 0; return 0; }
EOF
gcc -o stdinttest stdinttest.c 2>/dev/null
if test "$?" != "0" ; then
    echo "#include <inttypes.h>" > stdint.h
    echo "Warning: stdint.h is missing (needed for portable types)"
    echo ""
fi

if test ! -z "$packageprefix" ; then
    prefix="$packageprefix/$prefix"
fi

sed -e "s|{PREFIX}|$prefix|g" -e "s|{VERSION}|$version|" < Makefile.in > Makefile

echo "#define VERSION \"$version\"" > version.h

echo "Would install binary to directory $prefix/bin."
echo ""
echo "Configure succesful."
@


1.2
log
@*** empty log message ***
@
text
@d4 1
a4 1
version="0.02"
@


1.1
log
@*** empty log message ***
@
text
@d25 12
@

