File: configure

package info (click to toggle)
cmigemo 1:1.2+gh0.20140306-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,668 kB
  • ctags: 1,550
  • sloc: ansic: 2,617; lisp: 656; cs: 188; makefile: 174; sh: 172; cpp: 67; perl: 59; csh: 49
file content (65 lines) | stat: -rwxr-xr-x 1,450 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
64
65
#!/bin/sh
# vim:set ts=8 sts=2 sw=2 tw=0:
#
# configure - Easy configuration script
#
# Last Change: 01-Oct-2005.
# Author & Maintainer: MURAOKA Taro <koron@tka.att.ne.jp>

config_out=config.mk
config_in=compile/config.mk.in
config_default=compile/config_default.mk

CHECK_COMMAND() {
  if test -e "`which $1 2>/dev/null`" ; then
    return 0
  else
    return 1
  fi
}

PATH_PREFIX=/usr/local
# Check arguments
for i in $*
do
  arg_value=`echo "$i" | sed 's/[-_a-zA-Z0-9]*=//'`
  case $i in
    --prefix=*) PATH_PREFIX=$arg_value;;
  esac
done

# Check encoding filter
if CHECK_COMMAND qkc ; then
  PROGRAM_ENCODEFILTER="qkc -q -u"
elif CHECK_COMMAND nkf ; then
  PROGRAM_ENCODEFILTER="nkf -x"
else
  echo "ERROR: Require qkc or nkf installed for encode filter."
  exit 1
fi

# Check install program
if test -x /usr/ucb/install ; then
  PROGRAM_INSTALL="/usr/ucb/install"
elif test -x /usr/bin/install ; then
  PROGRAM_INSTALL="/usr/bin/install"
else
  PROGRAM_INSTALL="/usr/bin/install"
  echo "WARNING: Can't find install program."
  echo "         But set it \"/usr/bin/install\".  So need to make sure."
fi

# for Debug
if test 0 != 0 ; then
  echo "PATH_PREFIX=${PATH_PREFIX}" 1>&2
  echo "PROGRAM_ENCODEFILTER=${PROGRAM_ENCODEFILTER}" 1>&2
  echo "PROGRAM_INSTALL=${PROGRAM_INSTALL}" 1>&2
fi

# Generate config.mk
while read line ; do
  case "$line" in
    *\$\{*) eval "echo $line" ;;
    *) echo $line
  esac
done < $config_in > $config_out