head	1.8;
access;
symbols;
locks; strict;
comment	@# @;


1.8
date	2007.08.22.19.53.17;	author shd;	state Exp;
branches;
next	1.7;

1.7
date	2006.08.17.19.02.24;	author shd;	state Exp;
branches;
next	1.6;

1.6
date	2006.08.17.18.33.05;	author shd;	state Exp;
branches;
next	1.5;

1.5
date	2005.07.21.23.29.26;	author shd;	state Exp;
branches;
next	1.4;

1.4
date	2005.07.21.23.18.22;	author shd;	state Exp;
branches;
next	1.3;

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

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

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


desc
@@


1.8
log
@Moved development into a Git repository at
git://zakalwe.fi/shd-tcp-tools
@
text
@#!/bin/sh

if test -z "$CC" ; then
    CC="gcc"
fi

if test -z "$CFLAGS" ; then
    CFLAGS="-O2"
fi

prefix="/usr/local"
packageprefix=""
have_mandir="no"
have_bindir="no"

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'`
		;;
	--bindir=*)
		bindir=`echo $opt | sed -n 's|--bindir=\(.*\)|\1|p'`
		have_bindir="yes"
		;;
	--mandir=*)
		mandir=`echo $opt | sed -n 's|--mandir=\(.*\)|\1|p'`
		have_mandir="yes"
		;;
	--compiler=*)
		CC=`echo $opt | sed -n 's|--compiler=\(.*\)|\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"
		echo "--bindir=dir           install program to 'dir' (PREFIX/bin/)"
		echo "--mandir=dir           install man page to 'dir' (PREFIX/share/man/)"
		echo "--compiler=program     compile with 'program' (gcc)"
		exit
		;;
        *)
		echo "unknown configure argument:" "$opt" "(ignoring)"
		;;
	esac
done

if test -n "$packageprefix" ; then
    packageprefix="$packageprefix/"
fi

if test "$have_bindir" = "no" ; then
    bindir="$prefix/bin"
fi

if test "$have_mandir" = "no" ; then
    mandir="$prefix/share/man"
fi

packagebindir="$packageprefix$bindir"
packagemandir="$packageprefix$mandir"

rm -f stdint.h
cat > stdinttest.c <<EOF
#include <stdint.h>
int main(void) { int8_t a = 0; int16_t b = 0; int32_t c = 0; int64_t d = 0; uint8_t e = 0; uint16_t f = 0; uint32_t g = 0; uint64_t h = 0; intptr_t i = 0; return 0; }
EOF
$CC -o stdinttest stdinttest.c 2>/dev/null
if test "$?" != "0" ; then
    echo "#include <inttypes.h>" > stdint.h
    echo "Potential hazard detected: stdint.h is missing (needed for portable types)"
fi

sed -e "s|{BINDIR}|$packagebindir|g" \
    -e "s|{MANDIR}|$packagemandir|g" \
    -e "s|{CC}|$CC|g" -e "s|{CFLAGS}|$CFLAGS|g" -e "s|{LDFLAGS}|$LDFLAGS|" \
    < Makefile.in > Makefile

echo ""
echo ""
echo ""
echo ""
echo "shd-tcp-tools development has moved into a Git repository. Read"
echo ""
echo "    http://zakalwe.fi/~shd/foss/Git.instructions.txt"
echo ""
echo "This is not the latest version of shd-tcp-tools! Sleeping 5 secs."
echo ""
echo ""
echo ""
sleep 5

echo ""
echo "  prefix directory:          $prefix"
echo "  package prefix:            $packageprefix"
echo "  binary directory:          $bindir"
echo "  man directory:             $mandir"
echo "  compiler:                  $compiler"
echo ""
echo "configure succesful."
@


1.7
log
@*** empty log message ***
@
text
@d84 14
@


1.6
log
@*** empty log message ***
@
text
@d67 11
@


1.5
log
@*** empty log message ***
@
text
@d3 8
a12 1
compiler="gcc"
d33 1
a33 1
		compiler=`echo $opt | sed -n 's|--compiler=\(.*\)|\1|p'`
d38 2
a39 2
		echo "--prefix dir           install to prefix 'dir'"
 		echo "--package-prefix dest  pretend to install to the prefix,"
d41 3
a43 3
		echo "--bindir dir           install program to 'dir' (PREFIX/bin/)"
		echo "--mandir dir           install man page to 'dir' (PREFIX/share/man/)"
		echo "--compiler program     compile with 'program' (gcc)"
d69 1
a69 1
    -e "s|{CC}|$compiler|g" \
@


1.4
log
@*** empty log message ***
@
text
@a2 1
version="0.04"
a61 1
    -e "s|{VERSION}|$version|g" \
@


1.3
log
@*** empty log message ***
@
text
@d3 1
a3 1
version="0.03"
@


1.2
log
@*** empty log message ***
@
text
@d3 1
a3 1
version="0.02"
@


1.1
log
@*** empty log message ***
@
text
@d3 6
a8 1
prefix=/usr/local
d15 23
a37 2
	*)
		echo "configure parameter error"
d40 3
d46 20
a65 1
sed -e "s|{PREFIX}|$prefix|g" < Makefile.in > Makefile
d67 8
a74 1
echo "would install shd-tcp-tools to $prefix/bin"
@

