| 1 | = Compilation = |
| 2 | [[TOC()]] |
| 3 | |
| 4 | This page provides documentation on how to compile then install ZOO-Kernel on Unix and Win32 platforms. |
| 5 | |
| 6 | == Unix == |
| 7 | |
| 8 | For Unix users, ZOO-Kernel comes with a GNU autoconf "configure" script that |
| 9 | should take care of (hopefully!) all compilation issues for you. |
| 10 | |
| 11 | The configure script won't work on Windows. See section [#WIN32 WIN32] for details on |
| 12 | compiling on Windows systems. |
| 13 | |
| 14 | === For the impatient === |
| 15 | |
| 16 | To build {{{zoo_loader.cgi}}} CGI program with the default options, go to the default |
| 17 | options, go to the directory where you extracted the ZOO-Kernel source code |
| 18 | package and use the following command: |
| 19 | |
| 20 | {{{ |
| 21 | #!sh |
| 22 | $ cd zoo-kernel |
| 23 | $ ./configure |
| 24 | $ make |
| 25 | }}} |
| 26 | |
| 27 | Unless something went wrong, you should have executables in the current |
| 28 | directory for the zoo_loader.cgi CGI program. You can copy the zoo_loader.cgi |
| 29 | program and the main.cfg file to your HTTP server's CGI directory and start |
| 30 | using it. |
| 31 | |
| 32 | At this step your ZOO-Kernel should work. Nevertheless, don't forget to correct |
| 33 | the main.cfg settings to set tmpPath and tmpUrl to fit your web server |
| 34 | configuration. |
| 35 | |
| 36 | === configure options === |
| 37 | |
| 38 | Here is the list of available options as returned by {{{./configure --help}}}: |
| 39 | {{{ |
| 40 | #!sh |
| 41 | --with-gdal-config=FILE specify an alternative gdal-config file |
| 42 | --with-xml2config=FILE specify an alternative xml2-config file |
| 43 | --with-python=PATH To enabled python support or specify an alternative |
| 44 | directory for python installation, disabled by |
| 45 | default |
| 46 | --with-php=PATH To enabled php support or specify an alternative |
| 47 | directory for php installation, disabled by default |
| 48 | --with-perl=PATH To enabled perl support or specify an alternative |
| 49 | directory for perl installation, disabled by default |
| 50 | --with-java=PATH To enabled java support, specify a JDK_HOME, |
| 51 | disabled by default |
| 52 | --with-js=PATH specify --with-js=path-to-js to enabled js support, |
| 53 | specify --with-js on linux debian like, js support |
| 54 | is disabled by default |
| 55 | }}} |
| 56 | |
| 57 | All the options are described in more details below. |
| 58 | |
| 59 | ==== (Required) GDAL Support: ==== |
| 60 | |
| 61 | If your gdal-config program is not found in your PATH then you can use the |
| 62 | "--with-gdal-config" option to speficy its location. For instance, let suppose |
| 63 | that your gdal-config was installed in /usr/local/bin and this directory is not |
| 64 | in your PATH, then you can use the following command: |
| 65 | |
| 66 | {{{ |
| 67 | #!sh |
| 68 | $ ./configure --with-gdal-config=/usr/local/bin/gdal-config |
| 69 | }}} |
| 70 | |
| 71 | ==== (Required) XML2 Support: ==== |
| 72 | |
| 73 | If your xml2-config program is not found in your PATH then you can use the |
| 74 | "--with-xml2config" option to specify its location. For instance, let suppose |
| 75 | that your xml2-config was installed in /usr/local/bin end this directory is not |
| 76 | in you PATH, then you can use the following command: |
| 77 | |
| 78 | {{{ |
| 79 | #!sh |
| 80 | $ ./configure --with-xml2config=/usr/local/bin/xml2-config |
| 81 | }}} |
| 82 | |
| 83 | ==== (Optional) Python Support ==== |
| 84 | |
| 85 | |
| 86 | If you want to activate the Python Support for ZOO-Kernel then you will have to |
| 87 | use the "--with-python" option. If your python-config program is found in your |
| 88 | PATH then you don't have to specify the path where Python was installed, so |
| 89 | using the following command: |
| 90 | |
| 91 | {{{ |
| 92 | #!sh |
| 93 | $ ./configure --with-python |
| 94 | }}} |
| 95 | |
| 96 | This suppose that python-config is found in your PATH. |
| 97 | |
| 98 | In case your python-config is not found in your PATH, then you can set the |
| 99 | Python installation directory you are using. For instance, let suppose that you |
| 100 | installed Python in /usr/local, then you can use the following command: |
| 101 | |
| 102 | {{{ |
| 103 | #!sh |
| 104 | $ ./configure --with-python=/usr/local |
| 105 | }}} |
| 106 | |
| 107 | This suppose that /usr/local/bin/python-config exists. |
| 108 | |
| 109 | ==== (Optional) PHP Support ==== |
| 110 | |
| 111 | To be able to activate PHP Support for ZOO-Kernel you'll need to get a local |
| 112 | PHP Embedded installation, for more informations about configure options to use |
| 113 | to get such kind of PHP installation you can refer to this page : |
| 114 | http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP |
| 115 | |
| 116 | If you want to activate the PHP Support for ZOO-Kernel then you will have to |
| 117 | use the "--with-php" option. If your php-config program is found in your PATH |
| 118 | then you don't have to specify the path where PHP was installed, so using the |
| 119 | following commnd: |
| 120 | |
| 121 | {{{ |
| 122 | #!sh |
| 123 | $ ./configure --with-php |
| 124 | }}} |
| 125 | |
| 126 | This suppose that php-config is found in your PATH. |
| 127 | |
| 128 | In case your php-config is not found in your PATH, then you can set the PHP |
| 129 | installation directory you are using. For instance, let suppose that you |
| 130 | installed PHP in /usr/local, then you can use the following command: |
| 131 | |
| 132 | {{{ |
| 133 | #!sh |
| 134 | $ ./configure --with-php=/usr/local |
| 135 | }}} |
| 136 | |
| 137 | This suppose that /usr/local/bin/php-config exists. |
| 138 | |
| 139 | ==== (Optional) Perl Support ==== |
| 140 | |
| 141 | |
| 142 | If you want to activate the Perl Support for ZOO-Kernel then you will have to |
| 143 | use the "--with-perl" option. If you do not set any value to this option, then |
| 144 | perl program will be searched in your PATH. So in such case, you can use the |
| 145 | following command: |
| 146 | |
| 147 | {{{ |
| 148 | #!sh |
| 149 | $ ./configure --with-perl |
| 150 | }}} |
| 151 | |
| 152 | This suppose that perl is found in your PATH. |
| 153 | |
| 154 | In other case, for custom Perl installation, you can set the installation |
| 155 | directory. For instance, let suppose that you installed Perl in /usr/local |
| 156 | and /usr/local/bin is not in your PATH, then you can use the following command: |
| 157 | |
| 158 | {{{ |
| 159 | #!sh |
| 160 | $ ./configure --with-perl=/usr/local |
| 161 | }}} |
| 162 | |
| 163 | This suppose that /usr/local/bin/perl exists. |
| 164 | |
| 165 | ==== (Optional) Java Support ==== |
| 166 | |
| 167 | If you want to activate the Java Support for ZOO-Kernel then you will have to |
| 168 | use the "--with-java" option and set the installation path of your Java SDK. |
| 169 | For instance, let suppose that your Java SDK was installed in |
| 170 | /usr/lib/jvm/java-6-sun-1.6.0.22/ directory, then you can use the following |
| 171 | command: |
| 172 | |
| 173 | {{{ |
| 174 | #!sh |
| 175 | $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/ |
| 176 | }}} |
| 177 | |
| 178 | This suppose that the include/linux and jre/lib/i386/client/ subdirectories |
| 179 | exist in /usr/lib/jvm/java-6-sun-1.6.0.22/, include/linux contains the jni.h |
| 180 | headers file and jre/lib/i386/client/ contains the libjvm.so file. |
| 181 | |
| 182 | Note that on MacOS X you only have to set macos as value for the "--with-java" |
| 183 | option to get the Java Support for ZOO-Kernel activated. So using the following |
| 184 | command: |
| 185 | |
| 186 | {{{ |
| 187 | #!sh |
| 188 | $ ./configure --with-java=macos |
| 189 | }}} |
| 190 | |
| 191 | ==== (Optional) !JavaScript Support ==== |
| 192 | |
| 193 | If you want to activate the !JavaScript Support for ZOO-Kernel then you will |
| 194 | have to use the {{{--with-js}}} option. If you are using a "Debian-like" GNU/Linux |
| 195 | distribution then dpkg will be used to detect if the required packages was |
| 196 | installed and you don't have to specify anything here, so you can use the |
| 197 | following command: |
| 198 | |
| 199 | {{{ |
| 200 | #!sh |
| 201 | $ ./configure --with-js |
| 202 | }}} |
| 203 | |
| 204 | This suppose that {{{js_api.h}}} and {{{libmozjs.so}}} are found in default directories. |
| 205 | |
| 206 | If you get a custom installation of !SpiderMonkey or you are not using a Debian |
| 207 | packaging system, then you'll have to specify the directory where you installed |
| 208 | it. For instance, let suppose that you installed your !SpiderMonkey in {{{/usr}}}, |
| 209 | then you'll have to use the following command: |
| 210 | |
| 211 | {{{ |
| 212 | #!sh |
| 213 | $ ./configure --with-js=/usr |
| 214 | }}} |
| 215 | |
| 216 | This suppose that the {{{/usr/include/js}}} exists and contains the {{{js_api.h}}} headers |
| 217 | file and {{{/usr/lib}}} contains {{{libmozjs.so}}} file. |
| 218 | |
| 219 | |
| 220 | == WIN32 == |
| 221 | |
| 222 | To be written soon ... |