head	1.8;
access;
symbols
	release-1-3-2:1.3.0.2;
locks; strict;
comment	@# @;


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

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

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

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

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

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

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

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


desc
@@


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

VERSION="1.3.3"

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

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

prefix=/usr/local

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'`
		;;
	*)
		echo "configure parameter error"
		echo ""
		echo "Options:"
		echo " --prefix dir           install pipemeter to prefix 'dir'"
 		echo " --package-prefix dest  pretend to install to the prefix,"
		echo "                       but copy files to 'dest/prefix' on make install"
		echo ""
		echo "Influential environment variables:"
		echo "  CC                    C compiler command"
		echo "  CFLAGS                C compiler flags"
		echo "  LDFLAGS               Linker flags"
		exit
		;;
	esac
done

mingw=$(uname |grep -i mingw32)
if test -z "$mingw" ; then
    mingw=$($CC --version |grep -i mingw)
    if test -n "$mingw" ; then
	mingw="yes"
    else
	mingw=""
    fi
else
    mingw="yes"
fi

cat > src/xdmsconfig.h <<EOF
#ifndef XDMS_CONFIG_H_
#define XDMS_CONFIG_H_

#define VERSION "$VERSION"

EOF
if test -n "$mingw" ; then
    echo "#define NO_MKSTEMP" >> src/xdmsconfig.h
    LDFLAGS="$LDFLAGS -liberty"
fi

echo "#endif" >> src/xdmsconfig.h

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

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

sed -e "s|{CC}|$CC|" -e "s|{CFLAGS}|$CFLAGS|" -e "s|{LDFLAGS}|$LDFLAGS|" \
    < src/Makefile.in > src/Makefile

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


1.7
log
@*** empty log message ***
@
text
@d5 1
a5 4
if test -n "$CC"; then
    CC="$CC"
    echo "Forcing compiler to be $CC"
else
d9 2
a10 10
ARCHFLAGS=""
if test -n "$CFLAGS"; then
    ARCHFLAGS="$ARCHFLAGS $CFLAGS"
    echo "Adding $ARCHFLAGS to ARCHFLAGS"
fi

ARCHLIBS=""
if test -n "$LDFLAGS"; then
    ARCHLIBS="$ARCHLIBS $LDFLAGS"
    echo "Adding $ARCHLIBS to ARCHLIBS"
d26 3
a28 3
		echo "valid options are:"
		echo "--prefix dir           install pipemeter to prefix 'dir'"
 		echo "--package-prefix dest  pretend to install to the prefix,"
d30 5
a34 3
		echo "Setting environment variables CFLAGS and LDFLAGS lets you add"
		echo "compile time options for your architecture. CC variable choose the"
		echo "compiler."
d55 3
d61 1
a61 1
    ARCHLIBS="$ARCHLIBS -liberty"
d63 1
d66 1
a66 1
if test ! -z "$packageprefix" ; then
d73 1
a73 2
sed -e "s|{CC}|$CC|" -e "s|{ARCHFLAGS}|$ARCHFLAGS|" \
    -e "s|{ARCHLIBS}|$ARCHLIBS|" -e "s|{VERSION}|$VERSION|" \
@


1.6
log
@*** empty log message ***
@
text
@d49 11
a64 2

mingw=$(uname |grep -i mingw32)
@


1.5
log
@*** empty log message ***
@
text
@d58 1
a58 1
    ARCHLIBS+="-liberty "
@


1.4
log
@*** empty log message ***
@
text
@d3 1
a3 1
VERSION="1.3.2"
d49 13
a68 5
echo "Would install xdms binary to directory $prefix/bin."
echo ""
echo "Configure succesful."


d73 3
a75 7
cat > src/xdmsconfig.h <<EOF
#ifndef XDMS_CONFIG_H_
#define XDMS_CONFIG_H_
/* Uncomment on operating systems without mkstemp */
/* #define NO_MKSTEMP */
#endif
EOF
@


1.3
log
@*** empty log message ***
@
text
@d64 8
@


1.2
log
@*** empty log message ***
@
text
@d3 1
a3 1
VERSION="1.3.1"
@


1.1
log
@*** empty log message ***
@
text
@d24 37
@

