zymosis: renamed "SLL" to "SLS"
[zymosis.git] / Jamrules.configure
bloba1b04553f8efed89f74a4c9d3a30c926d25acae7
1 PROJECT_NAME = ZXEmut ;
4 -configure-enable-disable-vars- +=
5   "alsa"    USE_ALSA    "auto"  "use ALSA for sound"
6   "zlib"    USE_ZLIB    "auto"  "use ZLib"
7   "libzip"  USE_LIBZIP  "auto"  "use libZip"
8   "imlib2"  USE_IMLIB2  "auto"  "use imlib2"
9   "sysjim"  USE_SYSJIM  ""      "use system jim-tcl library instead of internal one"
13 rule -configure-jim-found- {
14   -configure-add-line- "LINKFLAGS.all += -L$(1)/lib ;" ;
15   -configure-add-line- "LINKLIBS.all += -ljim -lm -ldl ;" ;
16   #if [ pkg-config-has sqlite3 ] { -configure-add-line- "LINKLIBS.all += -lsqlite3 ;" ; }
17   -configure-add-line- "HDRS += $(1)/include ;" ;
18   -configure-pkg-config- "SQLite3" ;
22 _CFG_IJIM_MSG = ;
24 rule -configure-jim-not-found- {
25   #-configure-fatal- ;
26   #Echo "you need Jim Tcl ( http://jim.tcl.tk/ ) to compile ZXEmuT!" ;
27   if $(_CFG_IJIM_MSG) {
28     Echo "MSG: using internal Jim" ;
29   }
30   -configure-add-line- "# use internal jim-tcl" ;
31   -configure-add-line- "JIM_INTERNAL = tan ;" ;
32   -configure-add-line- "DEFINES += JIM_INTERNAL ;" ;
33   -configure-add-line- "LINKLIBS.all += -ldl -lm ;" ;
37 rule -configure-libspectrum-found- {
38   #-configure-add-line- LINKFLAGS.all "+=" -L$(1)/lib ";" ;
39   -configure-add-line- "LINKLIBS.all += -lspectrum ;" ;
43 rule -configure-libspectrum-not-found- {
44   -configure-fatal- ;
45   Echo "you need libspectrum ( http://fuse-emulator.sourceforge.net/libspectrum.php/ ) to compile ZXEmuT!" ;
49 rule -configure- {
50   -configure-pkg-config-necessary-
51     "SDL"  "sdl < 2"
52   ;
53   #
54   if $(USE_ALSA) {
55     if ! [ -configure-pkg-config- "alsa" : alsa : "DEFINES += USE_SOUND ; HAVE_ALSA = tan ;" ] { USE_ALSA = ; }
56   }
57   if ! $(USE_ALSA) {
58     -configure-add-line- "# ALSA disabled" ;
59     -configure-add-line- "HAVE_ALSA = ;" ;
60   }
61   #
62   if $(USE_ZLIB) {
63     if ! [ -configure-pkg-config- "ZLib" : zlib : "DEFINES += HAVE_ZLIB ; HAVE_ZLIB = tan ;" ] { USE_ZLIB = ; }
64   }
65   if ! $(USE_ZLIB) {
66     -configure-add-line- "# ZLib disabled" ;
67     -configure-add-line- "HAVE_ZLIB = ;" ;
68   }
69   #
70   if $(USE_LIBZIP) {
71     if ! [ -configure-pkg-config- "libzip" : libzip : "DEFINES += USE_LIBZIP ;" ] { USE_LIBZIP = ; }
72   }
73   if ! $(USE_LIBZIP) {
74     -configure-add-line- "# libzip disabled" ;
75   }
76   #
77   if $(USE_IMLIB2) {
78     if ! [ -configure-pkg-config- "imlib2" : imlib2 : "DEFINES += USE_IMLIB2 ;" ] { USE_IMLIB2 = ; }
79   }
80   if ! $(USE_IMLIB2) {
81     -configure-add-line- "# imlib2 disabled" ;
82   }
83   #
84   if $(USE_SYSJIM) {
85     _CFG_IJIM_MSG = tan ;
86     -configure-detect-library- "jim-tcl" : libjim.a : jim.h : /opt/jim /opt/jim/jim-tcl : -configure-jim-found- : -configure-jim-not-found- ;
87   } else {
88     -configure-jim-not-found- ;
89   }
90   #
91   -configure-detect-library- "libspectrum" : libspectrum.a : libspectrum.h : : -configure-libspectrum-found- : -configure-libspectrum-not-found- ;
92   #
93   -configure-add-line- "# others" ;
94   -configure-add-line- "LINKLIBS.all += -lrt ;" ;
98 configure ;