1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/libc/Makefile.PL
David Steele d3054d919b Fixed missing flag in C library build.
The missing flag resulted in a mismatched binary on 32-bit systems.

Reported by Adrian Vondendriesch.
2017-06-22 12:57:10 -04:00

44 lines
1.3 KiB
Perl

use 5.010001;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile
(
NAME => 'pgBackRest::LibC',
VERSION_FROM => 'lib/pgBackRest/LibC.pm', # finds $VERSION, requires EU::MM from perl >= 5.5
AUTHOR => 'David Steele <david@pgbackrest.org>',
CCFLAGS => '-std=c99 -D_FILE_OFFSET_BITS=64 -funroll-loops -ftree-vectorize -ftree-vectorizer-verbose=2 $(CFLAGS)',
LIBS => [''], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I.', # e.g., '-I. -I/usr/include/other'
OBJECT => 'LibC.o pageChecksum.o', # link all C files
);
if (eval {require ExtUtils::Constant; 1})
{
# List of C constants to export
my @names =
(
qw(UVSIZE),
);
ExtUtils::Constant::WriteConstants
(
NAME => 'pgBackRest::LibC',
NAMES => \@names,
DEFAULT_TYPE => 'IV',
C_FILE => 'const-c.inc',
XS_FILE => 'const-xs.inc',
);
}
# Require constants to be built dynamically
else
{
die "NO FALLBACK - ExtUtils::Constant is required to build constants!";
}