File: configure

package info (click to toggle)
xdms 1.3.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 296 kB
  • ctags: 139
  • sloc: ansic: 1,514; makefile: 82; sh: 51
file content (63 lines) | stat: -rwxr-xr-x 1,483 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh

VERSION="1.3.2"

if test -n "$CC"; then
    CC="$CC"
    echo "Forcing compiler to be $CC"
else
    CC="gcc"
fi

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"
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 "valid options are:"
		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 "Setting environment variables CFLAGS and LDFLAGS lets you add"
		echo "compile time options for your architecture. CC variable choose the"
		echo "compiler."
		exit
		;;
	esac
done

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

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

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


sed -e "s|{CC}|$CC|" -e "s|{ARCHFLAGS}|$ARCHFLAGS|" \
    -e "s|{ARCHLIBS}|$ARCHLIBS|" -e "s|{VERSION}|$VERSION|" \
    < src/Makefile.in > src/Makefile