File: configure

package info (click to toggle)
node 0.3.2-7.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 432 kB
  • ctags: 235
  • sloc: ansic: 3,244; makefile: 100; sh: 95
file content (81 lines) | stat: -rwxr-xr-x 1,685 bytes parent folder | download | duplicates (2)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh

ETC_DIR=/etc/ax25
SBIN_DIR=/usr/sbin
BIN_DIR=/usr/bin
LIB_DIR=/usr/lib
VAR_DIR=/var/ax25

echo -n "Your machine architecture is ... "
ARCH=`uname -m`
echo $ARCH

echo -n "Checking man directory... "
MAN_DIR=""
for mandir in /usr/share/man /usr/man
do
	if [ -d $mandir ]
	then
		echo $mandir
		MAN_DIR=$mandir
	fi
done

echo -n "Checking for the existence of the Zlib headers... "
ZLIB=""
HAVEZLIB="#undef"
for zlibdir in /usr/include /usr/local/include
do
	if [ -f $zlibdir/zlib.h ]
	then
		echo $zlibdir/zlib.h
		ZLIB="-lz"
		HAVEZLIB="#define"
	fi
done
if [ -z "$ZLIB" ]
then
	echo "not found."
	echo "            Without Zlib Node will lack compression support"
	echo "            See INSTALL for more information."
	echo
fi

# Global protocol definition symbols for programmers that want to conditionally
# compile
	HAVEAX25="#undef"
	HAVENETROM="#undef"
	HAVEROSE="#undef"

	echo "Using defaults: including support for AX25, NetRom and Rose"
	HAVEAX25="#define"
	HAVENETROM="#define"
	HAVEROSE="#define"
echo "Creating Makefile.include"

sed -e "s~@ARCH@~$ARCH~g; \
	s~@ETC_DIR@~$ETC_DIR~g; \
	s~@LIB_DIR@~$LIB_DIR~g; \
	s~@SBIN_DIR@~$SBIN_DIR~g; \
	s~@BIN_DIR@~$BIN_DIR~g; \
	s~@VAR_DIR@~$VAR_DIR~g; \
	s~@MAN_DIR@~$MAN_DIR~g; \
	s~@ZLIB@~$ZLIB~g" <Makefile.include.in >Makefile.include

echo "Creating config.h"

sed -e "s~@ETC_DIR@~$ETC_DIR~g; \
	s~@LIB_DIR@~$LIB_DIR~g; \
	s~@SBIN_DIR@~$SBIN_DIR~g; \
	s~@BIN_DIR@~$BIN_DIR~g; \
	s~@VAR_DIR@~$VAR_DIR~g; \
	s~@MAN_DIR@~$MAN_DIR~g; \
	s~@HAVEAX25@~$HAVEAX25~g; \
	s~@HAVENETROM@~$HAVENETROM~g; \
	s~@HAVEROSE@~$HAVEROSE~g; \
	s~@HAVEZLIB@~$HAVEZLIB~g" <config.h.in >config.h

echo "Configuration successful"

exit 0