2 use ExtUtils::MakeMaker;
4 my @OPING_PREFIX = (qw(/opt/oping /usr /usr/local));
7 for (my $i = 0; $i < @ARGV; $i++)
9 if ($ARGV[$i] =~ m#^OPING_PREFIX=(.*[^/])#)
11 unshift (@OPING_PREFIX, $1);
12 splice (@ARGV, $i, 1);
17 for (my $i = 0; $i < @OPING_PREFIX; $i++)
19 if (!-e $OPING_PREFIX[$i] . '/include/oping.h')
24 $OPING_PREFIX = $OPING_PREFIX[$i];
25 print "Found <oping.h> in $OPING_PREFIX/include\n";
31 my $search_path = join (', ', @OPING_PREFIX);
33 ******************************************************************************
34 * ERROR: COULD NOT FIND THE NEEDED HEADER FILE <oping.h>! *
35 ******************************************************************************
36 The <oping.h> header file could not be found in the usual places. The prefix
37 paths searched right now are:
40 Please rerun Makefile.PL giving the prefix to the oping library using the
41 `OPING_PREFIX' argument. If you, for example, had installed the oping library
42 to /tmp/oping, the header file would be at /tmp/oping/include/oping.h; you'd
43 then need to run the Makefile.PL as follows:
44 perl Makefile.PL OPING_PREFIX=/tmp/oping
46 As you can see, the argument passed via `OPING_PREFIX' must be the same
47 directory you passed to the liboping configure script using the `--prefix'
50 No Makefile has been created.
57 VERSION_FROM => 'lib/Net/Oping.pm',
60 ? (ABSTRACT_FROM => 'lib/Net/Oping.pm',
61 AUTHOR => 'Florian Forster <octo@verplant.org>')
63 LIBS => ["-L$OPING_PREFIX/lib -loping"],
65 INC => "-I$OPING_PREFIX/include"