Mercurial > octave
annotate build-aux/mk-octave-config-h.sh @ 33584:3fe954c2fd25 default tip @
maint: merge stable to default
author | Rik <rik@octave.org> |
---|---|
date | Mon, 13 May 2024 11:41:11 -0700 |
parents | 3e762379d7d4 |
children | 3bb4422bd982 |
rev | line source |
---|---|
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 #! /bin/sh |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 ######################################################################## |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
4 ## |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
32546
diff
changeset
|
5 ## Copyright (C) 2016-2024 The Octave Project Developers |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
6 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
7 ## See the file COPYRIGHT.md in the top-level directory of this |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
8 ## distribution or <https://octave.org/copyright/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
9 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
10 ## This file is part of Octave. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
11 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
12 ## Octave is free software: you can redistribute it and/or modify it |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
13 ## under the terms of the GNU General Public License as published by |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
14 ## the Free Software Foundation, either version 3 of the License, or |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
15 ## (at your option) any later version. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
16 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
17 ## Octave is distributed in the hope that it will be useful, but |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
18 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
20 ## GNU General Public License for more details. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
21 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
22 ## You should have received a copy of the GNU General Public License |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
23 ## along with Octave; see the file COPYING. If not, see |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
24 ## <https://www.gnu.org/licenses/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
25 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
26 ######################################################################## |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 |
21240
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
28 # Generate a header file that provides the public symbols from Octave's |
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
29 # autoconf-generated config.h file. See the notes at the top of the |
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
30 # generated octave-config.h file for more details. |
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
31 |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
32 SED=${SED:-sed} |
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
33 |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 if [ $# -ne 1 ]; then |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 echo "usage: mk-octave-config-h.sh CONFIG-FILE" 1>&2 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 exit 1 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 config_h_file=$1 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 cat << EOF |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
42 // DO NOT EDIT! Generated by mk-octave-config-h.sh. |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
44 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
45 // |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
32546
diff
changeset
|
46 // Copyright (C) 2016-2024 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
47 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
48 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
49 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
50 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
51 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
52 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
53 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
54 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
55 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
56 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
57 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
58 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
59 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
60 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
61 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
62 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
63 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
64 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
65 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
66 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
67 //////////////////////////////////////////////////////////////////////// |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 |
29987
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
69 // All Octave source files should begin with |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
70 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
71 // #if defined (HAVE_CONFIG_H) |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
72 // # include "config.h" |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
73 // #endif |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
74 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
75 // All public Octave header files should have the form |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
76 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
77 // #if ! defined (INCLUSION_GUARD_SYMBOL) |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
78 // #define INCLUSION_GUARD_SYMBOL 1 |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
79 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
80 // #include "octave-config.h" |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
81 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
82 // ... Contents of header file ... |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
83 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
84 // #endif |
21240
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
85 |
29987
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
86 // In Octave source files, INCLUSION_GUARD_SYMBOL should have the form |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
87 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
88 // octave_NAME_h |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
89 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
90 // with NAME formed from the header file name with '-' replaced by '_'. |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
91 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
92 // It is safe to include octave-config.h unconditionally since it will |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
93 // expand to an empty file if it is included after Octave's |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
94 // autoconf-generated config.h file. |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
95 // |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
96 // Users of Octave's libraries should not need to include octave-config.h |
79b5a8901efd
* mk-octave-config-h.sh: Use '//' for initial comments.
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
97 // since all of Octave's header files already include it. |
21240
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
98 |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
99 #if ! defined (octave_octave_config_h) |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
100 #define octave_octave_config_h 1 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
101 |
21240
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
102 #if ! defined (OCTAVE_AUTOCONFIG_H_INCLUDED) |
30505
e0e22183ffca
Restore building with visibility flags for Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
30488
diff
changeset
|
103 EOF |
e0e22183ffca
Restore building with visibility flags for Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents:
30488
diff
changeset
|
104 |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
105 $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_64.*$\)/# \1/p' $config_h_file |
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
106 $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_BOUNDS_CHECK.*$\)/# \1/p' $config_h_file |
31865
f3a6f41314ed
new configure option, --enable-internal-checks (patch #10226)
Petter Tomner <tomner@kth.se>
parents:
31706
diff
changeset
|
107 $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_INTERNAL_CHECKS.*$\)/# \1/p' $config_h_file |
30580
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
108 $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_LIB_VISIBILITY_FLAGS.*$\)/# \1/p' $config_h_file |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
109 $SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_OPENMP.*$\)/# \1/p' $config_h_file |
30580
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
110 $SED -n 's/#\(\(undef\|define\) OCTAVE_F77_INT_TYPE.*$\)/# \1/p' $config_h_file |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
111 $SED -n 's/#\(\(undef\|define\) OCTAVE_HAVE_LONG_LONG_INT.*$\)/# \1/p' $config_h_file |
30580
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
112 $SED -n 's/#\(\(undef\|define\) OCTAVE_HAVE_OVERLOAD_CHAR_INT8_TYPES.*$\)/# \1/p' $config_h_file |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
113 $SED -n 's/#\(\(undef\|define\) OCTAVE_HAVE_STD_PMR_POLYMORPHIC_ALLOCATOR.*$\)/# \1/p' $config_h_file |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
114 $SED -n 's/#\(\(undef\|define\) OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT.*$\)/# \1/p' $config_h_file |
30580
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
115 $SED -n 's/#\(\(undef\|define\) OCTAVE_IDX_TYPE.*$\)/# \1/p' $config_h_file |
23014
7a9313d27cea
define macros for size of idx_type and f77_int_type
John W. Eaton <jwe@octave.org>
parents:
22990
diff
changeset
|
116 $SED -n 's/#\(\(undef\|define\) OCTAVE_SIZEOF_F77_INT_TYPE.*$\)/# \1/p' $config_h_file |
7a9313d27cea
define macros for size of idx_type and f77_int_type
John W. Eaton <jwe@octave.org>
parents:
22990
diff
changeset
|
117 $SED -n 's/#\(\(undef\|define\) OCTAVE_SIZEOF_IDX_TYPE.*$\)/# \1/p' $config_h_file |
29688
b36e83cdbf05
ensure idx_vector(int) constructor is defined (bug #60531)
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
118 $SED -n 's/#\(\(undef\|define\) OCTAVE_SIZEOF_INT.*$\)/# \1/p' $config_h_file |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
119 $SED -n 's/#\(\(undef\|define\) gid_t.*$\)/# \1/p' $config_h_file |
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
120 $SED -n 's/#\(\(undef\|define\) uid_t.*$\)/# \1/p' $config_h_file |
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
121 $SED -n 's/#\(\(undef\|define\) nlink_t.*$\)/# \1/p' $config_h_file |
22000
f471f513ffd0
also define gid_t, uid_t, and nlink_t in octave-config.h (bug #48332)
John W. Eaton <jwe@octave.org>
parents:
21850
diff
changeset
|
122 |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
21240
diff
changeset
|
123 if grep "#undef HAVE_DEV_T" $config_h_file > /dev/null; then |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
124 cat << EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 typedef short dev_t; |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
126 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
127 else |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
128 cat << EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
129 /* typedef short dev_t; */ |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
130 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
132 |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
21240
diff
changeset
|
133 if grep "#undef HAVE_INO_T" $config_h_file > /dev/null; then |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 cat << EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
135 typedef unsigned long ino_t; |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
136 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 else |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
138 cat << EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
139 /* typedef unsigned long ino_t; */ |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
141 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
142 |
22144
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
143 echo "" |
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
144 |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
145 have_roundl=no |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
21240
diff
changeset
|
146 if grep "#define HAVE_ROUNDL" $config_h_file > /dev/null; then |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 have_roundl=yes |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
148 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
149 |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
150 sizeof_long_double="`$SED -n 's/#define SIZEOF_LONG_DOUBLE \([0-9]*\)/\1/p' $config_h_file`" |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
151 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
152 if test -z "$sizeof_long_double"; then |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
153 echo "mk-octave-config-h.sh: failed to find SIZEOF_LONG_DOUBLE in $config_h_file" 1>&2 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
154 exit 1 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
155 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
156 |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 if test $sizeof_long_double -ge 10 && test $have_roundl = yes; then |
21850
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
158 echo "# define OCTAVE_INT_USE_LONG_DOUBLE 1" |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
159 if test $sizeof_long_double -lt 16; then |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
160 cat << EOF |
21850
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
161 # if (defined (__i386__) || defined (__x86_64__)) && defined (__GNUC__) |
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
162 # define OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED 1 |
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
163 # endif |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 else |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 cat << EOF |
21850
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
167 /* # undef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED */ |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
168 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
169 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 else |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
171 cat << EOF |
21850
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
172 /* # undef OCTAVE_INT_USE_LONG_DOUBLE */ |
0507f0d2135d
indent preprocessor directives in octave-config.h and oct-conf-post.h
John W. Eaton <jwe@octave.org>
parents:
21726
diff
changeset
|
173 /* # undef OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED */ |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
174 EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
175 fi |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
176 |
22144
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
177 echo "" |
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
178 |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
179 $SED -n 's/#\(\(undef\|define\) F77_USES_.*$\)/# \1/p' $config_h_file |
22144
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
180 |
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
181 echo "" |
469a4142c4cf
* mk-octave-config-h.sh: Improve readability of output.
John W. Eaton <jwe@octave.org>
parents:
22143
diff
changeset
|
182 |
22468
6f5cde55e225
build: ensure GNU sed is used in mk-octave-config-h.sh
Mike Miller <mtmiller@octave.org>
parents:
22144
diff
changeset
|
183 $SED -n 's/#\(\(undef\|define\) F77_FUNC.*$\)/# \1/p' $config_h_file |
21357
d00efda9bb92
Insert F77_FUNC defines into octave-config.h (Bug #47250)
John D
parents:
21354
diff
changeset
|
184 |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
185 cat << EOF |
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
186 |
30580
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
187 /* Enable inline functions or typedefs that provide access to |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
188 symbols that have been moved to the octave namespace so that |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
189 users of Octave may continue to access symbols using the |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
190 deprecated names. */ |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
191 # define OCTAVE_PROVIDE_DEPRECATED_SYMBOLS 1 |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
192 |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
193 # include "oct-conf-post-public.h" |
fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
194 |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
195 #endif |
21240
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
196 |
7af5ca01ecac
allow octave-config.h to be included unconditionally
John W. Eaton <jwe@octave.org>
parents:
21239
diff
changeset
|
197 #endif |
21229
a83e7a384ee0
create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
198 EOF |