aboutsummaryrefslogtreecommitdiffstats
path: root/devel/imake-4/scripts/configure
blob: 634ecb077ed594deda6f5b89ed9924dc33fb9e42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/sh
# configuration scripts for imake/XFree86

F=$WRKDIR/.config

isyes() {
    if [ X$1 = XYES -o X$1 = XYes -o X$1 = Xyes -o X$1 = XY -o X$1 = Xy ]; then
	ret=YES
    else
        ret=$1
    fi
}

configure () {
rm -f $F

echo "/*" >> $F
echo "/* Followins are generated by FreeBSD imake-4/XFree86-4-* ports system." >> $F
echo " */" >> $F
if [ $OSVERSION -ge 300000 -a X$HasSecureRPC != "X" ]; then
    echo "#ifndef HasSecureRPC"                 >> $F
    echo "#define HasSecureRPC $HasSecureRPC" >> $F
    echo "#endif"                               >> $F
fi
if [ X$HasXdmAuth != "X" ]; then
    if [ -f $WRKDIR/xc/lib/Xdmcp/Wraphelp.c -o -f $DISTDIR/xc/Wraphelp.c ]; then
	echo "#ifndef HasXdmAuth"               >> $F
	echo "#define HasXdmAuth $HasXdmAuth" >> $F
        echo "#endif"                           >> $F
    fi
fi
if [ $OSVERSION -ge 310000 -a X$HasPam != "X" ]; then
    echo "#ifndef HasPam"                       >> $F
    echo "#define HasPam $HasPam"             >> $F
    echo "#endif"                               >> $F
fi
if [ X$BuildPexExt != "X" ]; then
    echo "#ifndef BuildPexExt"                  >> $F
    echo "#define BuildPexExt $BuildPexExt"   >> $F
    echo "#endif"                               >> $F
fi
if [ X$BuildXinerama != "X" ]; then
    echo "#ifndef BuildXinerama"                  >> $F
    echo "#define BuildXinerama $BuildXinerama" >> $F
    echo "#endif"                                 >> $F
fi
if [ X$BuildXIE != "X" ]; then
    echo "#ifndef BuildXIE"                       >> $F
    echo "#define BuildXIE $BuildXIE"           >> $F
    echo "#endif"                                 >> $F
fi
if [ X$BuildAoutLibraries != "X" ]; then
    echo "#ifndef BuildAoutLibraries"             >> $F
    echo "#define BuildAoutLibraries $BuildAoutLibraries" >> $F
    echo "#endif"                                 >> $F
fi
if [ X$ForceNormalLib != "X" ]; then
    echo "#ifndef ForceNormalLib"                   >> $F
    echo "#define ForceNormalLib $ForceNormalLib" >> $F
    echo "#endif"                                   >> $F
fi
isyes $DebuggableLibraries
if [ $ret = YES -a $OSVERSION -ge 400000 ]; then
    echo "#ifndef DebuggableLibraries"      >> $F
    echo "#define DebuggableLibraries $ret" >> $F
    echo "#endif"                           >> $F
fi
if [ X$JoystickSupport != "X" ]; then
    echo "#ifndef JoystickSupport"                    >> $F
    echo "#define JoystickSupport $JoystickSupport" >> $F
    echo "#endif"                                     >> $F
fi
if [ X$InstallXdmConfig != "X" ]; then
    echo "#ifndef InstallXdmConfig"                     >> $F
    echo "#define InstallXdmConfig $InstallXdmConfig" >> $F
    echo "#endif"                                       >> $F
fi
if [ X$InstallXinitConfig != "X" ]; then
    echo "#ifndef InstallXinitConfig"                       >> $F
    echo "#define InstallXinitConfig $InstallXinitConfig" >> $F
    echo "#endif"                                           >> $F
fi
if [ X$InstallAppDefFiles != "X" ]; then
    echo "#ifndef InstallAppDefFiles"                       >> $F
    echo "#define InstallAppDefFiles $InstallAppDefFiles" >> $F
    echo "#endif"                                           >> $F
fi
if [ X$ExtendedInputDevices = XYES ]; then
    echo "#define XInputDrivers mouse digitaledge dynapro elo2300 \
				elographics magellan \
				microtouch mutouch spaceorb summa \
				wacom void citron"  >> $F
else
    echo "#define XInputDrivers mouse" >> $F
fi
if [ X$Build75DpiFonts != "X" ]; then
    echo "#ifndef Build75DpiFonts"                       >> $F
    echo "#define Build75DpiFonts $Build75DpiFonts"      >> $F
    echo "#endif"                                        >> $F
fi
if [ X$Build100DpiFonts != "X" ]; then
    echo "#ifndef Build100DpiFonts"                       >> $F
    echo "#define Build100DpiFonts $Build100DpiFonts"      >> $F
    echo "#endif"                                        >> $F
fi
if [ X$BuildSpeedoFonts != "X" ]; then
    echo "#ifndef BuildSpeedoFonts"                       >> $F
    echo "#define BuildSpeedoFonts $BuildSpeedoFonts"      >> $F
    echo "#endif"                                        >> $F
fi
if [ X$BuildType1Fonts != "X" ]; then
    echo "#ifndef BuildType1Fonts"                       >> $F
    echo "#define BuildType1Fonts $BuildType1Fonts"      >> $F
    echo "#endif"                                        >> $F
fi
if [ X$BuildCIDFonts != "X" ]; then
    echo "#ifndef BuildCIDFonts"                     >> $F
    echo "#define BuildCIDFonts $BuildCIDFonts"      >> $F
    echo "#endif"                                    >> $F
fi
if [ X$BuildTTFonts != "X" ]; then
    echo "#ifndef BuildTTFonts"                    >> $F
    echo "#define BuildTTFonts $BuildTTFonts"      >> $F
    echo "#endif"                                  >> $F
fi

echo "#define BuildXF86Setup NO" >> $F
cat >> $F <<EOF
#ifndef XF86CardDrivers
#ifdef i386Architecture
#define XF86CardDrivers         mga glint nv tga s3virge sis rendition \
                                neomagic i740 tdfx savage \
                                cirrus tseng trident chips apm \
                                GlideDriver fbdev i128 \
                                ati AgpGartDrivers DevelDrivers ark cyrix \
				siliconmotion \
				vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
#else
#ifdef AlphaArchitecture
#define XF86CardDrivers         mga tdfx glint s3virge rendition tga \
				savage nv DevelDrivers siliconmotion vga \
				XF86OSCardDrivers XF86xtraCardDrivers
#endif
#endif
#endif
EOF
    # Never install something to outside ${X11BASE}!!
    echo "#define NothingOutsideProjectRoot YES" >> $F
}

configure

cat $F >> ${WRKDIR}/xc/config/cf/xf86site.def

echo "#define ProjectRoot ${PREFIX}" > ${WRKDIR}/xc/config/cf/host.def

cd ${WRKDIR}/xc
make Makefile.boot
make -f xmakefile SUBDIRS="include config" VerifyOS Makefiles includes