Replace manual option handling by use of glib
[lcid-xwax.git] / configure
blob570570b2e2e5d0f640a786b919eb735467b15c68
1 #!/bin/sh
3 # Copyright (C) 2008 Mark Hills <mark@pogo.org.uk>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License version 2, as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License version 2 for more details.
14 # You should have received a copy of the GNU General Public License
15 # version 2 along with this program; if not, write to the Free
16 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 # MA 02110-1301, USA.
20 OUTPUT=.config
22 # Set some defaults and parse the command line
24 ALSA=0
25 JACK=0
27 while [ $# -ge 1 ]; do
28 case $1 in
29 --help)
30 echo "Usage: configure [--enable-alsa] [--enable-jack]"
31 exit 0
33 --enable-alsa)
34 ALSA=1
36 --enable-jack)
37 JACK=1
39 esac
41 shift
42 done
44 # Construct the output file
46 > $OUTPUT
48 if [ $ALSA = 1 ]; then
49 echo "ALSA enabled"
50 echo "ALSA = yes" >> $OUTPUT
51 else
52 echo "ALSA disabled"
55 if [ $JACK = 1 ]; then
56 echo "JACK enabled"
57 echo "JACK=yes" >> $OUTPUT
58 else
59 echo "JACK disabled"
62 # Explain the next step
64 echo "Be sure to run 'make clean' if you have changed the configuration."
65 echo "Run 'make' to compile xwax."