Difference between revisions of "Black&White Project/Automatic compilation/configure"

From Kiwix
Jump to navigation Jump to search
Line 19: Line 19:


== Options ==
== Options ==
Options behavior depends on the build type:
* If building a shared version, dependency resolution is:
** if --with-static-option= then use that static path to link.
** if --with-option=path then use that shared object to link to.
** try to find shared lib with pkg-config
* If building a static version:
** if --with-static-option= then use that path to link.
** download and build dependency ourselves
''--with-static-option'' can receive ''SELF'' as value which the script will interpret as ''download and build a static version for me''.


=== ''--build-static'' (default: false) ===
=== ''--build-static'' (default: false) ===
Line 27: Line 38:


=== ''--with-gecko-sdk='' ===
=== ''--with-gecko-sdk='' ===
'''variable''': ''GECKO_SDK_PATH'' (path)
'''variable''': ''GECKO_SDK_PATH''. Path to ''sdk/'' of xulrunner-sdk or gecko-sdk.


Debian package: xulrunner-1.9-dev (ubuntu maverick and before, debian 6) [https://developer.mozilla.org/en/Gecko_SDK Gecko_SDK]
Debian package: xulrunner-1.9-dev (ubuntu maverick and before, debian 6) [https://developer.mozilla.org/en/Gecko_SDK Gecko_SDK]


=== ''--with-z'' ===
=== ''--with-z='' ===
'''variable''': ''ZLIB_PATH'' (path)
'''variable''': ''ZLIB_LDFLAGS''. Path to ''libz.so''.
 
Debian package: zlib1g
 
=== ''--with-static-z='' ===
'''variable''': ''ZLIB_LDFLAGS''. Path to ''libz.a''.


Debian package: zlib1g-dev
Debian package: zlib1g-dev


=== ''--with-z='' ===
=== ''--with-xapian='' ===
'''variable''': ''ZLIB_PATH'' (path)
'''variable''': ''XAPIAN_LDFLAGS''. Path to ''libxapian.so''.
 
Debian package: libxapian22


=== ''--with-xapian'' ===
=== ''--with-static-xapian='' ===
'''variable''': ''XAPIAN_PATH'' (path)
'''variable''': ''XAPIAN_LDFLAGS''. Path to ''libxapian.a''.


Debian package: libxapian-dev
Debian package: libxapian-dev


=== ''--with-xapian='' ===
'''variable''': ''XAPIAN_PATH'' (path)


=== ''--with-icu'' ===
=== ''--with-icu='' ===
'''variable''': ''ICU_PATH'' (path)
'''variable''': ''ICU_LDFLAGS''. Path to '''folder''' containing ''libicudata.so'', ''libicule.so'', ''libiculx.so'', ''libicuio.so'', ''libicuuc.so'', ''libicui18n.so'', ''libicutu.so''.


Debian package: libicu-dev
Debian package: libicu44


=== ''--with-icu='' ===
=== ''--with-static-icu='' ===
'''variable''': ''ICU_PATH'' (path)
'''variable''': ''ICU_LDFLAGS''. Path to '''folder''' containing ''libicudata.a'', ''libicule.a'', ''libiculx.a'', ''libicuio.a'', ''libicuuc.a'', ''libicui18n.a'', ''libicutu.a''.


=== ''--with-sqlite'' ===
Debian package: libicu-dev
'''variable''': ''SQLITE_PATH'' (path)


Debian package: libsqlite3-dev


=== ''--with-sqlite='' ===
=== ''--with-sqlite='' ===
'''variable''': ''SQLITE_PATH'' (path)
'''variable''': ''SQLITE_LDFLAGS''. Path to ''libsqlite3.so''.


=== ''--with-uuid'' ===
Debian package: libsqlite3
'''variable''': ''UUID_PATH'' (path)


Debian package: uuid-dev
=== ''--with-static-sqlite='' ===
'''variable''': ''SQLITE_LDFLAGS''. Path to ''libsqlite3.a''.
 
Debian package: libsqlite3-dev


=== ''--with-uuid='' ===
=== ''--with-uuid='' ===
'''variable''': ''UUID_PATH'' (path)
'''variable''': ''UUID_LDFLAGS''. Path to ''libuuid.so''.
 
Debian package: uuid-dev


e2fsprogs-utils
=== ''--with-static-uuid='' ===
'''variable''': ''UUID_LDFLAGS''. Path to ''libuuid.a''.


=== ''--with-microhttpd'' ===
Debian package: uuid-dev
'''variable''': ''LIBMICROHTTPD_PATH'' (path)


Debian package: libmicrohttpd-dev
e2fsprogs-utils


=== ''--with-microhttpd='' ===
=== ''--with-microhttpd='' ===
'''variable''': ''LIBMICROHTTPD_PATH'' (path)
'''variable''': ''LIBMICROHTTPD_LDFLAGS''. Path to ''libmicrohttpd.so''.
 
Debian package: libmicrohttpd5


=== ''--with-lzma'' ===
=== ''--with-static-microhttpd='' ===
'''variable''': ''LZMA_PATH'' (path)
'''variable''': ''LIBMICROHTTPD_LDFLAGS''. Path to ''libmicrohttpd.a''.


Debian package: liblzma-dev
Debian package: libmicrohttpd-dev


=== ''--with-lzma='' ===
=== ''--with-lzma='' ===
'''variable''': ''LZMA_PATH'' (path)
'''variable''': ''LZMA_LDFLAGS''. Path to ''liblzma.so''.


=== ''--with-cares'' ===
Debian package: liblzma2
'''variable''': ''CARES_PATH'' (path)


Debian package: libc-ares-dev
=== ''--with-static-lzma='' ===
'''variable''': ''LZMA_LDFLAGS''. Path to ''liblzma.a''.
 
Debian package: liblzma-dev


=== ''--with-cares='' ===
=== ''--with-cares='' ===
'''variable''': ''CARES_PATH'' (path)
'''variable''': ''CARES_LDFLAGS''. Path to ''libcares.so''.


=== ''--with-aria2'' ===
Debian package: libc-ares2
'''variable''': ''ARIA2_PATH'' (path)


Debian package: aria2 ('''/! Kiwix now requires version 1.14 which is not yet in debian/ubuntu)
=== ''--with-static-cares='' ===
'''variable''': ''CARES_LDFLAGS''. Path to ''libcares.a''.
 
Debian package: libc-ares-dev


=== ''--with-aria2='' ===
=== ''--with-aria2='' ===
'''variable''': ''ARIA2_PATH'' (path)
'''variable''': ''ARIA2_LDFLAGS''. Path to ''aria2c''.


=== ''--with-clucene'' ===
Debian package: aria2 ('''/! Kiwix now requires version 1.14 which is not yet in debian/ubuntu)
'''variable''': ''CLUCENE_PATH'' (path)


Debian package: libclucene-dev
=== ''--with-static-aria2='' ===
'''variable''': ''ARIA2_LDFLAGS''. Path to ''aria2c''.


=== ''--with-clucene='' ===
=== ''--with-clucene='' ===
'''variable''': ''CLUCENE_PATH'' (path)
'''variable''': ''CLUCENE_LDFLAGS''. Path to 'clucene.so''.
 
Debian package: libclucene0ldbl
 
=== ''--with-static-clucene='' ===
'''variable''': ''CLUCENE_LDFLAGS''. Path to 'clucene.a''.
 
Debian package: libclucene-dev


=== ''--without-clucene'' (default: true) ===
=== ''--without-clucene'' (default: true) ===

Revision as of 19:03, 23 February 2012

In order to ease maintenance and readability of this very essential script in the build process, we have decided that configure.ac needed a major rewrite. Because this script cascades everywhere towards the compilation chain, we will work on the rewrite in parallel.

To use the new compile script, do the following:

./autogen.sh alt

The configure.ac does not exist anymore in svn. A link to configure_orig.ac (previous version) is created by autogen.sh.

Changes

  • The new configure script will tend to a more standard autotools approach by changing options names.
  • There are two main direction: static build or shared build.
  • Each dependency (shared objects or archive) can be specified.
  • Not found dependencies falls back to download/compile mode.
  • Download/compile respects main direction.
  • Each dependency can be explicitly compiled statically


Options

Options behavior depends on the build type:

  • If building a shared version, dependency resolution is:
    • if --with-static-option= then use that static path to link.
    • if --with-option=path then use that shared object to link to.
    • try to find shared lib with pkg-config
  • If building a static version:
    • if --with-static-option= then use that path to link.
    • download and build dependency ourselves

--with-static-option can receive SELF as value which the script will interpret as download and build a static version for me.

--build-static (default: false)

variable: STATIC_BUILD (bool)

Defines whether to build a static version or not. There is no --build-shared option.

--with-gecko-sdk=

variable: GECKO_SDK_PATH. Path to sdk/ of xulrunner-sdk or gecko-sdk.

Debian package: xulrunner-1.9-dev (ubuntu maverick and before, debian 6) Gecko_SDK

--with-z=

variable: ZLIB_LDFLAGS. Path to libz.so.

Debian package: zlib1g

--with-static-z=

variable: ZLIB_LDFLAGS. Path to libz.a.

Debian package: zlib1g-dev

--with-xapian=

variable: XAPIAN_LDFLAGS. Path to libxapian.so.

Debian package: libxapian22

--with-static-xapian=

variable: XAPIAN_LDFLAGS. Path to libxapian.a.

Debian package: libxapian-dev


--with-icu=

variable: ICU_LDFLAGS. Path to folder containing libicudata.so, libicule.so, libiculx.so, libicuio.so, libicuuc.so, libicui18n.so, libicutu.so.

Debian package: libicu44

--with-static-icu=

variable: ICU_LDFLAGS. Path to folder containing libicudata.a, libicule.a, libiculx.a, libicuio.a, libicuuc.a, libicui18n.a, libicutu.a.

Debian package: libicu-dev


--with-sqlite=

variable: SQLITE_LDFLAGS. Path to libsqlite3.so.

Debian package: libsqlite3

--with-static-sqlite=

variable: SQLITE_LDFLAGS. Path to libsqlite3.a.

Debian package: libsqlite3-dev

--with-uuid=

variable: UUID_LDFLAGS. Path to libuuid.so.

Debian package: uuid-dev

--with-static-uuid=

variable: UUID_LDFLAGS. Path to libuuid.a.

Debian package: uuid-dev

e2fsprogs-utils

--with-microhttpd=

variable: LIBMICROHTTPD_LDFLAGS. Path to libmicrohttpd.so.

Debian package: libmicrohttpd5

--with-static-microhttpd=

variable: LIBMICROHTTPD_LDFLAGS. Path to libmicrohttpd.a.

Debian package: libmicrohttpd-dev

--with-lzma=

variable: LZMA_LDFLAGS. Path to liblzma.so.

Debian package: liblzma2

--with-static-lzma=

variable: LZMA_LDFLAGS. Path to liblzma.a.

Debian package: liblzma-dev

--with-cares=

variable: CARES_LDFLAGS. Path to libcares.so.

Debian package: libc-ares2

--with-static-cares=

variable: CARES_LDFLAGS. Path to libcares.a.

Debian package: libc-ares-dev

--with-aria2=

variable: ARIA2_LDFLAGS. Path to aria2c.

Debian package: aria2 (/! Kiwix now requires version 1.14 which is not yet in debian/ubuntu)

--with-static-aria2=

variable: ARIA2_LDFLAGS. Path to aria2c.

--with-clucene=

variable: CLUCENE_LDFLAGS. Path to 'clucene.so.

Debian package: libclucene0ldbl

--with-static-clucene=

variable: CLUCENE_LDFLAGS. Path to 'clucene.a.

Debian package: libclucene-dev

--without-clucene (default: true)

variable: WITH_CLUCENE (bool)

Disables support for clucene search Engine. Default to off as it is deprecated in favor of xapian.