Reorder libs in Makefile.PL so it will link properly
[blerg.git] / lib / perl / Blerg-Database / Makefile.PL
1 use 5.008000;
2 use ExtUtils::MakeMaker;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
5 WriteMakefile(
6     NAME              => 'Blerg::Database',
7     VERSION_FROM      => 'lib/Blerg/Database.pm', # finds $VERSION
8     PREREQ_PM         => {}, # e.g., Module::Name => 1.1
9     ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
10       (ABSTRACT_FROM  => 'lib/Blerg/Database.pm', # retrieve abstract from module
11        AUTHOR         => 'Chip Black <bytex64@bytex64.net>') : ()),
12     LIBS              => [''], # e.g., '-lm'
13     OBJECT            => '$(BASEEXT)$(OBJ_EXT) ../../../blerg_auth.a ../../../builddeps/scrypt.a ../../../blerg.a',
14     DEFINE            => '', # e.g., '-DHAVE_SOMETHING'
15     INC               => '-I../../..', # e.g., '-I. -I/usr/include/other'
16 );
17 if  (eval {require ExtUtils::Constant; 1}) {
18   # If you edit these definitions to change the constants used by this module,
19   # you will need to use the generated const-c.inc and const-xs.inc
20   # files to replace their "fallback" counterparts before distributing your
21   # changes.
22   my @names = (qw(RECORDS_PER_SEGMENT MAX_RECORD_SIZE MAX_TAG_LENGTH MAX_TAGS_PER_RECORD BLERGSTATUS_MUTED BLERGSTATUS_MENTIONED),
23     {name => 'BASEURL', type => 'PV'},
24     {name => 'DATA_PATH', type => 'PV'},
25     {name => 'HASH_TAGS_PATH', type => 'PV'},
26     {name => 'REF_TAGS_PATH', type => 'PV'},
27   );
28   ExtUtils::Constant::WriteConstants(
29                                      NAME         => 'Blerg::Database',
30                                      NAMES        => \@names,
31                                      DEFAULT_TYPE => 'IV',
32                                      C_FILE       => 'const-c.inc',
33                                      XS_FILE      => 'const-xs.inc',
34                                      PROXYSUBS    => 1,
35                                   );
36
37 }
38 else {
39   use File::Copy;
40   use File::Spec;
41   foreach my $file ('const-c.inc', 'const-xs.inc') {
42     my $fallback = File::Spec->catfile('fallback', $file);
43     copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
44   }
45 }