1995-01-05 03:51:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
1995-02-17 01:23:44 +00:00
|
|
|
yesno () {
|
|
|
|
answ=X;
|
|
|
|
while [ $answ = X ]; do
|
|
|
|
echo -n "$1"
|
|
|
|
read answ
|
|
|
|
if [ X$answ = X ]; then answ="YES"; fi
|
|
|
|
case $answ in
|
|
|
|
y|yes|Y|YES) answ=YES;;
|
|
|
|
n|no|N|NO) answ=NO;;
|
|
|
|
*) echo invalid answer
|
|
|
|
answ=X
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
1995-09-16 01:41:15 +00:00
|
|
|
F=$WRKDIR/.config
|
|
|
|
configure () {
|
|
|
|
rm -f $F
|
1996-11-06 13:38:22 +00:00
|
|
|
|
1996-11-10 03:05:39 +00:00
|
|
|
# Tk detection
|
|
|
|
tkversion=
|
1996-11-10 20:55:14 +00:00
|
|
|
for v in 1 2 3 4; do
|
|
|
|
if [ -f /usr/local/lib/libtk4$v.a ]; then
|
1996-11-10 03:05:39 +00:00
|
|
|
tkversion=$v
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ X$tkversion != X ]; then
|
|
|
|
echo "Using tk-4.$tkversion"
|
|
|
|
echo "#define HasTk YES" >>$F
|
|
|
|
echo "#define TkLibDir /usr/local/lib" >>$F
|
|
|
|
echo "#define TkIncDir /usr/local/include" >>$F
|
1996-11-10 20:55:14 +00:00
|
|
|
echo "#define TkLibName tk4$tkversion" >>$F
|
1996-11-10 03:05:39 +00:00
|
|
|
echo "#define HasTcl YES" >>$F
|
|
|
|
echo "#define TclLibDir /usr/lib" >>$F
|
|
|
|
echo "#define TclIncDir /usr/include" >>$F
|
|
|
|
echo "#define TclLibName tcl75" >>$F
|
|
|
|
fi
|
1995-02-17 01:23:44 +00:00
|
|
|
cat <<END
|
|
|
|
Which servers do you wish to build, you can save a lot of disk space
|
|
|
|
by only compiling the server you will be using. It will also save you
|
|
|
|
considerable compile time.
|
|
|
|
END
|
1996-11-06 13:38:22 +00:00
|
|
|
servers="SVGA VGA16 VGA16Dual Mono MonoDual S3 S3V I8514 Mach8 Mach32 Mach64 P9000 AGX W32 I128"
|
1995-02-17 01:23:44 +00:00
|
|
|
for i in $servers; do
|
|
|
|
yesno "Do you want to build the $i server? [YES] "
|
|
|
|
echo "#undef XF86${i}Server" >>$F
|
|
|
|
echo "#define XF86${i}Server $answ" >>$F
|
|
|
|
done
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo -n "default server to install. [none] "
|
|
|
|
read answ
|
|
|
|
if [ X$answ = X ]; then answ=none; fi
|
|
|
|
if [ $answ != none ]; then
|
1995-02-20 22:14:46 +00:00
|
|
|
echo "#define ServerToInstall XF86_$answ" >>$F
|
1995-02-17 01:23:44 +00:00
|
|
|
fi
|
|
|
|
|
1996-11-06 13:38:22 +00:00
|
|
|
echo
|
|
|
|
yesno "Do you want to build Xvfb? [YES] "
|
|
|
|
echo "#define XVirtualFramebufferServer $answ" >>$F
|
|
|
|
|
1995-02-17 01:23:44 +00:00
|
|
|
cat >> $F <<END
|
1996-11-06 13:38:22 +00:00
|
|
|
#define XF86SvgaDrivers nv et4000 et3000 pvga1 gvga ati sis tvga8900 \
|
|
|
|
cirrus ncr77c22 mga oak al2101 ali cl64xx \
|
|
|
|
video7 chips ark mx realtek apm generic
|
1995-01-05 03:51:15 +00:00
|
|
|
|
1996-11-06 13:38:22 +00:00
|
|
|
#define XF86Vga16Drivers et4000 et3000 ncr77c22 ati sis tvga8900 oak \
|
|
|
|
cl64xx generic
|
1995-01-05 03:51:15 +00:00
|
|
|
|
1996-11-06 13:38:22 +00:00
|
|
|
#define XF86Vga2Drivers et4000 et3000 pvga1 gvga ati sis tvga8900 \
|
|
|
|
cirrus ncr77c22 oak cl64xx generic
|
|
|
|
|
|
|
|
#define XF86MonoDrivers hgc1280 sigma apollo
|
1995-01-05 03:51:15 +00:00
|
|
|
|
|
|
|
#define XF86W32Drivers et4000w32
|
|
|
|
|
1995-02-17 01:23:44 +00:00
|
|
|
END
|
|
|
|
|
|
|
|
cat <<END
|
|
|
|
|
|
|
|
|
|
|
|
Do you want to install the default system config files, this will overwrite
|
|
|
|
and files that you may be currently using. This would only be required
|
|
|
|
on a first time build.
|
|
|
|
END
|
|
|
|
yesno "Install xdm config? [YES] "
|
1996-11-06 13:38:22 +00:00
|
|
|
if [ $answ = YES ]; then
|
|
|
|
echo "#define InstallXdmConfig $answ" >> $F
|
|
|
|
fi
|
1995-02-17 01:23:44 +00:00
|
|
|
yesno "Install xinit config? [YES] "
|
1996-11-06 13:38:22 +00:00
|
|
|
if [ $answ = YES ]; then
|
|
|
|
echo "#define InstallXinitConfig $answ" >> $F
|
|
|
|
fi
|
|
|
|
yesno "Install xfs config? [YES] "
|
|
|
|
if [ $answ = YES ]; then
|
|
|
|
echo "#define InstallFSConfig $answ" >> $F
|
|
|
|
fi
|
1995-02-17 01:23:44 +00:00
|
|
|
|
|
|
|
yesno "Do you want to include support for the FontServer? [YES] "
|
|
|
|
echo "#undef BuildFontServer" >>$F
|
|
|
|
echo "#define BuildFontServer $answ" >>$F
|
|
|
|
echo "#undef InstallFSConfig" >>$F
|
|
|
|
echo "#define InstallFSConfig $answ" >>$F
|
|
|
|
|
|
|
|
cat <<'END'
|
|
|
|
Do you want to Build Fonts (Usually you only want to build and install
|
|
|
|
fonts once, if this is a first time install you will want to build the
|
|
|
|
fonts)
|
|
|
|
END
|
|
|
|
yesno "Build fonts? [YES] "
|
|
|
|
if [ $answ = NO ]; then
|
|
|
|
echo "#define BuildFonts NO" >> $F
|
|
|
|
fi
|
1996-11-06 13:38:22 +00:00
|
|
|
yesno "Build the servers with Extended input devices? [YES] "
|
|
|
|
if [ $answ = NO ]; then
|
|
|
|
echo "#undef BuildXInputExt" >> $F
|
|
|
|
echo "#define BuildXInputExt NO" >> $F
|
|
|
|
else
|
|
|
|
echo "#define JoystickSupport YES" >> $F
|
|
|
|
fi
|
|
|
|
|
1995-02-17 01:23:44 +00:00
|
|
|
yesno "Build PEX? [YES] "
|
|
|
|
if [ $answ = NO ]; then
|
|
|
|
echo "#define BuildPexExt NO" >> $F
|
|
|
|
fi
|
|
|
|
yesno "Build XIE? [YES] "
|
|
|
|
if [ $answ = NO ]; then
|
|
|
|
echo "#define BuildXIE NO" >> $F
|
|
|
|
fi
|
1995-09-16 01:41:15 +00:00
|
|
|
echo
|
1995-11-07 16:17:03 +00:00
|
|
|
|
1996-11-06 13:38:22 +00:00
|
|
|
echo "Build static libraries in addition to shared libraries? [YES] "
|
|
|
|
if [ $answ = YES ]; then
|
|
|
|
echo "#define ForceNormalLib YES" >> $F
|
|
|
|
fi
|
1995-11-07 16:17:03 +00:00
|
|
|
cat <<'END'
|
|
|
|
|
|
|
|
MIT supplies an authentication mechanism that relies upon DES, this is
|
|
|
|
called XDM-AUTHORIZATION-1.
|
|
|
|
|
|
|
|
Source code for this authentication mechanism may not be exported from
|
|
|
|
the United States, however, there are compatible replacements for this
|
|
|
|
mechanism available elsewhere. Also, while this scheme is not used for
|
|
|
|
general purpose encryption, some countries restrict the use of strong
|
|
|
|
cryptography.
|
|
|
|
|
|
|
|
If you have aquired a copy of "Wraphelp.c" and it currently resides in
|
1996-11-16 10:35:10 +00:00
|
|
|
the same location as the XFree86 source or in the ports "files"
|
1995-11-07 16:17:03 +00:00
|
|
|
subdirectory, it will be copied into the right place in the X11 source
|
|
|
|
distribution and support for this feature will be enabled if you answer
|
|
|
|
YES to the following question.
|
|
|
|
|
|
|
|
If you do not have a copy of this file, even if you answer YES to this
|
|
|
|
question, support will not be enabled. If you wish to change this later,
|
|
|
|
the option controling this is contined the file xc/config/cf/xf86site.def.
|
|
|
|
|
|
|
|
END
|
|
|
|
yesno "Do you want to enable XDM-AUTHORIZATION-1 support? [YES] "
|
1996-11-06 13:38:22 +00:00
|
|
|
cpwh=NO
|
1995-11-07 16:17:03 +00:00
|
|
|
if [ $answ = YES ]; then
|
|
|
|
WH=$WRKDIR/xc/lib/Xdmcp/Wraphelp.c
|
|
|
|
|
|
|
|
if [ -f $WH ] ; then
|
|
|
|
echo "==> $WH found in source distribution."
|
1996-12-03 04:07:49 +00:00
|
|
|
elif [ -f $DISTDIR/xc/Wraphelp.c ] ; then
|
1996-11-10 20:55:14 +00:00
|
|
|
echo "==> Wraphelp.c found in DISTDIR directory, copying to source tree."
|
1996-12-03 04:07:49 +00:00
|
|
|
cpwh=$DISTDIR/xc/Wraphelp.c
|
1995-11-07 16:17:03 +00:00
|
|
|
elif [ -f $FILESDIR/Wraphelp.c ] ; then
|
|
|
|
echo "==> Wraphelp.c found in files directory, copying to source tree."
|
1995-11-23 14:28:52 +00:00
|
|
|
cpwh=$FILESDIR/Wraphelp.c
|
1995-11-07 16:17:03 +00:00
|
|
|
else
|
1996-11-06 13:38:22 +00:00
|
|
|
echo "==> Wraphelp.c not found, DES support NOT enabled."
|
|
|
|
cpwh=NO
|
1995-11-07 16:17:03 +00:00
|
|
|
fi
|
|
|
|
fi
|
1996-11-06 13:38:22 +00:00
|
|
|
if [ $cpwh != NO ]; then
|
|
|
|
echo "#define HasXdmAuth $answ" >> $F
|
1995-11-07 16:17:03 +00:00
|
|
|
fi
|
1996-11-06 13:38:22 +00:00
|
|
|
|
1995-09-18 20:30:21 +00:00
|
|
|
echo
|
1995-09-16 01:41:15 +00:00
|
|
|
echo "End of configuration questions. No more user input required"
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
1996-11-06 13:38:22 +00:00
|
|
|
configure
|
1995-09-16 01:41:15 +00:00
|
|
|
|
1996-03-09 16:22:04 +00:00
|
|
|
if [ X$cpwh != XNO ]; then
|
1995-11-23 14:28:52 +00:00
|
|
|
cp $cpwh $WH
|
|
|
|
fi
|
|
|
|
|
1995-09-16 01:41:15 +00:00
|
|
|
cat $F >> $WRKSRC/config/cf/xf86site.def
|
|
|
|
|
|
|
|
cd $WRKSRC/config/cf/ || exit 1;
|
1995-01-05 03:51:15 +00:00
|
|
|
|
|
|
|
version=`uname -r`
|
|
|
|
set `echo $version|sed -e 's/\./ /g' -e 's/-/ /g'`
|
|
|
|
mv FreeBSD.cf FreeBSD.cf.old
|
1996-11-06 13:38:22 +00:00
|
|
|
sed -e "s/2.1.5/$version/" \
|
|
|
|
-e "s/#define OSMajorVersion.*2/#define OSMajorVersion $1/" \
|
|
|
|
-e "s/#define OSMinorVersion.*1/#define OSMinorVersion $2/" \
|
|
|
|
-e "s/#define OSTeenyVersion.*5/#define OSTeenyVersion $3/" \
|
1995-01-05 03:51:15 +00:00
|
|
|
<FreeBSD.cf.old >FreeBSD.cf
|
1995-09-16 01:41:15 +00:00
|
|
|
|
1995-01-05 03:51:15 +00:00
|
|
|
exit 0
|