Mercurial > octave
view libinterp/config-features.sh @ 21181:a65b906e25bc
revamp oct-conf.h
* oct-conf.in.cc: New file. Use character strings in a namespace
instead of macros to define configuration info. Omit configuration
info beginning with ENABLE_ since those appear as macros in config.h
* oct.conf.h: New file.
* oct-conf.in.h: Delete.
* config-features.sh: Also recognize macros beginning with ENABLE_
* toplev.cc (octave_config_info): Update to match changes in
oct-conf.h and oct-conf-features.h.
* __init_gnuplot__.cc (have_gnuplot_binar): Likewise.
* libinterp/module.mk: Update for new files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 03 Feb 2016 14:37:13 -0500 |
parents | 2a4f83826024 |
children | 82a44483dbff |
line wrap: on
line source
#! /bin/sh set -e AWK=${AWK:-awk} conffile=$1 cat << EOF // DO NOT EDIT! Generated automatically from $conffile by Make." #include "oct-map.h" #include "ov.h" octave_scalar_map octave_config_features (void) { octave_scalar_map m; EOF $AWK \ '/#define (HAVE|ENABLE)_/ { sub (/(HAVE|ENABLE)_/, "", $2); printf (" m.assign (\"%s\", octave_value (true));\n", $2); } /\/\* #undef (HAVE|ENABLE)_/ { sub (/(HAVE|ENABLE)_/, "", $3); printf (" m.assign (\"%s\", octave_value (false));\n", $3); } { }' $conffile cat << EOF return m; } EOF