Release 940714
[wine] / Configure
1 #! /bin/sh
2
3 ALLDEFINES=''
4
5 echo
6 echo -n 'Build Wine as emulator or library (E/L) [E]? '
7 read input
8 if [ "$input" = 'l' -o "$input" = 'L' ]
9 then
10     WINELIB='#define WINELIB -DWINELIB'
11     ALLDEFINES="$ALLDEFINES -DWINELIB"
12 else
13     WINELIB=''
14 fi
15
16 echo -n 'Short filenames (Y/N) [N]? '
17 read input
18 if [ "$input" = 'y' -o "$input" = 'Y' ]
19 then
20     SHORTNAMES='#define ShortNames -DSHORTNAMES'
21     ALLDEFINES="$ALLDEFINES -DSHORTNAMES"
22 else
23     SHORTNAMES=''
24 fi
25
26 echo -n 'Global configfile name [/usr/local/etc/wine.conf]? '
27 read input
28 if [ "$input" = '' ]
29 then
30     WINE_INI_GLOBAL='#define WINE_INI_GLOBAL "/usr/local/etc/wine.conf"'
31 else
32     WINE_INI_GLOBAL='#define WINE_INI_GLOBAL "'$input'"'
33 fi
34
35 if [ "`(domainname)`" = 'amscons.com' ]
36 then
37     echo -n 'New build program (Y/N) [N]? '
38     read input
39     if [ "$input" = 'y' -o "$input" = 'Y' ]
40     then
41         NEWBUILD='#define NewBuild -DNEWBUILD'
42         ALLDEFINES="$ALLDEFINES -DNEWBUILD"
43     else
44         NEWBUILD=''
45     fi
46 else
47     NEWBUILD=''
48 fi
49
50 if [ -f /usr/include/linux/ldt.h ]
51 then
52         if grep -q seg_not_present /usr/include/linux/ldt.h
53         then
54                 NEWLINUXLDT='#define NewLinuxLdt -DNEW_LDT_STRUCT'
55                 ALLDEFINES="$ALLDEFINES -DNEW_LDT_STRUCT"
56         else
57                 NEWLINUXLDT=''
58         fi
59 else
60         NEWLINUXLDT=''
61 fi
62
63 echo '/* autoconf.h generated automatically.  Run Configure. */' > autoconf.h
64 echo $WINELIB >> autoconf.h
65 echo $SHORTNAMES >> autoconf.h
66 echo $NEWBUILD >> autoconf.h
67 echo $WINE_INI_GLOBAL >> autoconf.h
68 echo $NEWLINUXLDT >> autoconf.h
69 echo "#define AutoDefines  $ALLDEFINES" >> autoconf.h
70
71 xmkmf -a