[SAMBA4][PATCH] configure checks for IRIX

James Peach jpeach at samba.org
Thu Sep 8 22:47:29 GMT 2005


On Thu, 2005-09-08 at 11:24 +0200, Jelmer Vernooij wrote:
> Hi James,
> 
> On Thu, Sep 08, 2005 at 02:37:40PM +1000, James Peach wrote about '[SAMBA4][PATCH] configure checks for IRIX':
> > Hi all,
> 
> > The attached patch gets IRIX past the configure stage of samba4. The
> > main changes are to work out whether the C compiler needs the -c99
> > option to put it into C99 mode, and to use the configure-detected
> > preprocessor in yapp.
> 
> > If there are no problems, I'll check this is in a couple of days.
> > Index: branches/SAMBA_4_0/source/pidl/idl.yp
> > ===================================================================
> > --- branches/SAMBA_4_0/source/pidl/idl.yp	(revision 10060)
> > +++ branches/SAMBA_4_0/source/pidl/idl.yp	(working copy)
> > @@ -319,6 +319,7 @@
> >  # start code
> >  %%
> 
> > +use config qw(%config);
> >  use Parse::Pidl::Util;
> 
> >  #####################################################################
> > @@ -422,7 +423,7 @@
> >  	undef $/;
> >  	my $cpp = $ENV{CPP};
> >  	if (! defined $cpp) {
> > -		$cpp = "cpp"
> > +		$cpp = $config::config{'CPP'};
> >  	}
> >  	my $data = `$cpp -D__PIDL__ -xc $filename`;
> >  	$/ = $saved_delim;
> > Index: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
> > ===================================================================
> > --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm	(revision 10060)
> > +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm	(working copy)
> > @@ -2672,6 +2672,7 @@
> >  #line 320 "pidl/idl.yp"
> 
> 
> > +use config qw(%config);
> >  use Parse::Pidl::Util;
> 
> >  #####################################################################
> > @@ -2775,7 +2776,7 @@
> >  	undef $/;
> >  	my $cpp = $ENV{CPP};
> >  	if (! defined $cpp) {
> > -		$cpp = "cpp"
> > +		$cpp = $config::config{'CPP'};
> >  	}
> >  	my $data = `$cpp -D__PIDL__ -xc $filename`;
> >  	$/ = $saved_delim;
> 
> Please set $ENV{"CPP"} rather then making pidl depend on config.pm.
> Pidl can currently run stand-alone and this would make it depend on
> Samba's configure.

Yeh, after I posted the patch, I noticed how the Makefile sets CPP in
the environment. However, IMHO, if you detect CPP, then pidl should use
it either by requiring config.pm or by using @CPP at . I don't see how
requiring users to remember to run CPP=blah pidl really helps is to
stand alone. The dependency is still there.

-- 
James Peach | jpeach at samba.org



More information about the samba-technical mailing list