annotate octave-config.in @ 6021:60f9ced8ab53 ss-2-9-9

[project @ 2006-10-02 20:02:20 by jwe]
author jwe
date Mon, 02 Oct 2006 20:02:21 +0000
parents a6a2423a9c25
children e2a1aca62551
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
1 #! /bin/sh -
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
2 #
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
3 # octave-config - reports some configuration values for Octave
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
4 #
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
5 # Rafael Laboissiere <rafael@laboissiere.net>
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
6 # This script is in the public domain
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
7
5909
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
8 API_VERSION=%OCTAVE_API_VERSION%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
9 CANONICAL_HOST_TYPE=%OCTAVE_CANONICAL_HOST_TYPE%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
10 DEFAULT_PAGER=%OCTAVE_DEFAULT_PAGER%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
11 ARCHLIBDIR=%OCTAVE_ARCHLIBDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
12 BINDIR=%OCTAVE_BINDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
13 DATADIR=%OCTAVE_DATADIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
14 EXEC_PREFIX=%OCTAVE_EXEC_PREFIX%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
15 FCNFILEDIR=%OCTAVE_FCNFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
16 IMAGEDIR=%OCTAVE_IMAGEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
17 INCLUDEDIR=%OCTAVE_INCLUDEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
18 INFODIR=%OCTAVE_INFODIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
19 INFOFILE=%OCTAVE_INFOFILE%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
20 LIBDIR=%OCTAVE_LIBDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
21 LIBEXECDIR=%OCTAVE_LIBEXECDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
22 LIBEXECDIR=%OCTAVE_LIBEXECDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
23 LOCALAPIARCHLIBDIR=%OCTAVE_LOCALAPIARCHLIBDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
24 LOCALAPIFCNFILEDIR=%OCTAVE_LOCALAPIFCNFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
25 LOCALAPIOCTFILEDIR=%OCTAVE_LOCALAPIOCTFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
26 LOCALARCHLIBDIR=%OCTAVE_LOCALARCHLIBDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
27 LOCALFCNFILEDIR=%OCTAVE_LOCALFCNFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
28 LOCALOCTFILEDIR=%OCTAVE_LOCALOCTFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
29 LOCALSTARTUPFILEDIR=%OCTAVE_LOCALSTARTUPFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
30 LOCALVERARCHLIBDIR=%OCTAVE_LOCALVERARCHLIBDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
31 LOCALVERFCNFILEDIR=%OCTAVE_LOCALVERFCNFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
32 LOCALVEROCTFILEDIR=%OCTAVE_LOCALVEROCTFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
33 MAN1DIR=%OCTAVE_MAN1DIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
34 MAN1EXT=%OCTAVE_MAN1EXT%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
35 MANDIR=%OCTAVE_MANDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
36 OCTFILEDIR=%OCTAVE_OCTFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
37 OCTINCLUDEDIR=%OCTAVE_OCTINCLUDEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
38 OCTLIBDIR=%OCTAVE_OCTLIBDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
39 PREFIX=%OCTAVE_PREFIX%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
40 STARTUPFILEDIR=%OCTAVE_STARTUPFILEDIR%
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
41 VERSION=%OCTAVE_VERSION%
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
42
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
43 usage_msg="usage: octave-config [options]"
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
44
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
45 if [ $# -eq 0 ]; then
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
46 echo "$usage_msg" 1>&2
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
47 exit 1
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
48 fi
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
49
4443
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
50 while [ $# -gt 0 ]
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
51 do
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
52 case "$1" in
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
53 -h | -\? | --help)
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
54 echo "$usage_msg"
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
55 cat << EOF
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
56
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
57 Options:
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
58
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
59 -h, -?, --help Print this message.
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
60
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
61 --m-site-dir Print the name of the directory where Octave
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
62 expects to find locally installed .m files.
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
63
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
64 --oct-site-dir Print the name of the directory where Octave
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
65 expects to find locally installed .oct files.
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
66
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
67 -p VAR, --print VAR Print the value of the given configuration
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
68 variable VAR. Recognized variables are:
4443
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
69
5909
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
70 API_VERSION LOCALAPIARCHLIBDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
71 CANONICAL_HOST_TYPE LOCALAPIFCNFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
72 DEFAULT_PAGER LOCALAPIOCTFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
73 ARCHLIBDIR LOCALARCHLIBDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
74 BINDIR LOCALFCNFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
75 DATADIR LOCALOCTFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
76 EXEC_PREFIX LOCALSTARTUPFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
77 FCNFILEDIR LOCALVERARCHLIBDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
78 LOCALVEROCTFILEDIR LOCALVERFCNFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
79 IMAGEDIR MAN1DIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
80 MAN1EXT MANDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
81 INCLUDEDIR OCTFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
82 INFODIR OCTINCLUDEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
83 INFOFILE OCTLIBDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
84 LIBDIR PREFIX
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
85 LIBEXECDIR STARTUPFILEDIR
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 4670
diff changeset
86 LIBEXECDIR VERSION
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
87
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
88 -v, --version Print the Octave version number.
4443
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
89
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
90 EOF
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
91 exit 0
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
92 ;;
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
93 --m-site-dir)
4670
4ad69c3588a9 [project @ 2003-11-26 14:42:51 by jwe]
jwe
parents: 4449
diff changeset
94 echo $LOCALVERFCNFILEDIR
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
95 ;;
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
96 --oct-site-dir)
4670
4ad69c3588a9 [project @ 2003-11-26 14:42:51 by jwe]
jwe
parents: 4449
diff changeset
97 echo $LOCALVEROCTFILEDIR
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
98 ;;
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
99 -v | --version)
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
100 echo $VERSION
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
101 ;;
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
102 -p | --print)
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
103 opt="$1"
4443
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
104 shift
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
105 if [ $# -eq 0 ]; then
4444
9a2206207402 [project @ 2003-07-07 20:04:53 by jwe]
jwe
parents: 4443
diff changeset
106 echo "octave-config: $opt option requires argument" 1>&2
4443
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
107 exit 1
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
108 fi
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
109 eval echo \${$1}
aa345723c698 [project @ 2003-07-07 19:55:18 by jwe]
jwe
parents: 3845
diff changeset
110 ;;
3845
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
111 *)
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
112 echo "octave-config: unrecognized argument $1" 2>&1
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
113 exit 1
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
114 ;;
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
115 esac
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
116 shift
d68c34dc9c25 [project @ 2001-07-26 02:11:05 by jwe]
jwe
parents:
diff changeset
117 done