Getting the entire configure.cflags variable

Ryan Schmidt ryandesign at macports.org
Thu Oct 2 23:14:58 PDT 2014


On Oct 2, 2014, at 4:24 PM, Sean Farley wrote:
> 
> The petsc port, in an attempt to help users, ignores CFLAGS (and
> friends) from the environment due to many users that accidentally had
> them defined. So, I'm trying to pass the exact same CFLAGS to
> configure.args.

I see their configure script is some python monstrosity and that one of the files it includes contains:


  def resetEnvCompilers(self):
    ignoreEnv = ['CC','CFLAGS','CXX','CXXFLAGS','FC','FCFLAGS','F77','FFLAGS',
                 'F90','F90FLAGS','CPP','CPPFLAGS','CXXCPP','CXXCPPFLAGS',
                 'LDFLAGS','LIBS','MPI_DIR','RM','MAKEFLAGS','AR']
    for envVal in ignoreEnv:
      if envVal in os.environ:
        self.logPrintBox('***** WARNING: '+envVal+' (set to '+os.environ[envVal]+') found in environment variables - ignoring \n use ./configure '+envVal+'=$'+envVal+' if you really want to use that value ******')
        del os.environ[envVal]
    return


Perhaps that can be simply ripped out to allow env vars to work.



More information about the macports-dev mailing list