* remove unusesd static variable nocursor
[fvwm.git] / bin / fvwm-config.in
blobe1ca4ff776e89429117bced433701b8cd12cdcd9
1 #!/bin/sh
3 # Querying fvwm installation. Author: Mikhael Goikhman.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 PACKAGE="@PACKAGE@"
20 VERSION="@VERSION@"
21 script=`basename $0`
23 usage()
25 cat <<EOF
26 This script is a part of $PACKAGE-$VERSION package.
28 Usage: $script [OPTIONS]
29 Options:
30 [-h] [--help] [-?]
31 [-v] [--version] [-V]
32 [-i] [--info]
34 [-P] [--prefix]
35 [-E] [--exec-prefix]
36 [-B] [--bindir]
37 [--datarootdir]
38 [-D] [--datadir]
39 [-L] [--libexecdir]
40 [-S] [--sysconfdir]
41 [-M] [--mandir]
42 [-O] [--localedir]
44 [-m] [--fvwm-moduledir]
45 [-d] [--fvwm-datadir]
46 [-p] [--fvwm-perllibdir]
47 [-I] [--default-imagepath]
48 [-U] [--default-userdir]
50 [-e] [--fvwm-exe] print fvwm executable name (in bindir)
51 [-s] [--supports] list supported features, one per line
52 [--supports-<feature>] return: 0 (yes), 100 (no), 200 (unknown)
53 [--is-final] print yes or no
54 [--is-stable] print yes or no
55 [--release-date] print the release date (if final)
56 EOF
57 exit $1
60 if test $# -eq 0; then
61 usage 1 1>&2
64 prefix="@prefix@"
65 exec_prefix="@exec_prefix@"
66 bindir="@bindir@"
67 datarootdir="@datarootdir@"
68 datadir="@datadir@"
69 libexecdir="@libexecdir@"
70 sysconfdir="@sysconfdir@"
71 mandir="@mandir@"
72 localedir="@LOCALEDIR@"
74 fvwm_moduledir="@FVWM_MODULEDIR@"
75 fvwm_datadir="@FVWM_DATADIR@"
76 fvwm_perllibdir="@FVWM_PERLLIBDIR@"
77 fvwm_imagepath="@FVWM_IMAGEPATH@"
78 fvwm_userdir='$HOME/.fvwm'
79 fvwm_exe='fvwm'
81 VERSIONINFO="@VERSIONINFO@"
82 release_date="@RELDATENUM@"
84 with_bidi=@with_bidi@
85 with_gettext=@with_gettext@
86 with_gtk=@with_gtk@
87 with_gdkimlib=@with_gdkimlib@
88 with_gnomelibs=@with_gnomelibs@
89 with_iconv=@with_iconv@
90 with_perllib=@with_perllib@
91 with_png=@with_png@
92 with_readline=@with_readline@
93 with_rplay=@with_rplay@
94 with_rsvg=@with_rsvg@
95 with_shape=@with_shape@
96 with_shm=@with_shm@
97 with_sm=@with_sm@
98 with_stroke=@with_stroke@
99 with_xinerama=@with_xinerama@
100 with_xft=@with_xft@
101 with_xpm=@with_xpm@
102 with_xrender=@with_xrender@
104 is_stable=no
105 is_final=@ISRELEASED@
107 while test $# -gt 0; do
108 case "$1" in
109 --help|-help|-h|-\?)
110 usage 0 ;;
112 --version|-version|-v|-V)
113 echo "$VERSION" ;;
115 --prefix|-prefix|-P)
116 echo "$prefix" ;;
118 --exec-prefix|-exec-prefix|-E)
119 echo "$exec_prefix" ;;
121 --bindir|-bindir|-B)
122 echo "$bindir" ;;
124 --datarootdir|-datarootdir)
125 echo "$datarootdir" ;;
127 --datadir|-datadir|-D)
128 echo "$datadir" ;;
130 --libexecdir|-libexecdir|-L)
131 echo "$libexecdir" ;;
133 --sysconfdir|-sysconfdir|-S)
134 echo "$sysconfdir" ;;
136 --mandir|-mandir|-M)
137 echo "$mandir" ;;
139 --localedir|-localedir|-O)
140 echo "$localedir" ;;
142 --fvwm-moduledir|-fvwm-moduledir|-m)
143 echo "$fvwm_moduledir" ;;
145 --fvwm-datadir|-fvwm-datadir|-d)
146 echo "$fvwm_datadir" ;;
148 --fvwm-perllibdir|-fvwm-perllibdir|--perllibdir|-perllibdir|-p)
149 echo "$fvwm_perllibdir" ;;
151 --default-imagepath|-default-imagepath|-I)
152 echo "$fvwm_imagepath" ;;
154 --default-userdir|-default-userdir|-U)
155 echo "$fvwm_userdir" ;;
157 --fvwm-exe|-fvwm-exe|-e)
158 echo "$fvwm_exe" ;;
160 --supports|-supports|-s)
161 test "$with_bidi" = "yes" && echo "bidi"
162 test "$with_gettext" = "yes" && echo "gettext"
163 test "$with_gtk" = "yes" && echo "gtk"
164 test "$with_gdkimlib" = "yes" && echo "gdk-imlib"
165 test "$with_gnomelibs" = "yes" && echo "gnome-libs"
166 test "$with_iconv" = "yes" && echo "iconv"
167 test "$with_perllib" = "yes" && echo "perllib"
168 test "$with_png" = "yes" && echo "png"
169 test "$with_readline" = "yes" && echo "readline"
170 test "$with_rplay" = "yes" && echo "rplay"
171 test "$with_rsvg" = "yes" && echo "rsvg"
172 test "$with_shape" = "yes" && echo "shape"
173 test "$with_shm" = "yes" && echo "shm"
174 test "$with_sm" = "yes" && echo "sm"
175 test "$with_stroke" = "yes" && echo "stroke"
176 test "$with_xinerama" = "yes" && echo "xinerama"
177 test "$with_xft" = "yes" && echo "xft"
178 test "$with_xpm" = "yes" && echo "xpm"
179 test "$with_xrender" = "yes" && echo "xrender"
182 --supports-*)
183 feature=`echo "$1" | sed 's/^--supports-//'`
184 feature=`echo "$feature" | sed 's/[-_]//g'`
185 test "$feature" = "gnomewm" && feature="gnomehints"
186 with=`eval echo '$'with_"$feature"`
187 test "$with" = "yes" && exit 0
188 test "$with" = "no" && exit 100
189 exit 200
192 --info|-info|-i)
193 echo "Package: $PACKAGE"
194 echo "Version: $VERSION$VERSIONINFO"
195 echo ""
196 echo "Instalation options:"
197 echo " prefix: $prefix"
198 echo " exec-prefix: $exec_prefix"
199 echo " bindir: $bindir"
200 echo " datadir: $datadir"
201 echo " libexecdir: $libexecdir"
202 echo " sysconfdir: $sysconfdir"
203 echo " mandir: $mandir"
204 echo " localedir: $localedir"
205 echo ""
206 echo "Compiled-in paths:"
207 echo " Module directory: $fvwm_moduledir"
208 echo " Data directory: $fvwm_datadir"
209 echo " Perl lib directory: $fvwm_perllibdir"
210 echo " Default ImagePath: $fvwm_imagepath"
211 echo " Default UserDir: $fvwm_userdir"
212 echo ""
213 echo "Support for features:"
214 echo " bidi (bi-directionality): $with_bidi"
215 echo " gettext (Native Lang Support): $with_gettext"
216 echo " gtk (required for FvwmGtk): $with_gtk"
217 echo " gdk-imlib (in FvwmGtk): $with_gdkimlib"
218 echo " gnome-libs (in FvwmGtk): $with_gnomelibs"
219 echo " perllib (Perl library installed): $with_perllib"
220 echo " iconv (i18n conversions): $with_iconv"
221 echo " png: $with_png"
222 echo " readline: $with_readline"
223 echo " rplay: $with_rplay"
224 echo " shape (shaped windows): $with_shape"
225 echo " shm (shared memory): $with_shm"
226 echo " sm (session management): $with_sm"
227 echo " stroke (mouse gestures): $with_stroke"
228 echo " rsvg (SVG icons and images): $with_rsvg"
229 echo " xinerama (multi-head): $with_xinerama"
230 echo " xft (FreeType anti-alias font): $with_xft"
231 echo " xpm: $with_xpm"
232 echo " xrender (XFree86 Xrender extention): $with_xrender"
235 --is-stable|-is-stable)
236 test "$is_stable" = yes && echo yes
237 test "$is_stable" != yes && echo no
240 --is-final|-is-final)
241 test "$is_final" = yes && echo yes
242 test "$is_final" != yes && echo no
245 --release-date|-release-date)
246 echo $release_date
250 echo >&2 "$script: unknown argument '$1'."
251 echo >&2 "Run '$script --help' to get the usage."
252 exit 1
255 esac
256 shift
257 done
259 exit 0