Debian Codegraph @

configure

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 #!/bin/sh
2 # vim:set ts=8 sts=2 sw=2 tw=0:
3 #
4 # configure - Easy configuration script
5 #
6 # Last Change: 07-Dec-2003.
7 # Author & Maintainer: MURAOKA Taro <[email protected]>
8
9 config_out=config.mk
10 config_in=compile/config.mk.in
11 config_default=compile/config_default.mk
12
13 CHECK_COMMAND() {
14 if test -e "`which $1 2>/dev/null`" ; then
15 return 0
16 else
17 return 1
18 fi
19 }
20
21 # Check HTTP access tool
22 if CHECK_COMMAND curl ; then
23 PROGRAM_HTTP="curl -O"
24 elif CHECK_COMMAND wget ; then
25 PROGRAM_HTTP="wget"
26 elif CHECK_COMMAND fetch ; then
27 PROGRAM_HTTP="fetch"
28 else
29 echo "ERROR: Require one of HTTP access tools (curl, wget or fetch)."
30 exit 1
31 fi
32
33 # Check encoding filter
34 if CHECK_COMMAND qkc ; then
35 PROGRAM_ENCODEFILTER="qkc -q -u"
36 elif CHECK_COMMAND nkf ; then
37 PROGRAM_ENCODEFILTER="nkf"
38 else
39 echo "ERROR: Require qkc or nkf installed for encode filter."
40 exit 1
41 fi
42
43 # Check install program
44 if test -x /usr/ucb/install ; then
45 PROGRAM_INSTALL="/usr/ucb/install"
46 elif test -x /usr/bin/install ; then
47 PROGRAM_INSTALL="/usr/bin/install"
48 else
49 PROGRAM_INSTALL="/usr/bin/install"
50 echo "WARNING: Can't find install program."
51 echo " But set it \"/usr/bin/install\". So need to make sure."
52 fi
53
54 # for Debug
55 if test 0 != 0 ; then
56 echo "PROGRAM_HTTP=${PROGRAM_HTTP}" 1>&2
57 echo "PROGRAM_ENCODEFILTER=${PROGRAM_ENCODEFILTER}" 1>&2
58 echo "PROGRAM_INSTALL=${PROGRAM_INSTALL}" 1>&2
59 fi
60
61 # Generate config.mk
62 while read line ; do
63 case "$line" in
64 *\$\{*) eval "echo $line" ;;
65 *) echo $line
66 esac
67 done < $config_in > $config_out