# CIT_PROG_PYCONFIG # ----------------- # Provide a simple Python script which generates a Python module to # expose our package configuration, similar to Python's # distutils.sysconfig. AC_DEFUN([CIT_PROG_PYCONFIG], [ # $Id: cit_prog_mpicxx.m4,v 1.1 2005/09/09 16:12:01 leif Exp $ PYCONFIG='$(top_builddir)/pyconfig' AC_SUBST(PYCONFIG) ofile=pyconfig cfgfile="${ofile}T" trap "rm \"$cfgfile\"; exit 1" 1 2 15 rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile]) cat >"$cfgfile" <>f, "#!/usr/bin/env python" print >>f print >>f, "config =", config_vars print >>f print >>f, "makefile =", makefile_vars print >>f print >>f, "# end of file" f.close() # end of file] END_OF_PYTHON mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ])dnl CIT_PROG_PYCONFIG dnl end of file