1 # Automatic configuration, libucw specific part
2 # (c) 2008 Michal Vaner <vorner@ucw.cz>
3 # Code taken from autoconf.cfg by:
4 # (c) 2005--2008 Martin Mares <mj@ucw.cz>
5 # (c) 2006 Robert Spalek <robert@ucw.cz>
8 Test("CPU_PAGE_SIZE", "Determining page size", sub {
10 if (IsSet("CONFIG_DARWIN")) {
11 $p = `sysctl -n hw.pagesize`;
12 defined $p or Fail "sysctl hw.pagesize failed";
13 } elsif (IsSet("CONFIG_LINUX")) {
14 $p = `getconf PAGE_SIZE`;
15 defined $p or Fail "getconf PAGE_SIZE failed";
21 if (IsSet("CONFIG_LARGE_FILES") && IsSet("CONFIG_LINUX")) {
22 # Use 64-bit versions of file functions
26 # Decide how will ucw/partmap.c work
27 Set("PARTMAP_IS_MMAP") if IsSet("CPU_64BIT_POINTERS");
29 # Option for ucw/mempool.c
32 # Guess optimal bit width of the radix-sorter
33 if (Get("CPU_ARCH") eq "default" || Get("CPU_ARCH") =~ /^i[345]86$/) {
34 # This should be safe everywhere
35 Set("CONFIG_UCW_RADIX_SORTER_BITS" => 10);
37 # Use this on modern CPU's
38 Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12);
41 # If debugging memory allocations:
44 # Remember PKG_CONFIG_PATH used for building, so that it will be propagated to
45 # pkg-config's run locally in the makefiles.
46 Set("PKG_CONFIG_PATH", $ENV{"PKG_CONFIG_PATH"}) if defined $ENV{"PKG_CONFIG_PATH"};