Index: Makefile.PL
--- Makefile.PL.orig	2006-10-25 22:36:34 +0200
+++ Makefile.PL	2006-12-22 15:24:00 +0100
@@ -23,8 +23,9 @@
 grep {/^pari_tgz=(.*?)[\/\\]?$/i	 and $parisrc = $1}	     @ARGV;
 grep {/^force_download$/i	 and $force_download = 1}    @ARGV;
 grep {/^parilib=(.*)$/i		 and $common::parilib = $1}  @ARGV;
+grep {/^parihdr=(.*)$/i		 and $common::parihdr = $1}  @ARGV;
 
-@ARGV = grep !/^((machine|paridir|pari_tgz|parilib)=.*|configure|force_download)$/i, @ARGV;
+@ARGV = grep !/^((machine|paridir|pari_tgz|parilib|parihdr)=.*|configure|force_download)$/i, @ARGV;
 
 $paridir   = find_pari_dir() unless defined $paridir or $parisrc or $force_download;
 ($paridir) = download_and_patch_pari($parisrc, $force_download)
@@ -44,7 +45,7 @@
 EOP
 
 if ($common::parilib) {
-  $pari_version = '2001004';	# XXXX How to get a correct one?
+  $pari_version = '2003001';	# XXXX How to get a correct one?
   $define = '-DNO_HIGHLEVEL_PARI';
   print <<EOP;
 Trying to use existing PARI library (at $common::parilib)
@@ -151,7 +152,7 @@
 # XXXX otherwise segfaults trying to install highlevel functions???
 $define .= ' -DNO_HIGHLEVEL_PARI' if $pari_version >= 2003000;
 
-my $extra_inc = extra_includes($paridir);
+my $extra_inc = $common::parihdr . " " . extra_includes($paridir);
 
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile being created.
