small changes to "Go": fish skeleton is totally not interesting; it is possible to...
[k8-i-v-a-n.git] / Jamrules.configure
blob605c6c14cdb6940b012c75818d1c037f675ef92a
1 PROJECT_NAME = I.V.A.N. ;
3 -configure-enable-disable-vars- +=
4   "sound"   USE_SOUND   "auto"  "enable sound"
5   "opengl"  USE_OPENGL  "auto"  "use OpenGL renderer"
6   #
7   "wizard"        USE_WIZARD        "auto"  "disable 'wizard' mode"
8   "global-saves"  USE_GLOBAL_SAVES  "auto"  "enable saves in \$HOME"
12 rule -configure- {
13   if $(WINDOZE) {
14     -configure-add-line- "DEFINES += SHITDOZE ;" ;
15     -configure-add-line- "BUILD_SHITDOZE = tan ;" ;
16   }
18   #if $(OSPLAT) = 'X86_64' {
19   if $(HOST_64BIT) {
20     Echo "WARNING: 64 bit arches aren't supported. forcing 32-bit build." ;
21     -configure-add-line- "# 64shit found" ;
22     -configure-add-line- "CFLAGS.all += -m32 ;" ;
23     -configure-add-line- "LINKFLAGS.all += -m32 ;" ;
24   }
26   -configure-pkg-config-necessary-
27     "SDL2"    "sdl2"
28     "OpenGL"  "gl"
29     "ZLib"    "zlib"
30   ;
32   # libpng 1.6
33   if ! [ -configure-pkg-config- "libpng" : "libpng >= 1.6" ] {
34     if ! [ -configure-pkg-config- "libpng16" : "libpng16 >= 1.6" ] {
35       Exit "FATAL: LibPNG 1.6 not found!" ;
36     }
37   }
39   local has-prefix = ;
40   for local ca in $(JAMCONFIGARGS) {
41     if [ Match '^--prefix=.+$' : $(ca) ] {
42       has-prefix = tan ;
43       break ;
44     }
45   }
47   if $(has-prefix) {
48     # this is 'install' version, fix options
49     if $(USE_WIZARD) == "auto" { USE_WIZARD = ; }
50     if $(USE_GLOBAL_SAVES) == "auto" { USE_GLOBAL_SAVES = tan ; }
51   } else {
52     if $(USE_WIZARD) == "auto" { USE_WIZARD = tan ; }
53     if $(USE_GLOBAL_SAVES) == "auto" { USE_GLOBAL_SAVES = tan ; }
54   }
56   if $(WINDOZE) {
57     USE_GLOBAL_SAVES = ;
58   }
60   #Echo "PREFIX:" $(has-prefix) ;
61   #Echo "USE_WIZARD:" $(USE_WIZARD) ;
62   #Echo "USE_GLOBAL_SAVES:" $(USE_GLOBAL_SAVES) ;
64   if ! $(USE_SOUND) {
65     -configure-add-line- "# sound disabled" ;
66     -configure-add-line- "DEFINES += DISABLE_SOUND ;" ;
67   } else {
68     -configure-pkg-config- "SDL2 Mixer" : SDL2_mixer : : "DEFINES += DISABLE_SOUND ;" ;
69     if ! $(WINDOZE) {
70       -configure-pkg-config- "ALSA" : alsa : "DEFINES += ENABLE_ALSA ;" : ;
71     }
72   }
74   #if ! [ -configure-pkg-config- "ZLib" : zlib : "DEFINES += USE_ZLIB ;" ] { USE_ZLIB = ; }
76   -configure-add-line- "# other options" ;
77   if $(USE_WIZARD) {
78     Echo "CFG: wizard mode enabled" ;
79     -configure-add-line- "DEFINES += WIZARD ;" ;
80   }
82   if $(USE_GLOBAL_SAVES) {
83     Echo "CFG: using saves in \$HOME" ;
84   } else {
85     Echo "CFG: using local saves" ;
86     -configure-add-line- "DEFINES += LOCAL_SAVES ;" ;
87   }
89   if ! $(WINDOZE) {
90     -configure-add-line- "CFLAGS.all += -pthread ;" ;
91     -configure-add-line- "LINKFLAGS.all += -pthread ;" ;
92     -configure-add-line- "CFLAGS.all += -ldl ;" ;
93     -configure-add-line- "LINKFLAGS.all += -ldl ;" ;
94   }
98 if ( "shitdoze" in $(JAM_TARGETS) ) || ( "shitdoze_clean" in $(JAM_TARGETS) ) || $(WINDOZE) {
99   K8JAM-CONFIGURE-FILE = $(TOP)/Jamrules.auto.configure.shitdoze ;
100   RemoveJamTarget 'shitdoze' ;
101   BUILD_SHITDOZE = tan ;
102   if "shitdoze_clean" in $(JAM_TARGETS) {
103     JAM_TARGETS = clean ;
104   }
108 configure ;