Sweden-Number/Configure

86 lines
1.9 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=''
echo -n 'Use processor emulator (*DOES*NOT*WORK*YET*) (Y/N) [N]? '
read input
if [ "$input" = 'y' -o "$input" = 'Y' ]
then
PROCEMU='#define PROCEMU'
echo -n 'bochs directory [/usr/src/bochs]? '
read input
if [ "$input" = '' ]
then
ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR=/usr/src/bochs"
else
ALLDEFINES="$ALLDEFINES -DPROC_EMU_DIR="$input
fi
fi
fi
echo
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
NEWLINUXLDT=''
if [ -f /usr/include/linux/ldt.h ]
then
if grep seg_not_present /usr/include/linux/ldt.h
then
NEWLINUXLDT='#define NEW_LDT_STRUCT'
fi
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 $ENDIAN >> autoconf.h
echo $PROCEMU >> autoconf.h
echo $PROCEMUDIR >> autoconf.h
echo "#define AutoDefines $ALLDEFINES" >> autoconf.h
xmkmf -a