Harmonize parameter names in ecpg code.
[pgsql.git] / src / include / meson.build
blobe5390df05848774bdc28a3d3cca3c56bdbb376b9
1 pg_config_ext = configure_file(
2   input: 'pg_config_ext.h.meson',
3   output: 'pg_config_ext.h',
4   configuration: cdata,
5   install: true,
6   install_dir: dir_include,
8 configure_files += pg_config_ext
10 pg_config_os = configure_file(
11   output: 'pg_config_os.h',
12   input: files('port/@0@.h'.format(portname)),
13   install: true,
14   install_dir: dir_include,
15   copy: true,
17 configure_files += pg_config_os
19 pg_config = configure_file(
20   output: 'pg_config.h',
21   install: true,
22   install_dir: dir_include,
23   configuration: cdata,
25 configure_files += pg_config
28 config_paths_data = configuration_data()
29 config_paths_data.set_quoted('PGBINDIR', dir_prefix / dir_bin)
30 config_paths_data.set_quoted('PGSHAREDIR', dir_prefix / dir_data)
31 config_paths_data.set_quoted('SYSCONFDIR', dir_prefix / dir_sysconf)
32 config_paths_data.set_quoted('INCLUDEDIR', dir_prefix / dir_include)
33 config_paths_data.set_quoted('PKGINCLUDEDIR', dir_prefix / dir_include_pkg)
34 config_paths_data.set_quoted('INCLUDEDIRSERVER', dir_prefix / dir_include_server)
35 config_paths_data.set_quoted('LIBDIR', dir_prefix / dir_lib)
36 config_paths_data.set_quoted('PKGLIBDIR', dir_prefix / dir_lib_pkg)
37 config_paths_data.set_quoted('LOCALEDIR', dir_prefix / dir_locale)
38 config_paths_data.set_quoted('DOCDIR', dir_prefix / dir_doc)
39 config_paths_data.set_quoted('HTMLDIR', dir_prefix / dir_doc_html)
40 config_paths_data.set_quoted('MANDIR', dir_prefix / dir_man)
43 var_cc = ' '.join(cc.cmd_array())
44 var_cpp = ' '.join(cc.cmd_array() + ['-E'])
45 var_cflags = ' '.join(cflags + cflags_warn)
46 var_cxxflags = ' '.join(cxxflags + cxxflags_warn)
47 var_cppflags = ' '.join(cppflags)
48 var_cflags_sl = '-fPIC' #FIXME
49 var_ldflags = ' '.join(ldflags)
50 var_ldflags_sl = ''.join(ldflags_sl)
51 var_ldflags_ex = '' # FIXME
52 # FIXME - some extensions might directly use symbols from one of libs. If
53 # that symbol isn't used by postgres, and statically linked, it'll cause an
54 # undefined symbol at runtime. And obviously it'll cause problems for
55 # executables, although those are probably less common.
56 var_libs = ''
59 pg_config_paths = configure_file(
60   output: 'pg_config_paths.h',
61   configuration: config_paths_data,
62   install: false,
64 configure_files += pg_config_paths
66 install_headers(
67   'pg_config_manual.h',
68   'postgres_ext.h',
71 install_headers(
72   'libpq/libpq-fs.h',
73   install_dir: dir_include / 'libpq',
76 install_headers(
77   'c.h',
78   'port.h',
79   'postgres_fe.h',
80   install_dir: dir_include_internal
83 install_headers(
84   'libpq/pqcomm.h',
85   install_dir: dir_include_internal / 'libpq',
88 install_headers(
89   'c.h',
90   'fmgr.h',
91   'funcapi.h',
92   'getopt_long.h',
93   'miscadmin.h',
94   'pg_config_manual.h',
95   'pg_getopt.h',
96   'pg_trace.h',
97   'pgstat.h',
98   'pgtar.h',
99   'pgtime.h',
100   'port.h',
101   'postgres.h',
102   'postgres_ext.h',
103   'postgres_fe.h',
104   'windowapi.h',
105   pg_config_ext,
106   pg_config_os,
107   pg_config,
108   install_dir: dir_include_server,
111 subdir('catalog')
112 subdir('nodes')
113 subdir('storage')
114 subdir('utils')
116 header_subdirs = [
117   'access',
118   'catalog',
119   'bootstrap',
120   'commands',
121   'common',
122   'datatype',
123   'executor',
124   'fe_utils',
125   'foreign',
126   'jit',
127   'lib',
128   'libpq',
129   'mb',
130   'nodes',
131   'optimizer',
132   'parser',
133   'partitioning',
134   'postmaster',
135   'regex',
136   'replication',
137   'rewrite',
138   'statistics',
139   'storage',
140   'tcop',
141   'snowball',
142   'tsearch',
143   'utils',
144   'port',
145   'portability',
148 # XXX: installing headers this way has the danger of installing editor files
149 # etc, unfortunately install_subdir() doesn't allow including / excluding by
150 # pattern currently.
151 foreach d : header_subdirs
152   if d == 'catalog'
153     continue
154   endif
155   install_subdir(d, install_dir: dir_include_server,
156                  exclude_files: ['.gitignore', 'meson.build'])
157 endforeach
159 install_subdir('catalog',
160   install_dir: dir_include_server,
161   exclude_files: [
162     '.gitignore',
163     'Makefile',
164     'duplicate_oids',
165     'meson.build',
166     'reformat_dat_file.pl',
167     'renumber_oids.pl',
168     'unused_oids',
169   ] + bki_data,
172 # autoconf generates the file there, ensure we get a conflict
173 generated_sources_ac += {'src/include': ['stamp-h', 'stamp-ext-h']}