/usr/bin/globus-makefile-header is in libglobus-common-dev 15.26-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | #! /usr/bin/perl
#
# Copyright 1999-2006 University of Chicago
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
use strict;
use Pod::Usage;
use Getopt::Long;
use Cwd;
#
# do GPT version checking
#
my($flavor, $static, $link, @pkgs, $help, $verbose);
GetOptions(
'flavor=s' => \$flavor,
'static' => \$static,
'link=s' => \$link, # deprecated feature
'pkg=s' => \@pkgs,
'help|?' => \$help,
) or pod2usage(1);
if ( defined($link) && !defined($static) )
{
if ($link eq "static")
{
$static = 1;
}
}
my($args);
if ( defined($help) )
{
usage(0);
}
if ( !defined($flavor) )
{
usage(1);
}
if ( @ARGV && ($ARGV[0] ne "") )
{
push(@pkgs, @ARGV);
}
@pkgs = buildMultiArg(@pkgs);
if ( grep(/^ANY$/, @pkgs) )
{
@pkgs = ("ANY");
}
if ( !@pkgs || (scalar(@pkgs) == 0) )
{
@pkgs = ("ANY");
}
main($args);
exit;
#
# subroutines
#
### main( $args )
#
# driver function
#
sub main
{
my @ms;
my @pcs;
for my $pkg (@pkgs) {
my $pc = $pkg;
$pc =~ s/_/-/g;
push(@pcs, $pc);
my $m = $pkg;
$m =~ tr/[a-z]-/[A-Z]_/;
chomp(my $v= `pkg-config --modversion $pc`);
push(@ms, $m);
print "$m = $v\n";
}
my $cmd = "pkg-config --cflags-only-other " . join(" ", @pcs);
print "GLOBUS_CFLAGS = " . `$cmd`;
$cmd = "pkg-config --cflags-only-I " . join(" ", @pcs);
chomp(my $globus_includes = `$cmd`);
print "GLOBUS_INCLUDES = $globus_includes\n";
$cmd = "pkg-config --libs-only-L --libs-only-other " . join(" ", @pcs);
print "GLOBUS_LDFLAGS = ". `$cmd`;
$cmd = "pkg-config --libs-only-l --static " .join(" ", @pcs);
print "GLOBUS_PKG_LIBS = ". `$cmd`;
print "GLOBUS_CC = \${CC}\n";
print "GLOBUS_CPP = \${CPP}\n";
print "GLOBUS_FLAVOR_NAME = $flavor\n";
print "GLOBUS_CPPFLAGS = $globus_includes\n";
print "GLOBUS_CXX = \${CXX}\n";
print "GLOBUS_CXXCPP = \${CXX} -E\n";
print "GLOBUS_CXXFLAGS = \${CXXFLAGS} -E\n";
print <<EOF;
GLOBUS_F77 = \${FC}
GLOBUS_F77FLAGS = \${FCFLAGS}
GLOBUS_F90 = \${FC}
GLOBUS_F90FLAGS = \${FCFLAGS}
GLOBUS_AR = \${AR}
GLOBUS_ARFLAGS = \${ARFLAGS}
GLOBUS_RANLIB = \${RANLIB}
GLOBUS_NM = \${NM}
GLOBUS_OBJEXT = o
GLOBUS_EXEEXT =
GLOBUS_OBJECT_MODE =
GLOBUS_CROSS = no
GLOBUS_cross_compiling = no
GLOBUS_THREADS = none
GLOBUS_DEBUG = yes
GLOBUS_SH_PERL = /usr/bin/perl
GLOBUS_SH = /bin/sh
GLOBUS_LD = \${CC}
EOF
}
### buildMultiArg( @exclude )
#
# given a multiargument list, format it
#
sub buildMultiArg
{
my (@in_arr) = @_;
my (@out_arr);
@out_arr = split(/,/, join(',', @in_arr));
return @out_arr;
}
sub usage
{
print "Usage: $0 -pkg PACKAGE -flavor FLAVOR [-static]\n";
exit($_[0]);
}
|