72 lines
1.5 KiB
Bash
72 lines
1.5 KiB
Bash
#! /bin/sh
|
|
|
|
ALLDEFINES=''
|
|
|
|
echo
|
|
echo -n 'Build Wine as emulator or library (E/L) [E]? '
|
|
read input
|
|
if [ "$input" = 'l' -o "$input" = 'L' ]
|
|
then
|
|
WINELIB='#define WINELIB -DWINELIB'
|
|
ALLDEFINES="$ALLDEFINES -DWINELIB"
|
|
else
|
|
WINELIB=''
|
|
fi
|
|
|
|
echo -n 'Short filenames (Y/N) [N]? '
|
|
read input
|
|
if [ "$input" = 'y' -o "$input" = 'Y' ]
|
|
then
|
|
SHORTNAMES='#define ShortNames -DSHORTNAMES'
|
|
ALLDEFINES="$ALLDEFINES -DSHORTNAMES"
|
|
else
|
|
SHORTNAMES=''
|
|
fi
|
|
|
|
echo -n 'Global configfile name [/usr/local/etc/wine.conf]? '
|
|
read input
|
|
if [ "$input" = '' ]
|
|
then
|
|
WINE_INI_GLOBAL='#define WINE_INI_GLOBAL "/usr/local/etc/wine.conf"'
|
|
else
|
|
WINE_INI_GLOBAL='#define WINE_INI_GLOBAL "'$input'"'
|
|
fi
|
|
|
|
if [ "`(domainname)`" = 'amscons.com' ]
|
|
then
|
|
echo -n 'New build program (Y/N) [N]? '
|
|
read input
|
|
if [ "$input" = 'y' -o "$input" = 'Y' ]
|
|
then
|
|
NEWBUILD='#define NewBuild -DNEWBUILD'
|
|
ALLDEFINES="$ALLDEFINES -DNEWBUILD"
|
|
else
|
|
NEWBUILD=''
|
|
fi
|
|
else
|
|
NEWBUILD=''
|
|
fi
|
|
|
|
if [ -f /usr/include/linux/ldt.h ]
|
|
then
|
|
if grep -q seg_not_present /usr/include/linux/ldt.h
|
|
then
|
|
NEWLINUXLDT='#define NewLinuxLdt -DNEW_LDT_STRUCT'
|
|
ALLDEFINES="$ALLDEFINES -DNEW_LDT_STRUCT"
|
|
else
|
|
NEWLINUXLDT=''
|
|
fi
|
|
else
|
|
NEWLINUXLDT=''
|
|
fi
|
|
|
|
echo '/* autoconf.h generated automatically. Run Configure. */' > autoconf.h
|
|
echo $WINELIB >> autoconf.h
|
|
echo $SHORTNAMES >> autoconf.h
|
|
echo $NEWBUILD >> autoconf.h
|
|
echo $WINE_INI_GLOBAL >> autoconf.h
|
|
echo $NEWLINUXLDT >> autoconf.h
|
|
echo "#define AutoDefines $ALLDEFINES" >> autoconf.h
|
|
|
|
xmkmf -a
|