From: Dobrica Pavlinusic Date: Sat, 20 Jan 2007 12:37:03 +0000 (+0000) Subject: support for MacFUSE implementation for Mac OS X from http://code.google.com/p/macfuse/ X-Git-Tag: 0.09~4 X-Git-Url: http://git.rot13.org/?p=perl-fuse.git;a=commitdiff_plain;h=3da4a4fd25049f750cca2909677baeaef67918cb support for MacFUSE implementation for Mac OS X from code.google.com/p/macfuse/ git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/fuse/perl-llin@109 6e4b0b00-1209-0410-87b2-b275959b5705 --- diff --git a/Makefile.PL b/Makefile.PL index 1a5caf6..6280cdb 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,24 +4,32 @@ use ExtUtils::MakeMaker; my $ver = `fusermount -V`; my $ver2 = `mount_fusefs -V`; +chomp(my $ver3 = `mount_fusefs -V 2>&1 | head -n1`); $ver =~ s/^.*?version:\s+//; $ver2 =~ s/^.*?version:\s+//; -if (! $ver && ! $ver2) { +$ver3 =~ s/^.*?version\s+//; +if (! $ver && ! $ver2 && ! $ver3) { # make CPANPLUS happy and don't report errors if fuse isn't installed die("No support for os: $^O\n", "You need to have fuse-dev (or similar) package installed and have sufficient permissions in order to install this module\n" ); } if ($ver && $ver + 0 < 2.5) { - die "Fuse perl bindings need Linux fuse version 2.5 or never\n"; + die "Fuse perl bindings need Linux fuse version 2.5 or newer\n"; } elsif ($ver2 && $ver2 + 0 < 0.3) { - die "Fuse perl bindings need FreeBSD fuse version 0.3 or never\n"; + die "Fuse perl bindings need FreeBSD fuse version 0.3 or newer\n"; +} elsif ($^O eq 'darwin' && $ver3 && !(($ver3 ge "0.1.0b006") || ($ver3 eq "0.1.0"))) { + # the "ge" string-compare check will match all later revs and all later + # betas, but not the final release of the current rev (0.1.0). + die "Fuse perl bindings need MacFUSE version 0.1.0b006 or newer, your version is \"$ver3\"\n"; } else { - warn "fuse version found: ", $ver || $ver2, "\n"; + warn "fuse version found: ", $ver || $ver2 || $ver3, "\n"; } my $inc = '-DFUSE_USE_VERSION=25 ' . `pkg-config --cflags fuse` || '-I ../include -D_FILE_OFFSET_BITS=64'; my $obj = `pkg-config --libs fuse` || '-lfuse'; +my $def = '-Wall -g -ggdb'; +$def .= ' -D__FreeBSD__=10' if $^O eq 'darwin'; WriteMakefile( 'NAME' => 'Fuse', @@ -31,7 +39,7 @@ WriteMakefile( (ABSTRACT_FROM => 'Fuse.pm', # retrieve abstract from module AUTHOR => 'Mark Glines ') : ()), 'LIBS' => [''], # e.g., '-lm' - 'DEFINE' => '-Wall -g -ggdb', # e.g., '-DHAVE_SOMETHING' + 'DEFINE' => $def, # e.g., '-DHAVE_SOMETHING' # Insert -I. if you add *.h files later: 'INC' => $inc, # e.g., '-I/usr/include/other' # Un-comment this if you add C files to link with later: