~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to kscd/kscd-script

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
#   Kscd - A simple cd player for the KDE Project
 
4
#
 
5
#   $Id: kscd-script,v 1.8 1999/11/24 07:43:44 dfoerste Exp $
 
6
 
7
#   Copyright (c) 1997 Bernd Johannes Wuebben math.cornell.edu
 
8
#   
 
9
#   This program is free software; you can redistribute it and/or modify
 
10
#   it under the terms of the GNU General Public License as published by
 
11
#   the Free Software Foundation; either version 2, or (at your option)
 
12
#   any later version.
 
13
#
 
14
#   This program is distributed in the hope that it will be useful,
 
15
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
#   GNU General Public License for more details.
 
18
#
 
19
#   You should have received a copy of the GNU General Public License
 
20
#   along with this program; if not, write to the Free Software
 
21
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
22
#
 
23
 
 
24
# the following is borrowed from configure 
 
25
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
 
26
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
 
27
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
 
28
    ac_n= ac_c='
 
29
' ac_t='        '
 
30
  else
 
31
    ac_n=-n ac_c= ac_t=
 
32
  fi
 
33
else
 
34
  ac_n= ac_c='\c' ac_t=
 
35
fi
 
36
 
 
37
config_file="config.h"
 
38
ORG_CONFIG="config.h.std"
 
39
 
 
40
display_main_menu(){
 
41
 
 
42
clear
 
43
echo 
 
44
echo  "                   KSCD -- Configuration"
 
45
echo    "==================================================================="
 
46
echo
 
47
echo     "               Linux ...................... L"
 
48
echo     "               FreeBSD/NetBSD ............. F"
 
49
echo     "               BSD386 ..................... B"
 
50
echo     "               Sun ........................ S"
 
51
echo     "               HPUX ....................... H"
 
52
echo     "               Irix ....................... I"
 
53
echo     "               Sony NEWS .................. N"
 
54
echo     "               OSF/1 ...................... O"
 
55
echo     "               Ultrix ..................... U"
 
56
echo     "               Generic SVR4 (not Sun) ..... V"
 
57
echo 
 
58
echo     "               Quit ....................... Q"
 
59
echo 
 
60
echo
 
61
echo   "            Bernd Johannes Wuebben <wuebben@kde.org>"
 
62
echo    "=================================================================="
 
63
echo  
 
64
echo  $ac_n  "            Please chose acccording to your platform:$ac_c"
 
65
 
 
66
read platform
 
67
 
 
68
}
 
69
 
 
70
give_instructions(){
 
71
 
 
72
echo "Please answer all questions. Simply hit [Enter] to select the default"
 
73
echo "values which are displayed in square brackets."
 
74
echo
 
75
 
 
76
}
 
77
 
 
78
write_config_header(){
 
79
 
 
80
echo "" >> $config_file
 
81
echo "/* This header file was automatically generated by the kscd" >> $config_file
 
82
echo "   installation script. In case of trouble please edit" >> $config_file
 
83
echo "   $ORG_CONFIG in the source directory of the kscd distribution" >> $config_file
 
84
echo "   and rename it to $config_file .*/" >> $config_file
 
85
echo "" >> $config_file
 
86
 
 
87
}
 
88
 
 
89
linux_conf(){
 
90
 
 
91
clear
 
92
echo "KSCD configuration for Linux systems"
 
93
echo "------------------------------------"
 
94
echo
 
95
 
 
96
give_instructions
 
97
write_config_header
 
98
 
 
99
echo "#ifdef linux " >> $config_file
 
100
echo "" >> $config_file
 
101
 
 
102
echo $ac_n "Please specify your cdrom device [/dev/cdrom]:$ac_c"
 
103
 
 
104
read device
 
105
if [ "$device" = "" ]
 
106
then
 
107
    device="/dev/cdrom"
 
108
fi
 
109
 
 
110
echo "Your choice was: $device"
 
111
echo "#define DEFAULT_CD_DEVICE   \"$device\"  " >> $config_file
 
112
 
 
113
 
 
114
 
 
115
echo 
 
116
echo "I have made modifications to the workman engine which cause kscd to be"
 
117
echo "a very fast and responsive cd player for an average IDE CDROM drive."
 
118
echo "Answer NO to the next question unless you have problems getting kscd"
 
119
echo "to work."
 
120
echo
 
121
echo $ac_n "Revert to original Workman behavior? (y/n) [n]:$ac_c"
 
122
 
 
123
read workman
 
124
 
 
125
case "$workman" in
 
126
    "yes" | "y" | "Yes" | "Y") echo "#define WORKMAN_ORIGINAL " >> $config_file ;;
 
127
esac
 
128
 
 
129
 
 
130
echo
 
131
echo "I have incorporated modifications from Dirk (milliByte@DeathsDoor.com)"
 
132
echo "which will make kscd perform better on any drive using the sbpcd or"
 
133
echo "mcdx drivers. If and only if your kernel uses one of these cd drivers you"
 
134
echo "should try answering YES to the next question. Please peruse the "
 
135
echo "documents in the spbcd directory of this distribution for more "
 
136
echo "information about theses modifications."
 
137
echo
 
138
echo $ac_n "Enable SBPCD_HACK? (y/n) [n]:$ac_c"
 
139
 
 
140
read sbpcd
 
141
 
 
142
case "$sbpcd" in
 
143
    "yes" | "y" | "Yes" | "Y") echo "#define SBPCD_HACK " >> $config_file ;;
 
144
esac
 
145
 
 
146
 
 
147
echo
 
148
echo "If and only if you have an SCSI cdrom drive you should probably"
 
149
echo "answer YES to the next question"
 
150
echo
 
151
echo $ac_n "Enable LINUX_SCSI_PASSTHROUGH? (y/n) [n]:$ac_c"
 
152
 
 
153
read scsi
 
154
 
 
155
case "$scsi" in
 
156
    "yes" | "y" | "Yes" | "Y") echo "#define LINUX_SCSI_PASSTHROUGH " >> $config_file ;;
 
157
esac
 
158
 
 
159
echo
 
160
echo "Most cdrom devices have a volume range from 0 to 255."
 
161
echo "Feel free to play with the parameters MINVOLUME and MAXVOLUME"
 
162
echo "until volume adjustment works to your satisfaction."
 
163
echo "Note: Some CDROM device only support a range from 128 to 255."
 
164
echo
 
165
echo $ac_n "MIN_VOLUME [0]:$ac_c"
 
166
 
 
167
read MINVOLUME
 
168
if [ "$MINVOLUME" = "" ]
 
169
then
 
170
    MINVOLUME="0"
 
171
fi
 
172
 
 
173
echo "You entered $MINVOLUME "
 
174
echo "#define MIN_VOLUME $MINVOLUME " >> $config_file 
 
175
 
 
176
echo
 
177
echo $ac_n "MAX_VOLUME [255]:$ac_c"
 
178
 
 
179
read MAXVOLUME
 
180
if [ "$MAXVOLUME" = "" ]
 
181
then
 
182
    MAXVOLUME="255"
 
183
fi
 
184
 
 
185
echo "You entered $MAXVOLUME "
 
186
echo "#define MAX_VOLUME $MAXVOLUME " >> $config_file 
 
187
 
 
188
echo
 
189
echo "If you own one a cdrom player whose volume range is 128 to 255,"
 
190
echo "you might want to try answering YES to the next question."
 
191
echo "Enabling 'Curved Volume' will give you a square root like"
 
192
echo "volume slider - volume curve."
 
193
echo
 
194
echo $ac_n "Enable CURVED_VOLUME? (y/n) [n]:$ac_c"
 
195
 
 
196
read curved
 
197
 
 
198
case "$curved" in
 
199
    "yes" | "y" | "Yes" | "Y") echo "#define CURVED_VOLUME " >> $config_file ;;
 
200
esac
 
201
 
 
202
echo "" >> $config_file
 
203
echo "#endif /* linux */" >> $config_file
 
204
 
 
205
}
 
206
 
 
207
irix_conf(){
 
208
 
 
209
clear
 
210
echo "KSCD configuration for Irix"
 
211
echo "---------------------------"
 
212
echo
 
213
 
 
214
give_instructions
 
215
write_config_header
 
216
 
 
217
echo "" >> $config_file
 
218
echo "#if defined(sgi)" >> $config_file
 
219
echo "" >> $config_file
 
220
 
 
221
echo $ac_n "Please specify your cdrom device [/dev/scsi/sc0d6l0]:$ac_c"
 
222
 
 
223
read device
 
224
if [ "$device" = "" ]
 
225
then
 
226
    device="/dev/scsi/sc0d6l0"
 
227
fi
 
228
 
 
229
echo "Your choice was: $device"
 
230
echo "#define DEFAULT_CD_DEVICE   \"$device\"  " >> $config_file
 
231
 
 
232
echo $ac_n "Enable CDDA? (y/n) [y]:$ac_c"
 
233
 
 
234
read curved
 
235
 
 
236
case "$curved" in
 
237
    "yes" | "y" | "Yes" | "Y" | "") echo "#define CDDA " >> $config_file ;;
 
238
esac
 
239
echo ""
 
240
echo "That's all for sgi ..."
 
241
 
 
242
echo "#endif /* sgi */" >> $config_file
 
243
 
 
244
}
 
245
 
 
246
hp_conf(){
 
247
 
 
248
clear
 
249
echo "KSCD configuration for HPUX systems"
 
250
echo "-----------------------------------"
 
251
echo
 
252
 
 
253
give_instructions
 
254
write_config_header
 
255
 
 
256
echo "" >> $config_file
 
257
echo "#if defined(hpux) || defined (__hpux)" >> $config_file
 
258
echo "" >> $config_file
 
259
 
 
260
echo $ac_n "Please specify your cdrom device [/dev/rscsi]:$ac_c"
 
261
 
 
262
read device
 
263
if [ "$device" = "" ]
 
264
then
 
265
    device="/dev/rcsci"
 
266
fi
 
267
 
 
268
echo "Your choice was: $device"
 
269
echo "#define DEFAULT_CD_DEVICE   \"$device\"  " >> $config_file
 
270
echo ""
 
271
echo "That's all for HPUX ..."
 
272
 
 
273
echo "#endif /* hpux */" >> $config_file
 
274
 
 
275
 
 
276
}
 
277
 
 
278
bsd386_conf(){
 
279
 
 
280
clear
 
281
echo "KSCD configuration for BSD386 systems"
 
282
echo "-------------------------------------"
 
283
echo
 
284
 
 
285
give_instructions
 
286
write_config_header
 
287
 
 
288
echo "#ifdef __bsdi__ " >> $config_file
 
289
 
 
290
echo 
 
291
echo "Please answer YES to the next question if you have a Sound Blaster cdrom."
 
292
echo
 
293
echo $ac_n "Define SOUNDBALSTER? (y/n) [n]:$ac_c"
 
294
 
 
295
read soundblaster
 
296
 
 
297
case "$soundblaster" in
 
298
    "yes" | "y" | "Yes" | "Y") echo "#define SOUNDBLASTER " >> $config_file ;;
 
299
esac
 
300
 
 
301
echo "#endif /* __bsdi__ */" >> $config_file
 
302
 
 
303
}
 
304
 
 
305
freebsd_netbsd_conf(){
 
306
 
 
307
clear
 
308
echo "KSCD configuration for FreeBSD/NetBSD systems"
 
309
echo "---------------------------------------------"
 
310
echo
 
311
 
 
312
give_instructions
 
313
write_config_header
 
314
 
 
315
echo "" >> $config_file
 
316
echo "#if defined(__FreeBSD__) || defined(__NetBSD__)" >> $config_file
 
317
echo "" >> $config_file
 
318
 
 
319
# get default device
 
320
if [ `/usr/bin/uname -s` = "NetBSD" ]; then
 
321
        if [ `/usr/bin/uname -m` = "i386" ]; then
 
322
                def_device=/dev/rcd0d
 
323
        else
 
324
                def_device=/dev/rcd0c
 
325
        fi
 
326
else
 
327
        # FreeBSD
 
328
        def_device=/dev/rmatcd0c
 
329
fi
 
330
 
 
331
echo $ac_n "Please specify your cdrom device [$def_device]:$ac_c"
 
332
 
 
333
read device
 
334
if [ "$device" = "" ]
 
335
then
 
336
    device="$def_device"
 
337
fi
 
338
 
 
339
echo "Your choice was:$device"
 
340
echo "#define DEFAULT_CD_DEVICE   \"$device\"  " >> $config_file
 
341
 
 
342
echo
 
343
echo "Some experimental changes to the FreeBSD code were made."
 
344
echo "Please let me know whether answering yes or no to the next"
 
345
echo "question will give you a better functioning cd player."
 
346
echo "Users of NetBSD might want to experiment with this too."
 
347
echo
 
348
echo $ac_n "Define NEW_BSD_PLAYCLICKED? (y/n) [y]:$ac_c"
 
349
 
 
350
read free_play_clicked
 
351
 
 
352
case "$free_play_clicked" in
 
353
    "yes" | "y" | "Yes" | "Y"| "") echo "#define NEW_BSD_PLAYCLICKED" >> $config_file ;;
 
354
esac
 
355
 
 
356
echo "" >> $config_file
 
357
echo "#endif /* FreeBSD/NetBSD */" >> $config_file
 
358
 
 
359
}
 
360
 
 
361
sun_conf(){
 
362
 
 
363
clear
 
364
echo "KSCD configuration for Sun systems"
 
365
echo "----------------------------------"
 
366
echo
 
367
 
 
368
give_instructions
 
369
write_config_header
 
370
 
 
371
echo "" >> $config_file
 
372
echo "#if defined(sun) || defined(__sun__)  " >> $config_file
 
373
echo "" >> $config_file
 
374
 
 
375
echo $ac_n "Are you compiling on Solaris 2.x? (y/n) [y]:$ac_c"
 
376
read solaris
 
377
 
 
378
case "$solaris" in
 
379
 
 
380
 n | N) 
 
381
        echo
 
382
        ;;
 
383
 *)
 
384
        echo "#define SYSV" >> $config_file
 
385
        solaris="y"
 
386
        ;;
 
387
esac
 
388
 
 
389
echo ""
 
390
echo "You need to enable the internal audio device if you wish"
 
391
echo "to get sound from your workstation, as opposed to only from"
 
392
echo "the head-phone jack of your CDROM."
 
393
echo ""
 
394
echo $ac_n "Activate internal audio device (CODEC)? (y/n) [y]:$ac_c"
 
395
 
 
396
read codec
 
397
 
 
398
case "$code" in
 
399
 
 
400
 n | N) 
 
401
        ;;
 
402
 *)
 
403
        echo "#define CODEC" >> $config_file
 
404
        ;;
 
405
esac
 
406
 
 
407
if [ "$solaris" = "y" ]
 
408
then
 
409
  echo
 
410
  echo "Do you wish to enable digital audio capablilites on drives that"
 
411
  echo $ac_n "support it? (y/n) [y]:$ac_c"
 
412
  read cdda
 
413
 
 
414
  case "$cdda" in
 
415
 
 
416
    n | N) 
 
417
           ;;
 
418
    *)
 
419
       echo "#define BUILD_CDDA" >> $config_file
 
420
       ;;
 
421
  esac
 
422
fi
 
423
 
 
424
 
 
425
echo
 
426
echo "Most cdrom devices have a volume range from 0 to 255."
 
427
echo "Feel free to play with the parameters MINVOLUME and MAXVOLUME"
 
428
echo "until volume adjustment works to your satisfaction."
 
429
echo "Note: Some CDROM device only support a range from 128 to 255."
 
430
echo
 
431
echo $ac_n "MIN_VOLUME [128]:$ac_c"
 
432
 
 
433
read MINVOLUME
 
434
if [ "$MINVOLUME" = "" ]
 
435
then
 
436
    MINVOLUME="128"
 
437
fi
 
438
 
 
439
echo "You entered $MINVOLUME "
 
440
echo "#define MIN_VOLUME $MINVOLUME " >> $config_file 
 
441
 
 
442
echo
 
443
echo $ac_n "MAX_VOLUME [255]:$ac_c"
 
444
 
 
445
read MAXVOLUME
 
446
if [ "$MAXVOLUME" = "" ]
 
447
then
 
448
    MAXVOLUME="255"
 
449
fi
 
450
 
 
451
echo "You entered $MAXVOLUME "
 
452
echo "#define MAX_VOLUME $MAXVOLUME " >> $config_file 
 
453
 
 
454
echo
 
455
echo "If you own one a cdrom player whose volume range is 128 to 255,"
 
456
echo "you might want to try answering YES to the next question."
 
457
echo "Enabling 'Curved Volume' will give you a square root like"
 
458
echo "volume slider - volume curve."
 
459
echo
 
460
echo $ac_n "Enable CURVED_VOLUME? (y/n) [n]:$ac_c"
 
461
 
 
462
read curved
 
463
 
 
464
case "$curved" in
 
465
    "yes" | "y" | "Yes" | "Y") echo "#define CURVED_VOLUME " >> $config_file ;;
 
466
esac
 
467
 
 
468
echo "#endif /* Sun*/" >> $config_file
 
469
 
 
470
}
 
471
 
 
472
sony_conf(){
 
473
 
 
474
clear
 
475
echo "KSCD configuration for Sony NEWS systems"
 
476
echo "---------------------------------------------"
 
477
echo
 
478
 
 
479
give_instructions
 
480
write_config_header
 
481
 
 
482
echo "" >> $config_file
 
483
echo "#if defined(__sony_news) || defined(sony_news)" >> $config_file
 
484
echo "" >> $config_file
 
485
 
 
486
echo "Unfortunately, I have conflicting reports:"
 
487
echo "You might need a,b or c below."
 
488
echo "Please let me know what is required on Sony NEWS."
 
489
echo
 
490
echo "a) #include <CD.h> "
 
491
echo
 
492
echo "b) #include <newsiodev/scu.h>"
 
493
echo "   #include <newsiodev/scsireg.h>"
 
494
echo 
 
495
echo "c)  both of the above"
 
496
echo ""
 
497
echo $ac_n "Please choose a,b or c. [c]:$ac_c"
 
498
 
 
499
read sony_include
 
500
 
 
501
case "$sony_include" in 
 
502
  "a" | "A" )
 
503
  echo "Your choice was a"
 
504
  echo "#include <CD.h>" >> $config_file 
 
505
  ;;
 
506
  "b" | "B" )
 
507
  echo "Your choice was b"
 
508
  echo "#include <newsiodev/scu.h>" >> $config_file 
 
509
  echo "#include <newsiodev/scsireg.h>" >> $config_file 
 
510
  ;;
 
511
  * )
 
512
  echo "Your choice was c"
 
513
  echo "#include <CD.h>" >> $config_file 
 
514
  echo "#include <newsiodev/scu.h>" >> $config_file 
 
515
  echo "#include <newsiodev/scsireg.h>" >> $config_file 
 
516
  ;;
 
517
esac
 
518
 
 
519
echo 
 
520
echo $ac_n "Please specify your cdrom device [/dev/rsd/b0i6u0p2\0]:$ac_c"
 
521
 
 
522
read device
 
523
if [ "$device" = "" ]
 
524
then
 
525
    device="/dev/rsd/b0i6u0p2\0"
 
526
fi
 
527
 
 
528
echo "Your choice was:$device"
 
529
echo "#define DEFAULT_CD_DEVICE   \"$device\"  " >> $config_file
 
530
 
 
531
echo
 
532
echo "While most CDROM devices have a volume range from 0 to 255,"
 
533
echo "it appears that 128 to 255 is more appropriate for Sony NEWS."
 
534
echo "Feel free to play with the parameters MINVOLUME and MAXVOLUME"
 
535
echo "until volume adjustment works to your satisfaction."
 
536
echo "Don't forget to let me know the result of your experiments."
 
537
echo
 
538
echo $ac_n "MIN_VOLUME [128]:$ac_c"
 
539
 
 
540
read MINVOLUME
 
541
if [ "$MINVOLUME" = "" ]
 
542
then
 
543
    MINVOLUME="128"
 
544
fi
 
545
 
 
546
echo "You entered $MINVOLUME "
 
547
echo "#define MIN_VOLUME $MINVOLUME " >> $config_file 
 
548
 
 
549
echo
 
550
echo $ac_n "MAX_VOLUME [255]:$ac_c"
 
551
 
 
552
read MAXVOLUME
 
553
if [ "$MAXVOLUME" = "" ]
 
554
then
 
555
    MAXVOLUME="255"
 
556
fi
 
557
 
 
558
echo "You entered $MAXVOLUME "
 
559
echo "#define MAX_VOLUME $MAXVOLUME " >> $config_file 
 
560
 
 
561
echo "" >> $config_file
 
562
echo "#endif /* sony_news */" >> $config_file
 
563
 
 
564
}
 
565
 
 
566
ultrix_conf(){
 
567
 
 
568
clear
 
569
echo "KSCD configuration for Ultrix systems"
 
570
echo "---------------------------------------------"
 
571
echo
 
572
 
 
573
give_instructions
 
574
write_config_header
 
575
 
 
576
echo "" >> $config_file
 
577
echo "#if defined(ultrix) || defined(__ultrix)" >> $config_file
 
578
echo "" >> $config_file
 
579
 
 
580
echo "Unfortunately, I have conflicting reports:"
 
581
echo "You might need a,b or c below."
 
582
echo "Please let me know what is required on Ultrix."
 
583
echo
 
584
echo "a) #include <sys/rzdisk.h>"
 
585
echo "   #include <sys/cdrom.h>"
 
586
echo
 
587
echo "b) #include <sys/devio.h>"
 
588
echo "   #include <io/cam/cam.h>"
 
589
echo "   #include <io/cam/uagt.h>"
 
590
echo "   #include <io/cam/dec_cam.h>"
 
591
echo "   #include <io/cam/scsi_all.h>"
 
592
echo ""
 
593
echo "c)  both of the above"
 
594
echo ""
 
595
echo $ac_n "Please choose a,b or c. [a]:$ac_c"
 
596
 
 
597
read ultrix_include
 
598
 
 
599
case "$ultrix_include" in 
 
600
  "c" | "C" )
 
601
  echo "Your choice was c)"
 
602
  echo ""
 
603
  echo "#include <sys/rzdisk.h>" >> $config_file 
 
604
  echo "#include <sys/cdrom.h>">> $config_file 
 
605
  echo ""
 
606
  echo "#include <sys/devio.h>" >> $config_file 
 
607
  echo "#include <io/cam/cam.h>" >> $config_file 
 
608
  echo "#include <io/cam/uagt.h>" >> $config_file 
 
609
  echo "#include <io/cam/dec_cam.h>" >> $config_file 
 
610
  echo "#include <io/cam/scsi_all.h>" >> $config_file 
 
611
  echo "" >> $config_file 
 
612
  ;;
 
613
 
 
614
  "b" | "B" )
 
615
  echo "Your choice was b"
 
616
  echo "#include <sys/devio.h>" >> $config_file 
 
617
  echo "#include <io/cam/cam.h>" >> $config_file 
 
618
  echo "#include <io/cam/uagt.h>" >> $config_file 
 
619
  echo "#include <io/cam/dec_cam.h>" >> $config_file 
 
620
  echo "#include <io/cam/scsi_all.h>" >> $config_file 
 
621
  ;;
 
622
  * )
 
623
  echo "Your choice was a"
 
624
  echo "#include <sys/rzdisk.h>" >> $config_file 
 
625
  echo "#include <sys/cdrom.h>">> $config_file 
 
626
  ;;
 
627
esac
 
628
 
 
629
echo
 
630
echo "While most CDROM devices have a volume range from 0 to 255,"
 
631
echo "it appears that 128 to 255 is more appropriate for Ultrix"
 
632
echo "Feel free to play with the parameters MINVOLUME and MAXVOLUME"
 
633
echo "until volume adjustment works to your satisfaction."
 
634
echo "Don't forget to let me know the result of your experiments."
 
635
echo
 
636
echo $ac_n "MIN_VOLUME [128]:$ac_c"
 
637
 
 
638
read MINVOLUME
 
639
if [ "$MINVOLUME" = "" ]
 
640
then
 
641
    MINVOLUME="128"
 
642
fi
 
643
 
 
644
echo "You entered $MINVOLUME "
 
645
echo "#define MIN_VOLUME $MINVOLUME " >> $config_file 
 
646
 
 
647
echo
 
648
echo $ac_n "MAX_VOLUME [255]:$ac_c"
 
649
 
 
650
read MAXVOLUME
 
651
if [ "$MAXVOLUME" = "" ]
 
652
then
 
653
    MAXVOLUME="255"
 
654
fi
 
655
 
 
656
echo "You entered $MAXVOLUME "
 
657
echo "#define MAX_VOLUME $MAXVOLUME " >> $config_file 
 
658
 
 
659
echo "" >> $config_file
 
660
echo "#endif /* ultrix */" >> $config_file
 
661
 
 
662
}
 
663
 
 
664
osf_conf(){
 
665
 
 
666
clear
 
667
echo "KSCD configuration for OSF systems"
 
668
echo "----------------------------------"
 
669
echo
 
670
 
 
671
give_instructions
 
672
write_config_header
 
673
 
 
674
echo "" >> config_file
 
675
echo "#if defined(__osf__)" >> $config_file
 
676
 
 
677
echo "Nothing to be done for OSF. The CD device should be automatically detected."
 
678
echo "If you have trouble look at plat_osf1.c and let me know what needs to be"
 
679
echo "changed."
 
680
 
 
681
echo ""
 
682
echo $ac_n "Press [Enter] to continue.$ac_c"
 
683
read dummy
 
684
 
 
685
echo "" >> $config_file
 
686
echo "#endif /* osf */" >> $config_file
 
687
echo "" >> $config_file
 
688
 
 
689
#endif    
 
690
 
 
691
 
 
692
}
 
693
 
 
694
generic_svr_conf(){
 
695
 
 
696
clear
 
697
echo "KSCD configuration for a generic SVR4 system"
 
698
echo "--------------------------------------------"
 
699
echo
 
700
 
 
701
give_instructions
 
702
write_config_header
 
703
 
 
704
echo "" >> $config_file
 
705
echo "#if defined(SVR4) && !defined(sun) && !defined(__sun__)" >> $config_file
 
706
 
 
707
echo $ac_n "Please specify your cdrom device [/dev/rcdrom/cd0]:$ac_c"
 
708
 
 
709
read device
 
710
if [ "$device" = "" ]
 
711
then
 
712
    device="/dev/rcdrom/cd0"
 
713
fi
 
714
 
 
715
echo "Your choice was:$device"
 
716
echo "#define DEFAULT_CD_DEVICE   \"$device\"  " >> $config_file
 
717
 
 
718
echo "" >> $config_file
 
719
echo "#endif /* SVR4 */" >> $config_file
 
720
echo "" >> $config_file
 
721
 
 
722
}
 
723
 
 
724
########################################################################
 
725
#
 
726
#        main
 
727
#
 
728
########################################################################
 
729
 
 
730
if [ -f $config_file ]
 
731
then
 
732
     echo "Found old config file. Will clean up first ...."
 
733
     rm $config_file
 
734
     sleep 1
 
735
fi
 
736
 
 
737
display_main_menu
 
738
 
 
739
if [ "$platform" = "q" ]
 
740
then
 
741
    clear
 
742
    echo "Good bye!"
 
743
    exit 1
 
744
fi
 
745
 
 
746
case "$platform" in 
 
747
l|L) linux_conf;;
 
748
f|F) freebsd_netbsd_conf;;
 
749
b|B) bsd386_conf;;
 
750
s|S) sun_conf;;
 
751
h|H) hp_conf;;
 
752
i|I) irix_conf;;
 
753
n|N) sony_conf;;
 
754
o|O) osf_conf;;
 
755
u|U) ultrix_conf;;
 
756
v|V) generic_svr_conf;;
 
757
*)   linux_conf;;
 
758
esac
 
759
 
 
760
sleep 1
 
761
clear
 
762
echo ""
 
763
echo "I have written your configuration choices to $config_file."
 
764
echo "Should you have trouble with the configuration file this"
 
765
echo "script generates, you can rename $ORG_CONFIG to $config_file"
 
766
echo "and edit it manually to suit your configuration."
 
767
echo ""
 
768
echo "Have fun with kscd!"
 
769
echo ""
 
770
echo "Bernd Johannes Wuebben"
 
771
echo "wuebben@kde.org"
 
772
echo "wuebben@math.cornell.edu"
 
773
echo ""
 
774
echo "Press [Enter] to start the compilation."
 
775
read  key
 
776
exit
 
777
 
 
778
 
 
779
 
 
780
 
 
781
 
 
782