1use ExtUtils::MakeMaker; 2# See ExtUtils/MakeMaker.pm for details of how to influence 3# the contents of the Makefile that is written. 4 5use Config; 6use strict; 7 8my $lddflags = ""; 9my $inc = ""; 10 11print "osname: $Config{'osname'}\n"; 12if ($Config{'osname'} eq "darwin") 13{ 14 # Mac OS X 15 $lddflags = $Config{lddlflags} . ' -framework CoreFoundation'; 16 $inc = '-I/System/Library/Frameworks/PCSC.framework/Headers/ -I/System/Library/Frameworks/PCSC.framework/PrivateHeaders/'; 17} 18else 19{ 20 if ($Config{'osname'} eq "MSWin32") 21 { 22 # Windows 23 } 24 else 25 { 26 # other Unixes 27 $inc = '`pkg-config --cflags libpcsclite`'; 28 } 29} 30 31print "LDDFLAGS: $lddflags\n"; 32print "INC: $inc\n"; 33 34WriteMakefile( 35 'NAME' => 'Chipcard::PCSC', 36 'VERSION_FROM' => 'PCSC.pm', # finds $VERSION 37 'LIBS' => [''], # e.g., '-lm' 38 'LDDLFLAGS' => $lddflags, 39 'DEFINE' => '-O2 -Wall', # e.g., '-DHAVE_SOMETHING' 40 'INC' => $inc, 41 'PL_FILES' => {}, 42); 43 44