summaryrefslogtreecommitdiffstats
path: root/display/directfb/CONFIGURE
blob: 383d476865a98079d0d1e046eed26f5b052bec6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
add_status()  {
  while  [  -n  "$1"  ];  do
    echo  "$1"
    echo  "$2"
    echo  "off"
    shift 2
  done
}


make_gfxdrivers_checklist()  {
  add_status  `cat  $SCRIPT_DIRECTORY/gfxdrivers`
}

make_inputdrivers_checklist()  {
  add_status  `cat  $SCRIPT_DIRECTORY/inputdrivers`
}


get_gfx()  {
  BACKTITLE="DirectFB GFXDRIVER Configuration"
      TITLE="Chipset Manufacturer selection"
       HELP="Choose the chipset your card uses, don't bother with any others if you don't have the 
hardware. If none are selected then all will be installed."

  dialog  --backtitle  "$BACKTITLE"  \
          --title      "$TITLE"      \
          --stdout                   \
          --separate-output          \
          --checklist  "$HELP"       \
          0 0 0                      \
         `make_gfxdrivers_checklist`

}

get_input()  {
  BACKTITLE="DirectFB INPUTDRIVER Configuration"
      TITLE="Input device selection"
       HELP="Choose the input devices your box uses, don't bother with any others. If none are selected then all will be installed."
  dialog  --backtitle  "$BACKTITLE"  \
          --title      "$TITLE"      \
          --stdout                   \
          --separate-output          \
          --checklist  "$HELP"       \
          0 0 0                      \
         `make_inputdrivers_checklist`

}

if ! grep -q "gfxdrivers" $SPELL_CONFIG ;then 
  if query "select gfxdrivers to compile?" n 
  then 
  gfxdrivers=all
  OLD_IFS=$IFS
  export  IFS="	
"
  gfxdrivers=`get_gfx | tr '\n' ','`
  echo "gfxdrivers=$gfxdrivers" >> $SPELL_CONFIG
  export  IFS=$OLD_IFS
  else echo gfxdrivers=all  >> $SPELL_CONFIG
  fi
fi &&

if ! grep -q "inputdrivers" $SPELL_CONFIG ;then 
  if query "select inputdrivers to compile?" n 
  then 
  inputdrivers=all
  OLD_IFS=$IFS
  export  IFS="	
"
  inputdrivers=`get_input | tr '\n' ','`
  echo "inputdrivers=$inputdrivers" >> $SPELL_CONFIG
  export  IFS=$OLD_IFS
  else echo inputdrivers=all  >> $SPELL_CONFIG
  fi
fi &&

config_query_option DFB_DEBUG 'Compile in debug support? (This will slow DFB down a lot)' \
                              'n' \
                              '--enable-debug --enable-debug-support' \
                              '--disable-debug --disable-debug-support' &&

config_query_option DFB_NETWORK 'Compile in networking support?' 'y' \
                                '--enable-network' \
                                '--disable-network' &&

config_query_option DFB_VOODOO 'Compile in Voodoo support? (networking)' \
                                'n'                 \
                                '--enable-voodoo'   \
                                '--disable-voodoo'  &&

config_query_option DFB_UNIQUE 'Compile in Unique? (Window management module)' \
                                'n'                \
                                '--enable-unique'  \
                                '--disable-unique' &&

config_query_option DFB_V4L 'Enable the v4l video provider?' \
                                'y'                     \
                                '--enable-video4linux'  \
                                '--disable-video4linux' &&

config_query_option DFB_V4L2 'Enable the v4l2 support?'  \
                                'n'                      \
                                '--enable-video4linux2'  \
                                '--disable-video4linux2' &&

config_query_option DFB_TESTS 'Build test programs?'    \
                                'n'                     \
                                '--with-tests'          \
                                '--with-tests'