-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure
executable file
·79 lines (70 loc) · 2.3 KB
/
configure
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
#!/bin/bash
echo "Checking whether build environment is sane..."
sleep 1
enabled=""
disabled=""
cflags="-pthread "
lflags="-pthread -ldl "
lflags+="-lX11 -lGL -lXi -lXext "
if pkg-config --exists gtk+-3.0; then
cflags+="`pkg-config --cflags gtk+-3.0` -DWINDOW_GTK3 "
lflags+="`pkg-config --libs gtk+-3.0` "
#elif pkg-config --exists gtk+-2.0; then
else
echo "Sorry, you do not have any supported GUI toolkit installed."
exit
fi
if pkg-config --exists libpulse; then
enabled+=" pulseaudio"
cflags+="`pkg-config --cflags libpulse` -DAUDIO_PULSEAUDIO "
lflags+="`pkg-config --libs libpulse` "
else
disabled+=" pulseaudio"
fi
if pkg-config --exists alsa; then
enabled+=" ALSA"
cflags+="`pkg-config --cflags alsa` -DAUDIO_ALSA "
lflags+="`pkg-config --libs alsa` "
else
disabled+=" ALSA"
fi
#if [ -f /usr/include/Cg/cg.h ]; then
# enabled+="Cg"
# cflags+="-DHAVE_CG_SHADERS "
#else
# disabled+="Cg"
#fi
#uname := $(shell uname -a)
#ifeq ($(uname),) win
#ifneq ($(findstring Darwin,$(uname)),) osx
#else x
echo "
CONF_CFLAGS = $cflags
CONF_LFLAGS = $lflags
" > config.mk
#Rules for which dependencies are allowed:
#If there is no reasonable way to continue the program without this library, then make use of it.
#If a library matches the above rule, no effort needs to be spent on getting rid of it from other locations.
#If the library is only a link-time dependency and not needed at runtime, then it's fine.
#Otherwise, effort shall be spent on getting rid of this dependency. It's fine temporarily, but don't leave it there forever.
#Linux:
#pthread - core (thread), links in threadsafe malloc
#gtk+-3.0 - core (window)
#libpulse - audio.pulseaudio - link only
#dl - core (dylib)
#X11 - core (libretro/hardware mapping), video.opengl, input.x11-xinput2? - FIXME
#GL - video.opengl - FIXME
#Xi - input.x11-xinput2 - FIXME
#Xext - video.xshm - FIXME
#pulse - audio.pulseaudio - FIXME
#Windows:
#gdi32 - core (window - fonts), video.gdi, video.opengl
#comctl32 - core (window - inner)
#comdlg32 - core (window - open file dialog)
#dinput8 - input.directinput - link only
#dxguid - audio.directsound, input.directinput - link only
#opengl32 - video.opengl - FIXME
#dsound - audio.directsound - FIXME
echo "...whatever, they all are. Configuration is done."
echo "Enabled optional modules:$enabled"
echo "Disabled optional modules:$disabled"