fallback to defaults if pkg-config is not found
[perl-fuse.git] / Makefile.PL
1 use ExtUtils::MakeMaker;
2 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
3 # the contents of the Makefile that is written.
4
5 my $inc = `pkg-config --cflags` || '-I ../include';
6 my $obj = `pkg-config --libs fuse` || '-lfuse';
7  
8 WriteMakefile(
9     'NAME'              => 'Fuse',
10     'VERSION_FROM'      => 'Fuse.pm', # finds $VERSION
11     'PREREQ_PM'         => {}, # e.g., Module::Name => 1.1
12     ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
13       (ABSTRACT_FROM => 'Fuse.pm', # retrieve abstract from module
14        AUTHOR     => 'Mark Glines <mark@glines.org>') : ()),
15     'LIBS'              => [''], # e.g., '-lm'
16     'DEFINE'            => '-g -ggdb', # e.g., '-DHAVE_SOMETHING'
17         # Insert -I. if you add *.h files later:
18     'INC'               => $inc, # e.g., '-I/usr/include/other'
19         # Un-comment this if you add C files to link with later:
20     'OBJECT'            => "$obj Fuse.o -lpthread", # link all the C files too
21 );