/[MITgcm]/mitgcm.org/devel/buildweb/pkg/swish-e/perl/Makefile.PL
ViewVC logotype

Annotation of /mitgcm.org/devel/buildweb/pkg/swish-e/perl/Makefile.PL

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Fri Sep 20 19:47:30 2002 UTC (22 years, 10 months ago) by adcroft
Branch: Import, MAIN
CVS Tags: baseline, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Importing web-site building process.

1 adcroft 1.1 #!/usr/local/bin/perl -w
2     use strict;
3     use ExtUtils::MakeMaker;
4    
5     $Verbose = 1;
6    
7     print "Parsing ../src/acconfig.h...\n";
8    
9     my $zlib;
10     my $libxml2;
11    
12     open FH, '../src/acconfig.h' or die $!;
13    
14     while (<FH>) {
15     $zlib++ if /^#define HAVE_ZLIB 1/;
16     $libxml2++ if /^#define HAVE_LIBXML2 1/;
17     }
18    
19    
20     if ( $libxml2 ) {
21     print <<'EOF';
22    
23     ==========================================================
24     Note about libxml2.
25    
26     It seems as if you built swish-e with libxml2.
27    
28     If libxml2 is not found automatically, then you may
29     need to mess with CCFLAGS and LDFROM flags.
30    
31     For example:
32    
33     perl Makefile.PL \
34     CCFLAGS=-I$HOME/local/include \
35     LDFROM="-L$HOME/local/lib -R$HOME/local/lib"
36    
37     libxml2 is not needed for the perl module -- it's only
38     used for indexing. It will increase the size of the
39     perl module if included and/or require libxml2 to be
40     loaded even though it's not used.
41    
42     This is not a problem and can be ignored, but:
43    
44     You may wish to rebuild swish-e without libxml2
45     support, and then create the perl module. Note that
46     rebuilding swish will overwrite the swish-e binary, so you
47     may want to copy or install the swish-e binary before
48     rebuilding without libxml2 support.
49    
50     Hopefully this will better in the future.
51    
52     ==========================================================
53    
54     EOF
55     print "press return: ";
56     <STDIN>;
57     }
58    
59     printf( "Swish was %sbuilt with zlib support\n", $zlib ? '' : 'not ' );
60     printf( "Swish was %sbuilt with libxml2 support\n", $libxml2 ? '' : 'not ' );
61    
62    
63    
64     my $libs = '-L../src -lswish-e';
65     $libs .= ' -lz' if $zlib;
66     $libs .= ' -lxml2' if $libxml2;
67    
68     WriteMakefile(
69     NAME => 'SWISHE',
70     LIBS => [$libs],
71     NORECURS => 1, # keep it from recursing into subdirectories
72     VERSION_FROM => 'SWISHE.pm', # finds $VERSION
73     DIR => [],
74     );
75    

  ViewVC Help
Powered by ViewVC 1.1.22