3 # Configure script for wine
10 # Ask question 'str' and sets 'var' reply (defaulting to 'def' on CR)
19 echo -n "$str [$def]? "
20 input
=`head -1` # When using read, user must double all backslashes
27 echo -n 'Build Wine as emulator or library (E/L) [E]? '
29 if [ "$input" = 'l' -o "$input" = 'L' ]
31 WINELIB
='#define WINELIB -DWINELIB'
32 ALLDEFINES
="$ALLDEFINES -DWINELIB"
36 # Commented out until the processor emulator starts to work.
39 # echo -n 'Use processor emulator (*DOES*NOT*WORK*YET*) (Y/N) [N]? '
41 # if [ "$input" = 'y' -o "$input" = 'Y' ]
43 # PROCEMU='#define PROCEMU'
44 # ALLDEFINES="$ALLDEFINES -DPROCEMU"
46 # echo -n 'bochs directory [/usr/src/bochs]? '
48 # if [ "$input" = '' ]
50 # ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR=/usr/src/bochs"
52 # ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR="$input
59 echo -n 'Short filenames (Y/N) [N]? '
61 if [ "$input" = 'y' -o "$input" = 'Y' ]
63 SHORTNAMES
='#define ShortNames -DSHORTNAMES'
64 ALLDEFINES
="$ALLDEFINES -DSHORTNAMES"
70 echo -n 'Use the XPM library (Y/N) [N]? '
72 if [ "$input" = 'y' -o "$input" = 'Y' ]
75 ALLDEFINES
="$ALLDEFINES -DUSE_XPM"
80 prompt
"Global configfile name" WINE_CONFIGFILE
/usr
/local
/etc
/wine.conf
82 WINE_INI_GLOBAL
='#define WINE_INI_GLOBAL "'$WINE_CONFIGFILE'"'
84 if [ -r $WINE_CONFIGFILE ]
92 echo -n "Do you want to make a config file now (Y/N) [$DEFAULT_ANS]? "
98 if [ "$input" = 'y' -o "$input" = 'Y' ]
100 if [ -r $WINE_CONFIGFILE ]
102 echo "Backing up the old file to ${WINE_CONFIGFILE}.old."
103 if cp $WINE_CONFIGFILE ${WINE_CONFIGFILE}.old
106 echo "Error while creating backup file. Fix it and run Configure again"
111 case `awk 'BEGIN {s=0} {if ($3=="msdos") s++} END {print s}' /etc/fstab` in
113 1) CF_C
=`awk '{if ($3=="msdos") print $2}' /etc/fstab`;;
114 *) CF_C
=`awk '{if ($3=="msdos") {print $2;exit}}' /etc/fstab`;;
117 prompt
"Which directory do you want to use as A:" CF_A
/a
118 prompt
"Which directory do you want to use as C:" CF_C
$CF_C
119 prompt
"Where is the Windows directory" CF_Windows
'c:\windows'
120 prompt
"Where is the System directory" CF_System
'c:\windows\system'
121 prompt
"Where should Windows apps store temp files" CF_Temp
'c:\temp'
122 prompt
"Which path should be used to find executables and DLL's" CF_Path
'c:\windows;c:\windows\system'
123 prompt
"Where is sysres.dll" CF_SystemResources
`pwd`/sysres.dll
124 prompt
"Where is COM1" CF_Com1
'/dev/cua0'
125 prompt
"Where is COM2" CF_Com2
'/dev/cua1'
126 prompt
"Where is LPT1" CF_Lpt1
'/dev/lp0'
127 prompt
"Log messages to which file (CON = stdout)" CF_File
'CON'
130 sed -n -e 's/^ *\"\(WM_[A-Z0-9]*\)\".*/\1/p' < misc
/spy.c | \
131 sort |
pr -ta4w83 |
sed '1 i\
132 Here is the list of messages:\
136 prompt
"Exclude which messages from the log" CF_Exclude
'WM_SIZE;WM_TIMER'
139 echo "The config file $WINE_CONFIGFILE now looks like this:"
140 tee $WINE_CONFIGFILE << EOF
150 SystemResources=$CF_SystemResources
165 echo -n "Do you want to edit it using $EDITOR (Y/N) [N]? "
167 if [ "$input" = 'y' -o "$input" = 'Y' ]
169 $EDITOR $WINE_CONFIGFILE
172 if [ ! -r $WINE_CONFIGFILE ]
174 echo 'Ok, remember to make it yourself later.'
179 if [ "`(domainname)`" = 'amscons.com' ]
182 echo -n 'New build program (Y/N) [N]? '
184 if [ "$input" = 'y' -o "$input" = 'Y' ]
186 NEWBUILD
='#define NewBuild -DNEWBUILD'
187 ALLDEFINES
="$ALLDEFINES -DNEWBUILD"
192 if grep -s seg_not_present
/usr
/include
/linux
/ldt.h
2> /dev
/null
194 ALLDEFINES
="$ALLDEFINES -DNEW_LDT_STRUCT"
197 cat > autoconf.h
<< EOF
198 /* autoconf.h generated automatically. Run Configure. */
206 #define AutoDefines $ALLDEFINES
211 if [ 0 -lt `find . -name "*.rej" -print | wc -l` ]
215 WARNING: You have some files named "*.rej". Rejected patch files?
216 Maybe you tried to upgrade Wine by diff-files, and that patch failed.
217 If something doesn't work, this might be the reason. See "man patch".
219 List of "*.rej" files:
222 find .
-name "*.rej" -print