| 1 |
#!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 |
# vim:set ts=8 sts=2 sw=2 tw=0: |
| 3 |
# |
| 4 |
# configure - Easy configuration script |
| 5 |
# |
| •6 |
# Last Change: 01-Oct-2005. |
| 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_COMMANDscip-shell shell cmigemo 1:1.2+gh0.20220623-3 CHECK_COMMAND().() { |
| 14 |
if testscip-shell system . . test. -e "`whichscip-shell system . . which. $1 2>/dev/nullscip-shell filesystem . . `/dev/null`.`" ; then |
| 15 |
return 0 |
| 16 |
else |
| 17 |
return 1 |
| 18 |
fi |
| 19 |
} |
| 20 |
|
| •21 |
PATH_PREFIX=/usr/localscip-shell filesystem . . `/usr/local`. |
| 22 |
# Check arguments |
| 23 |
for i in $* |
| 24 |
do |
| 25 |
arg_value=`echoscip-shell system . . echo. "$i" | sedscip-shell system . . sed. 's/[-_a-zA-Z0-9]*=//'` |
| 26 |
case $i in |
| 27 |
--prefix=*) PATH_PREFIX=$arg_value;; |
| 28 |
esac |
| 29 |
done |
| 30 |
|
| 31 |
# Check encoding filter |
| 32 |
if CHECK_COMMANDscip-shell shell cmigemo 1:1.2+gh0.20220623-3 CHECK_COMMAND(). qkc ; then |
| 33 |
PROGRAM_ENCODEFILTER="qkc -q -u" |
| 34 |
elif CHECK_COMMANDscip-shell shell cmigemo 1:1.2+gh0.20220623-3 CHECK_COMMAND(). nkf ; then |
| •35 |
PROGRAM_ENCODEFILTER="nkf -x" |
| 36 |
else |
| 37 |
echoscip-shell system . . echo. "ERROR: Require qkc or nkf installed for encode filter." |
| 38 |
exit 1 |
| 39 |
fi |
| 40 |
|
| 41 |
# Check install program |
| 42 |
if testscip-shell system . . test. -x /usr/ucb/installscip-shell filesystem . . `/usr/ucb/install`. ; then |
| 43 |
PROGRAM_INSTALL="/usr/ucb/installscip-shell filesystem . . `/usr/ucb/install`." |
| 44 |
elif testscip-shell system . . test. -x /usr/bin/installscip-shell filesystem . . `/usr/bin/install`. ; then |
| 45 |
PROGRAM_INSTALL="/usr/bin/installscip-shell filesystem . . `/usr/bin/install`." |
| 46 |
else |
| 47 |
PROGRAM_INSTALL="/usr/bin/installscip-shell filesystem . . `/usr/bin/install`." |
| 48 |
echoscip-shell system . . echo. "WARNING: Can't find install program." |
| 49 |
echoscip-shell system . . echo. " But set it \"/usr/bin/install\". So need to make sure." |
| 50 |
fi |
| 51 |
|
| 52 |
# for Debug |
| 53 |
if testscip-shell system . . test. 0 != 0 ; then |
| •54 |
echoscip-shell system . . echo. "PATH_PREFIX=${PATH_PREFIX}" 1>&2 |
| 55 |
echoscip-shell system . . echo. "PROGRAM_ENCODEFILTER=${PROGRAM_ENCODEFILTER}" 1>&2 |
| 56 |
echoscip-shell system . . echo. "PROGRAM_INSTALL=${PROGRAM_INSTALL}" 1>&2 |
| 57 |
fi |
| 58 |
|
| 59 |
# Generate config.mk |
| 60 |
while read line ; do |
| 61 |
case "$line" in |
| 62 |
*\$\{*) eval "echo $line" ;; |
| 63 |
*) echoscip-shell system . . echo. $line |
| 64 |
esac |
| 65 |
done < $config_in > $config_out |