start using new jam confgure features
[k8lowj.git] / Jamrules.configure
blob4b4aed6d4f9be10acb0c81bb64c4c87838672480
1 PROJECT_NAME = k8logjam ;
3 # "auto": check with pkg-config or so, show '--disable-xxx'
4 # "": disabled by default, show '--enable-xxx'
5 # non-empty string: enabled by default, show '--disable-xxx'
6 -configure-enable-disable-vars- +=
7   "sqlite"    USE_SQLITE    "auto"  "don't use sqlite"
8   "gtkhtml"   USE_GTKHTML   "auto"  "don't use GTKHTML"
9   "gtkspell"  USE_GTKSPELL  "auto"  "don't use GTKSpell"
10   "svg"       USE_RSVG      "auto"  "don't use librsvg"
11   "soup"      USE_SOUP      "auto"  "don't use libsoup"
12   "curl"      USE_CURL      "auto"  "don't use libcurl"
13   "dock"      USE_DOCK      "tan"   "disable dock icon"
14   "timegm"    USE_TIMEGM    "tan"   "don't use timegm()"
18 rule -configure- {
19   -configure-pkg-config-necessary-
20     "GLib"    "glib-2.0 >= 2.30.0"
21     "GTK+2"   "gtk+-2.0"
22     "X11"     "x11"
23     "GObject" "gobject-2.0 >= 2.30.0"
24     "GThread" "gthread-2.0 >= 2.30.0"
25     "LibXML2" "libxml-2.0 >= 2.9"
26   ;
27   -configure-add-line- "DEFINES += HAVE_GTK HAVE_LIBXML ;" ;
29   if $(USE_SQLITE) { -configure-pkg-config- "SQLite3" : "sqlite3" : "DEFINES += HAVE_SQLITE3 ;" ; }
30   if $(USE_GTKSPELL) { -configure-pkg-config- "GTKSpell" : "gtkspell-2.0" : "DEFINES += HAVE_GTKSPELL ;" ; }
31   if $(USE_GTKHTML) { -configure-pkg-config- "libgtkhtml3.30" : "libgtkhtml-3.30" : "DEFINES += HAVE_GTKHTML330 HAVE_GTKHTML ;" ; }
32   if $(USE_RSVG) {
33     if ! [-configure-pkg-config- "librsvg" : "librsvg-2.0 > 2.2.3" : "DEFINES += HAVE_LIBRSVG ;" ] { USE_RSVG = ; } else { USE_RSVG = "tan" ; }
34   }
35   -configure-add-line- "USE_RSVG =" $(USE_RSVG) ";" ;
37   if $(USE_SOUP) {
38     if ! [ -configure-pkg-config- "libsoup" : "libsoup-2.2" : "DEFINES += HAVE_LIBSOUP ;" ] { USE_SOUP = ; }
39   }
40   if $(USE_CURL) {
41     if ! [ -configure-pkg-config- "libcurl" : "libcurl >= 7.30" : "DEFINES += HAVE_CURL ;" ] { USE_CURL = ; }
42   }
44   if ! $(USE_SOUP) && ! $(USE_CURL) {
45     Echo "FATAL: neither libsoup nor libcurl was found!" ;
46     -configure-fatal- ;
47     return ;
48   }
50   -configure-add-line- "# dock" ;
51   if $(USE_DOCK) {
52     Echo "CFG: dock icon enabled" ;
53     -configure-add-line- "DEFINES += USE_DOCK ;" ;
54   } else {
55     Echo "CFG: dock icon disabled" ;
56     -configure-add-line- "# dock disabled" ;
57   }
59   -configure-add-line- "# timegm()" ;
60   if $(USE_TIMEGM) {
61     Echo "CFG: timegm() enabled" ;
62     -configure-add-line- "DEFINES += HAVE_TIMEGM ;" ;
63   } else {
64     Echo "CFG: timegm() disabled" ;
65     -configure-add-line- "# timegm() disabled" ;
66   }
68   -configure-add-line- "# other autocrap shit" ;
69   -configure-add-line- "DEFINES += HAVE_REGEX_H ;" ;
70   -configure-add-line- "DEFINES += HAVE_UNISTD_H ;" ;
71   #-configure-add-line- "DEFINES += HAVE_GTK_MULTIHEAD ;" ;
75 configure ;