Codebase list virtualpg / abb0e4d
New upstream version 2.0.0~rc0 Bas Couwenberg 5 years ago
10 changed file(s) with 3536 addition(s) and 462 deletion(s). Raw diff Collapse all Expand all
0 # Doxyfile 1.7.3
1
2 # This file describes the settings to be used by the documentation system
3 # doxygen (www.doxygen.org) for a project.
4 #
5 # All text after a hash (#) is considered a comment and will be ignored.
6 # The format is:
7 # TAG = value [value, ...]
8 # For lists items can also be appended using:
9 # TAG += value [value, ...]
10 # Values that contain spaces should be placed between quotes (" ").
11
12 #---------------------------------------------------------------------------
13 # Project related configuration options
14 #---------------------------------------------------------------------------
15
16 # This tag specifies the encoding used for all characters in the config file
17 # that follow. The default is UTF-8 which is also the encoding used for all
18 # text before the first occurrence of this tag. Doxygen uses libiconv (or the
19 # iconv built into libc) for the transcoding. See
20 # http://www.gnu.org/software/libiconv for the list of possible encodings.
21
22 DOXYFILE_ENCODING = UTF-8
23
24 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded
25 # by quotes) that should identify the project.
26
27 PROJECT_NAME = libvirtualpg
28
29 # The PROJECT_NUMBER tag can be used to enter a project or revision number.
30 # This could be handy for archiving the generated documentation or
31 # if some version control system is used.
32
33 PROJECT_NUMBER = @VERSION@
34
35 # Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
36
37 PROJECT_BRIEF =
38
39 # With the PROJECT_LOGO tag one can specify an logo or icon that is
40 # included in the documentation. The maximum height of the logo should not
41 # exceed 55 pixels and the maximum width should not exceed 200 pixels.
42 # Doxygen will copy the logo to the output directory.
43
44 PROJECT_LOGO =
45
46 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
47 # base path where the generated documentation will be put.
48 # If a relative path is entered, it will be relative to the location
49 # where doxygen was started. If left blank the current directory will be used.
50
51 OUTPUT_DIRECTORY =
52
53 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
54 # 4096 sub-directories (in 2 levels) under the output directory of each output
55 # format and will distribute the generated files over these directories.
56 # Enabling this option can be useful when feeding doxygen a huge amount of
57 # source files, where putting all generated files in the same directory would
58 # otherwise cause performance problems for the file system.
59
60 CREATE_SUBDIRS = NO
61
62 # The OUTPUT_LANGUAGE tag is used to specify the language in which all
63 # documentation generated by doxygen is written. Doxygen will use this
64 # information to generate all constant output in the proper language.
65 # The default language is English, other supported languages are:
66 # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
67 # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
68 # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
69 # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
70 # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
71 # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
72
73 OUTPUT_LANGUAGE = English
74
75 # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
76 # include brief member descriptions after the members that are listed in
77 # the file and class documentation (similar to JavaDoc).
78 # Set to NO to disable this.
79
80 BRIEF_MEMBER_DESC = YES
81
82 # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
83 # the brief description of a member or function before the detailed description.
84 # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
85 # brief descriptions will be completely suppressed.
86
87 REPEAT_BRIEF = YES
88
89 # This tag implements a quasi-intelligent brief description abbreviator
90 # that is used to form the text in various listings. Each string
91 # in this list, if found as the leading text of the brief description, will be
92 # stripped from the text and the result after processing the whole list, is
93 # used as the annotated text. Otherwise, the brief description is used as-is.
94 # If left blank, the following values are used ("$name" is automatically
95 # replaced with the name of the entity): "The $name class" "The $name widget"
96 # "The $name file" "is" "provides" "specifies" "contains"
97 # "represents" "a" "an" "the"
98
99 ABBREVIATE_BRIEF =
100
101 # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
102 # Doxygen will generate a detailed section even if there is only a brief
103 # description.
104
105 ALWAYS_DETAILED_SEC = NO
106
107 # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
108 # inherited members of a class in the documentation of that class as if those
109 # members were ordinary class members. Constructors, destructors and assignment
110 # operators of the base classes will not be shown.
111
112 INLINE_INHERITED_MEMB = NO
113
114 # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
115 # path before files name in the file list and in the header files. If set
116 # to NO the shortest path that makes the file name unique will be used.
117
118 FULL_PATH_NAMES = YES
119
120 # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
121 # can be used to strip a user-defined part of the path. Stripping is
122 # only done if one of the specified strings matches the left-hand part of
123 # the path. The tag can be used to show relative paths in the file list.
124 # If left blank the directory from which doxygen is run is used as the
125 # path to strip.
126
127 STRIP_FROM_PATH =
128
129 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
130 # the path mentioned in the documentation of a class, which tells
131 # the reader which header file to include in order to use a class.
132 # If left blank only the name of the header file containing the class
133 # definition is used. Otherwise one should specify the include paths that
134 # are normally passed to the compiler using the -I flag.
135
136 STRIP_FROM_INC_PATH =
137
138 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
139 # (but less readable) file names. This can be useful if your file system
140 # doesn't support long names like on DOS, Mac, or CD-ROM.
141
142 SHORT_NAMES = NO
143
144 # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
145 # will interpret the first line (until the first dot) of a JavaDoc-style
146 # comment as the brief description. If set to NO, the JavaDoc
147 # comments will behave just like regular Qt-style comments
148 # (thus requiring an explicit @brief command for a brief description.)
149
150 JAVADOC_AUTOBRIEF = YES
151
152 # If the QT_AUTOBRIEF tag is set to YES then Doxygen will
153 # interpret the first line (until the first dot) of a Qt-style
154 # comment as the brief description. If set to NO, the comments
155 # will behave just like regular Qt-style comments (thus requiring
156 # an explicit \brief command for a brief description.)
157
158 QT_AUTOBRIEF = NO
159
160 # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
161 # treat a multi-line C++ special comment block (i.e. a block of //! or ///
162 # comments) as a brief description. This used to be the default behaviour.
163 # The new default is to treat a multi-line C++ comment block as a detailed
164 # description. Set this tag to YES if you prefer the old behaviour instead.
165
166 MULTILINE_CPP_IS_BRIEF = NO
167
168 # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
169 # member inherits the documentation from any documented member that it
170 # re-implements.
171
172 INHERIT_DOCS = YES
173
174 # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
175 # a new page for each member. If set to NO, the documentation of a member will
176 # be part of the file/class/namespace that contains it.
177
178 SEPARATE_MEMBER_PAGES = NO
179
180 # The TAB_SIZE tag can be used to set the number of spaces in a tab.
181 # Doxygen uses this value to replace tabs by spaces in code fragments.
182
183 TAB_SIZE = 8
184
185 # This tag can be used to specify a number of aliases that acts
186 # as commands in the documentation. An alias has the form "name=value".
187 # For example adding "sideeffect=\par Side Effects:\n" will allow you to
188 # put the command \sideeffect (or @sideeffect) in the documentation, which
189 # will result in a user-defined paragraph with heading "Side Effects:".
190 # You can put \n's in the value part of an alias to insert newlines.
191
192 ALIASES =
193
194 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
195 # sources only. Doxygen will then generate output that is more tailored for C.
196 # For instance, some of the names that are used will be different. The list
197 # of all members will be omitted, etc.
198
199 OPTIMIZE_OUTPUT_FOR_C = YES
200
201 # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
202 # sources only. Doxygen will then generate output that is more tailored for
203 # Java. For instance, namespaces will be presented as packages, qualified
204 # scopes will look different, etc.
205
206 OPTIMIZE_OUTPUT_JAVA = NO
207
208 # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
209 # sources only. Doxygen will then generate output that is more tailored for
210 # Fortran.
211
212 OPTIMIZE_FOR_FORTRAN = NO
213
214 # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
215 # sources. Doxygen will then generate output that is tailored for
216 # VHDL.
217
218 OPTIMIZE_OUTPUT_VHDL = NO
219
220 # Doxygen selects the parser to use depending on the extension of the files it
221 # parses. With this tag you can assign which parser to use for a given extension.
222 # Doxygen has a built-in mapping, but you can override or extend it using this
223 # tag. The format is ext=language, where ext is a file extension, and language
224 # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
225 # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
226 # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
227 # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
228 # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
229
230 EXTENSION_MAPPING =
231
232 # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
233 # to include (a tag file for) the STL sources as input, then you should
234 # set this tag to YES in order to let doxygen match functions declarations and
235 # definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
236 # func(std::string) {}). This also makes the inheritance and collaboration
237 # diagrams that involve STL classes more complete and accurate.
238
239 BUILTIN_STL_SUPPORT = NO
240
241 # If you use Microsoft's C++/CLI language, you should set this option to YES to
242 # enable parsing support.
243
244 CPP_CLI_SUPPORT = NO
245
246 # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
247 # Doxygen will parse them like normal C++ but will assume all classes use public
248 # instead of private inheritance when no explicit protection keyword is present.
249
250 SIP_SUPPORT = NO
251
252 # For Microsoft's IDL there are propget and propput attributes to indicate getter
253 # and setter methods for a property. Setting this option to YES (the default)
254 # will make doxygen replace the get and set methods by a property in the
255 # documentation. This will only work if the methods are indeed getting or
256 # setting a simple type. If this is not the case, or you want to show the
257 # methods anyway, you should set this option to NO.
258
259 IDL_PROPERTY_SUPPORT = YES
260
261 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
262 # tag is set to YES, then doxygen will reuse the documentation of the first
263 # member in the group (if any) for the other members of the group. By default
264 # all members of a group must be documented explicitly.
265
266 DISTRIBUTE_GROUP_DOC = NO
267
268 # Set the SUBGROUPING tag to YES (the default) to allow class member groups of
269 # the same type (for instance a group of public functions) to be put as a
270 # subgroup of that type (e.g. under the Public Functions section). Set it to
271 # NO to prevent subgrouping. Alternatively, this can be done per class using
272 # the \nosubgrouping command.
273
274 SUBGROUPING = YES
275
276 # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
277 # is documented as struct, union, or enum with the name of the typedef. So
278 # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
279 # with name TypeT. When disabled the typedef will appear as a member of a file,
280 # namespace, or class. And the struct will be named TypeS. This can typically
281 # be useful for C code in case the coding convention dictates that all compound
282 # types are typedef'ed and only the typedef is referenced, never the tag name.
283
284 TYPEDEF_HIDES_STRUCT = NO
285
286 # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
287 # determine which symbols to keep in memory and which to flush to disk.
288 # When the cache is full, less often used symbols will be written to disk.
289 # For small to medium size projects (<1000 input files) the default value is
290 # probably good enough. For larger projects a too small cache size can cause
291 # doxygen to be busy swapping symbols to and from disk most of the time
292 # causing a significant performance penalty.
293 # If the system has enough physical memory increasing the cache will improve the
294 # performance by keeping more symbols in memory. Note that the value works on
295 # a logarithmic scale so increasing the size by one will roughly double the
296 # memory usage. The cache size is given by this formula:
297 # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
298 # corresponding to a cache size of 2^16 = 65536 symbols
299
300 SYMBOL_CACHE_SIZE = 0
301
302 #---------------------------------------------------------------------------
303 # Build related configuration options
304 #---------------------------------------------------------------------------
305
306 # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
307 # documentation are documented, even if no documentation was available.
308 # Private class members and static file members will be hidden unless
309 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
310
311 EXTRACT_ALL = NO
312
313 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
314 # will be included in the documentation.
315
316 EXTRACT_PRIVATE = NO
317
318 # If the EXTRACT_STATIC tag is set to YES all static members of a file
319 # will be included in the documentation.
320
321 EXTRACT_STATIC = NO
322
323 # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
324 # defined locally in source files will be included in the documentation.
325 # If set to NO only classes defined in header files are included.
326
327 EXTRACT_LOCAL_CLASSES = YES
328
329 # This flag is only useful for Objective-C code. When set to YES local
330 # methods, which are defined in the implementation section but not in
331 # the interface are included in the documentation.
332 # If set to NO (the default) only methods in the interface are included.
333
334 EXTRACT_LOCAL_METHODS = NO
335
336 # If this flag is set to YES, the members of anonymous namespaces will be
337 # extracted and appear in the documentation as a namespace called
338 # 'anonymous_namespace{file}', where file will be replaced with the base
339 # name of the file that contains the anonymous namespace. By default
340 # anonymous namespaces are hidden.
341
342 EXTRACT_ANON_NSPACES = NO
343
344 # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
345 # undocumented members of documented classes, files or namespaces.
346 # If set to NO (the default) these members will be included in the
347 # various overviews, but no documentation section is generated.
348 # This option has no effect if EXTRACT_ALL is enabled.
349
350 HIDE_UNDOC_MEMBERS = NO
351
352 # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
353 # undocumented classes that are normally visible in the class hierarchy.
354 # If set to NO (the default) these classes will be included in the various
355 # overviews. This option has no effect if EXTRACT_ALL is enabled.
356
357 HIDE_UNDOC_CLASSES = NO
358
359 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
360 # friend (class|struct|union) declarations.
361 # If set to NO (the default) these declarations will be included in the
362 # documentation.
363
364 HIDE_FRIEND_COMPOUNDS = NO
365
366 # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
367 # documentation blocks found inside the body of a function.
368 # If set to NO (the default) these blocks will be appended to the
369 # function's detailed documentation block.
370
371 HIDE_IN_BODY_DOCS = NO
372
373 # The INTERNAL_DOCS tag determines if documentation
374 # that is typed after a \internal command is included. If the tag is set
375 # to NO (the default) then the documentation will be excluded.
376 # Set it to YES to include the internal documentation.
377
378 INTERNAL_DOCS = NO
379
380 # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
381 # file names in lower-case letters. If set to YES upper-case letters are also
382 # allowed. This is useful if you have classes or files whose names only differ
383 # in case and if your file system supports case sensitive file names. Windows
384 # and Mac users are advised to set this option to NO.
385
386 CASE_SENSE_NAMES = YES
387
388 # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
389 # will show members with their full class and namespace scopes in the
390 # documentation. If set to YES the scope will be hidden.
391
392 HIDE_SCOPE_NAMES = NO
393
394 # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
395 # will put a list of the files that are included by a file in the documentation
396 # of that file.
397
398 SHOW_INCLUDE_FILES = YES
399
400 # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
401 # will list include files with double quotes in the documentation
402 # rather than with sharp brackets.
403
404 FORCE_LOCAL_INCLUDES = NO
405
406 # If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
407 # is inserted in the documentation for inline members.
408
409 INLINE_INFO = YES
410
411 # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
412 # will sort the (detailed) documentation of file and class members
413 # alphabetically by member name. If set to NO the members will appear in
414 # declaration order.
415
416 SORT_MEMBER_DOCS = YES
417
418 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
419 # brief documentation of file, namespace and class members alphabetically
420 # by member name. If set to NO (the default) the members will appear in
421 # declaration order.
422
423 SORT_BRIEF_DOCS = NO
424
425 # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
426 # will sort the (brief and detailed) documentation of class members so that
427 # constructors and destructors are listed first. If set to NO (the default)
428 # the constructors will appear in the respective orders defined by
429 # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
430 # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
431 # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
432
433 SORT_MEMBERS_CTORS_1ST = NO
434
435 # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
436 # hierarchy of group names into alphabetical order. If set to NO (the default)
437 # the group names will appear in their defined order.
438
439 SORT_GROUP_NAMES = NO
440
441 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
442 # sorted by fully-qualified names, including namespaces. If set to
443 # NO (the default), the class list will be sorted only by class name,
444 # not including the namespace part.
445 # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
446 # Note: This option applies only to the class list, not to the
447 # alphabetical list.
448
449 SORT_BY_SCOPE_NAME = NO
450
451 # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a
452 # match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
453 # will still accept a match between prototype and implementation in such cases.
454
455 STRICT_PROTO_MATCHING = NO
456
457 # The GENERATE_TODOLIST tag can be used to enable (YES) or
458 # disable (NO) the todo list. This list is created by putting \todo
459 # commands in the documentation.
460
461 GENERATE_TODOLIST = YES
462
463 # The GENERATE_TESTLIST tag can be used to enable (YES) or
464 # disable (NO) the test list. This list is created by putting \test
465 # commands in the documentation.
466
467 GENERATE_TESTLIST = YES
468
469 # The GENERATE_BUGLIST tag can be used to enable (YES) or
470 # disable (NO) the bug list. This list is created by putting \bug
471 # commands in the documentation.
472
473 GENERATE_BUGLIST = YES
474
475 # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
476 # disable (NO) the deprecated list. This list is created by putting
477 # \deprecated commands in the documentation.
478
479 GENERATE_DEPRECATEDLIST= YES
480
481 # The ENABLED_SECTIONS tag can be used to enable conditional
482 # documentation sections, marked by \if sectionname ... \endif.
483
484 ENABLED_SECTIONS =
485
486 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
487 # the initial value of a variable or macro consists of for it to appear in
488 # the documentation. If the initializer consists of more lines than specified
489 # here it will be hidden. Use a value of 0 to hide initializers completely.
490 # The appearance of the initializer of individual variables and macros in the
491 # documentation can be controlled using \showinitializer or \hideinitializer
492 # command in the documentation regardless of this setting.
493
494 MAX_INITIALIZER_LINES = 30
495
496 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated
497 # at the bottom of the documentation of classes and structs. If set to YES the
498 # list will mention the files that were used to generate the documentation.
499
500 SHOW_USED_FILES = YES
501
502 # If the sources in your project are distributed over multiple directories
503 # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
504 # in the documentation. The default is NO.
505
506 SHOW_DIRECTORIES = NO
507
508 # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
509 # This will remove the Files entry from the Quick Index and from the
510 # Folder Tree View (if specified). The default is YES.
511
512 SHOW_FILES = YES
513
514 # Set the SHOW_NAMESPACES tag to NO to disable the generation of the
515 # Namespaces page.
516 # This will remove the Namespaces entry from the Quick Index
517 # and from the Folder Tree View (if specified). The default is YES.
518
519 SHOW_NAMESPACES = YES
520
521 # The FILE_VERSION_FILTER tag can be used to specify a program or script that
522 # doxygen should invoke to get the current version for each file (typically from
523 # the version control system). Doxygen will invoke the program by executing (via
524 # popen()) the command <command> <input-file>, where <command> is the value of
525 # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
526 # provided by doxygen. Whatever the program writes to standard output
527 # is used as the file version. See the manual for examples.
528
529 FILE_VERSION_FILTER =
530
531 # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
532 # by doxygen. The layout file controls the global structure of the generated
533 # output files in an output format independent way. The create the layout file
534 # that represents doxygen's defaults, run doxygen with the -l option.
535 # You can optionally specify a file name after the option, if omitted
536 # DoxygenLayout.xml will be used as the name of the layout file.
537
538 LAYOUT_FILE =
539
540 #---------------------------------------------------------------------------
541 # configuration options related to warning and progress messages
542 #---------------------------------------------------------------------------
543
544 # The QUIET tag can be used to turn on/off the messages that are generated
545 # by doxygen. Possible values are YES and NO. If left blank NO is used.
546
547 QUIET = NO
548
549 # The WARNINGS tag can be used to turn on/off the warning messages that are
550 # generated by doxygen. Possible values are YES and NO. If left blank
551 # NO is used.
552
553 WARNINGS = YES
554
555 # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
556 # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
557 # automatically be disabled.
558
559 WARN_IF_UNDOCUMENTED = YES
560
561 # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
562 # potential errors in the documentation, such as not documenting some
563 # parameters in a documented function, or documenting parameters that
564 # don't exist or using markup commands wrongly.
565
566 WARN_IF_DOC_ERROR = YES
567
568 # The WARN_NO_PARAMDOC option can be enabled to get warnings for
569 # functions that are documented, but have no documentation for their parameters
570 # or return value. If set to NO (the default) doxygen will only warn about
571 # wrong or incomplete parameter documentation, but not about the absence of
572 # documentation.
573
574 WARN_NO_PARAMDOC = NO
575
576 # The WARN_FORMAT tag determines the format of the warning messages that
577 # doxygen can produce. The string should contain the $file, $line, and $text
578 # tags, which will be replaced by the file and line number from which the
579 # warning originated and the warning text. Optionally the format may contain
580 # $version, which will be replaced by the version of the file (if it could
581 # be obtained via FILE_VERSION_FILTER)
582
583 WARN_FORMAT = "$file:$line: $text"
584
585 # The WARN_LOGFILE tag can be used to specify a file to which warning
586 # and error messages should be written. If left blank the output is written
587 # to stderr.
588
589 WARN_LOGFILE =
590
591 #---------------------------------------------------------------------------
592 # configuration options related to the input files
593 #---------------------------------------------------------------------------
594
595 # The INPUT tag can be used to specify the files and/or directories that contain
596 # documented source files. You may enter file names like "myfile.cpp" or
597 # directories like "/usr/src/myproject". Separate the files or directories
598 # with spaces.
599
600 INPUT = virtualpg.h \
601 mainpage.doxy
602
603 # This tag can be used to specify the character encoding of the source files
604 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
605 # also the default input encoding. Doxygen uses libiconv (or the iconv built
606 # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
607 # the list of possible encodings.
608
609 INPUT_ENCODING = UTF-8
610
611 # If the value of the INPUT tag contains directories, you can use the
612 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
613 # and *.h) to filter out the source-files in the directories. If left
614 # blank the following patterns are tested:
615 # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
616 # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
617 # *.f90 *.f *.for *.vhd *.vhdl
618
619 FILE_PATTERNS =
620
621 # The RECURSIVE tag can be used to turn specify whether or not subdirectories
622 # should be searched for input files as well. Possible values are YES and NO.
623 # If left blank NO is used.
624
625 RECURSIVE = NO
626
627 # The EXCLUDE tag can be used to specify files and/or directories that should
628 # excluded from the INPUT source files. This way you can easily exclude a
629 # subdirectory from a directory tree whose root is specified with the INPUT tag.
630
631 EXCLUDE =
632
633 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
634 # directories that are symbolic links (a Unix file system feature) are excluded
635 # from the input.
636
637 EXCLUDE_SYMLINKS = NO
638
639 # If the value of the INPUT tag contains directories, you can use the
640 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
641 # certain files from those directories. Note that the wildcards are matched
642 # against the file with absolute path, so to exclude all test directories
643 # for example use the pattern */test/*
644
645 EXCLUDE_PATTERNS =
646
647 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
648 # (namespaces, classes, functions, etc.) that should be excluded from the
649 # output. The symbol name can be a fully qualified name, a word, or if the
650 # wildcard * is used, a substring. Examples: ANamespace, AClass,
651 # AClass::ANamespace, ANamespace::*Test
652
653 EXCLUDE_SYMBOLS =
654
655 # The EXAMPLE_PATH tag can be used to specify one or more files or
656 # directories that contain example code fragments that are included (see
657 # the \include command).
658
659 EXAMPLE_PATH = examples
660
661 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
662 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
663 # and *.h) to filter out the source-files in the directories. If left
664 # blank all files are included.
665
666 EXAMPLE_PATTERNS =
667
668 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
669 # searched for input files to be used with the \include or \dontinclude
670 # commands irrespective of the value of the RECURSIVE tag.
671 # Possible values are YES and NO. If left blank NO is used.
672
673 EXAMPLE_RECURSIVE = NO
674
675 # The IMAGE_PATH tag can be used to specify one or more files or
676 # directories that contain image that are included in the documentation (see
677 # the \image command).
678
679 IMAGE_PATH = images
680
681 # The INPUT_FILTER tag can be used to specify a program that doxygen should
682 # invoke to filter for each input file. Doxygen will invoke the filter program
683 # by executing (via popen()) the command <filter> <input-file>, where <filter>
684 # is the value of the INPUT_FILTER tag, and <input-file> is the name of an
685 # input file. Doxygen will then use the output that the filter program writes
686 # to standard output.
687 # If FILTER_PATTERNS is specified, this tag will be
688 # ignored.
689
690 INPUT_FILTER =
691
692 # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
693 # basis.
694 # Doxygen will compare the file name with each pattern and apply the
695 # filter if there is a match.
696 # The filters are a list of the form:
697 # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
698 # info on how filters are used. If FILTER_PATTERNS is empty or if
699 # non of the patterns match the file name, INPUT_FILTER is applied.
700
701 FILTER_PATTERNS =
702
703 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
704 # INPUT_FILTER) will be used to filter the input files when producing source
705 # files to browse (i.e. when SOURCE_BROWSER is set to YES).
706
707 FILTER_SOURCE_FILES = NO
708
709 # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
710 # pattern. A pattern will override the setting for FILTER_PATTERN (if any)
711 # and it is also possible to disable source filtering for a specific pattern
712 # using *.ext= (so without naming a filter). This option only has effect when
713 # FILTER_SOURCE_FILES is enabled.
714
715 FILTER_SOURCE_PATTERNS =
716
717 #---------------------------------------------------------------------------
718 # configuration options related to source browsing
719 #---------------------------------------------------------------------------
720
721 # If the SOURCE_BROWSER tag is set to YES then a list of source files will
722 # be generated. Documented entities will be cross-referenced with these sources.
723 # Note: To get rid of all source code in the generated output, make sure also
724 # VERBATIM_HEADERS is set to NO.
725
726 SOURCE_BROWSER = NO
727
728 # Setting the INLINE_SOURCES tag to YES will include the body
729 # of functions and classes directly in the documentation.
730
731 INLINE_SOURCES = NO
732
733 # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
734 # doxygen to hide any special comment blocks from generated source code
735 # fragments. Normal C and C++ comments will always remain visible.
736
737 STRIP_CODE_COMMENTS = YES
738
739 # If the REFERENCED_BY_RELATION tag is set to YES
740 # then for each documented function all documented
741 # functions referencing it will be listed.
742
743 REFERENCED_BY_RELATION = NO
744
745 # If the REFERENCES_RELATION tag is set to YES
746 # then for each documented function all documented entities
747 # called/used by that function will be listed.
748
749 REFERENCES_RELATION = NO
750
751 # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
752 # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
753 # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
754 # link to the source code.
755 # Otherwise they will link to the documentation.
756
757 REFERENCES_LINK_SOURCE = YES
758
759 # If the USE_HTAGS tag is set to YES then the references to source code
760 # will point to the HTML generated by the htags(1) tool instead of doxygen
761 # built-in source browser. The htags tool is part of GNU's global source
762 # tagging system (see http://www.gnu.org/software/global/global.html). You
763 # will need version 4.8.6 or higher.
764
765 USE_HTAGS = NO
766
767 # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
768 # will generate a verbatim copy of the header file for each class for
769 # which an include is specified. Set to NO to disable this.
770
771 VERBATIM_HEADERS = YES
772
773 #---------------------------------------------------------------------------
774 # configuration options related to the alphabetical class index
775 #---------------------------------------------------------------------------
776
777 # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
778 # of all compounds will be generated. Enable this if the project
779 # contains a lot of classes, structs, unions or interfaces.
780
781 ALPHABETICAL_INDEX = YES
782
783 # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
784 # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
785 # in which this list will be split (can be a number in the range [1..20])
786
787 COLS_IN_ALPHA_INDEX = 5
788
789 # In case all classes in a project start with a common prefix, all
790 # classes will be put under the same header in the alphabetical index.
791 # The IGNORE_PREFIX tag can be used to specify one or more prefixes that
792 # should be ignored while generating the index headers.
793
794 IGNORE_PREFIX =
795
796 #---------------------------------------------------------------------------
797 # configuration options related to the HTML output
798 #---------------------------------------------------------------------------
799
800 # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
801 # generate HTML output.
802
803 GENERATE_HTML = YES
804
805 # The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
806 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
807 # put in front of it. If left blank `html' will be used as the default path.
808
809 HTML_OUTPUT = html
810
811 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
812 # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
813 # doxygen will generate files with .html extension.
814
815 HTML_FILE_EXTENSION = .html
816
817 # The HTML_HEADER tag can be used to specify a personal HTML header for
818 # each generated HTML page. If it is left blank doxygen will generate a
819 # standard header.
820
821 HTML_HEADER =
822
823 # The HTML_FOOTER tag can be used to specify a personal HTML footer for
824 # each generated HTML page. If it is left blank doxygen will generate a
825 # standard footer.
826
827 HTML_FOOTER =
828
829 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
830 # style sheet that is used by each HTML page. It can be used to
831 # fine-tune the look of the HTML output. If the tag is left blank doxygen
832 # will generate a default style sheet. Note that doxygen will try to copy
833 # the style sheet file to the HTML output directory, so don't put your own
834 # stylesheet in the HTML output directory as well, or it will be erased!
835
836 HTML_STYLESHEET =
837
838 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
839 # Doxygen will adjust the colors in the stylesheet and background images
840 # according to this color. Hue is specified as an angle on a colorwheel,
841 # see http://en.wikipedia.org/wiki/Hue for more information.
842 # For instance the value 0 represents red, 60 is yellow, 120 is green,
843 # 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
844 # The allowed range is 0 to 359.
845
846 HTML_COLORSTYLE_HUE = 220
847
848 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
849 # the colors in the HTML output. For a value of 0 the output will use
850 # grayscales only. A value of 255 will produce the most vivid colors.
851
852 HTML_COLORSTYLE_SAT = 100
853
854 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
855 # the luminance component of the colors in the HTML output. Values below
856 # 100 gradually make the output lighter, whereas values above 100 make
857 # the output darker. The value divided by 100 is the actual gamma applied,
858 # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
859 # and 100 does not change the gamma.
860
861 HTML_COLORSTYLE_GAMMA = 80
862
863 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
864 # page will contain the date and time when the page was generated. Setting
865 # this to NO can help when comparing the output of multiple runs.
866
867 HTML_TIMESTAMP = YES
868
869 # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
870 # files or namespaces will be aligned in HTML using tables. If set to
871 # NO a bullet list will be used.
872
873 HTML_ALIGN_MEMBERS = YES
874
875 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
876 # documentation will contain sections that can be hidden and shown after the
877 # page has loaded. For this to work a browser that supports
878 # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
879 # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
880
881 HTML_DYNAMIC_SECTIONS = NO
882
883 # If the GENERATE_DOCSET tag is set to YES, additional index files
884 # will be generated that can be used as input for Apple's Xcode 3
885 # integrated development environment, introduced with OSX 10.5 (Leopard).
886 # To create a documentation set, doxygen will generate a Makefile in the
887 # HTML output directory. Running make will produce the docset in that
888 # directory and running "make install" will install the docset in
889 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
890 # it at startup.
891 # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
892 # for more information.
893
894 GENERATE_DOCSET = NO
895
896 # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
897 # feed. A documentation feed provides an umbrella under which multiple
898 # documentation sets from a single provider (such as a company or product suite)
899 # can be grouped.
900
901 DOCSET_FEEDNAME = "Doxygen generated docs"
902
903 # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
904 # should uniquely identify the documentation set bundle. This should be a
905 # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
906 # will append .docset to the name.
907
908 DOCSET_BUNDLE_ID = org.doxygen.Project
909
910 # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
911 # the documentation publisher. This should be a reverse domain-name style
912 # string, e.g. com.mycompany.MyDocSet.documentation.
913
914 DOCSET_PUBLISHER_ID = org.doxygen.Publisher
915
916 # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
917
918 DOCSET_PUBLISHER_NAME = Publisher
919
920 # If the GENERATE_HTMLHELP tag is set to YES, additional index files
921 # will be generated that can be used as input for tools like the
922 # Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
923 # of the generated HTML documentation.
924
925 GENERATE_HTMLHELP = NO
926
927 # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
928 # be used to specify the file name of the resulting .chm file. You
929 # can add a path in front of the file if the result should not be
930 # written to the html output directory.
931
932 CHM_FILE =
933
934 # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
935 # be used to specify the location (absolute path including file name) of
936 # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
937 # the HTML help compiler on the generated index.hhp.
938
939 HHC_LOCATION =
940
941 # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
942 # controls if a separate .chi index file is generated (YES) or that
943 # it should be included in the master .chm file (NO).
944
945 GENERATE_CHI = NO
946
947 # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
948 # is used to encode HtmlHelp index (hhk), content (hhc) and project file
949 # content.
950
951 CHM_INDEX_ENCODING =
952
953 # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
954 # controls whether a binary table of contents is generated (YES) or a
955 # normal table of contents (NO) in the .chm file.
956
957 BINARY_TOC = NO
958
959 # The TOC_EXPAND flag can be set to YES to add extra items for group members
960 # to the contents of the HTML help documentation and to the tree view.
961
962 TOC_EXPAND = NO
963
964 # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
965 # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
966 # that can be used as input for Qt's qhelpgenerator to generate a
967 # Qt Compressed Help (.qch) of the generated HTML documentation.
968
969 GENERATE_QHP = NO
970
971 # If the QHG_LOCATION tag is specified, the QCH_FILE tag can
972 # be used to specify the file name of the resulting .qch file.
973 # The path specified is relative to the HTML output folder.
974
975 QCH_FILE =
976
977 # The QHP_NAMESPACE tag specifies the namespace to use when generating
978 # Qt Help Project output. For more information please see
979 # http://doc.trolltech.com/qthelpproject.html#namespace
980
981 QHP_NAMESPACE = org.doxygen.Project
982
983 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
984 # Qt Help Project output. For more information please see
985 # http://doc.trolltech.com/qthelpproject.html#virtual-folders
986
987 QHP_VIRTUAL_FOLDER = doc
988
989 # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
990 # add. For more information please see
991 # http://doc.trolltech.com/qthelpproject.html#custom-filters
992
993 QHP_CUST_FILTER_NAME =
994
995 # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
996 # custom filter to add. For more information please see
997 # <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
998 # Qt Help Project / Custom Filters</a>.
999
1000 QHP_CUST_FILTER_ATTRS =
1001
1002 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1003 # project's
1004 # filter section matches.
1005 # <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
1006 # Qt Help Project / Filter Attributes</a>.
1007
1008 QHP_SECT_FILTER_ATTRS =
1009
1010 # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
1011 # be used to specify the location of Qt's qhelpgenerator.
1012 # If non-empty doxygen will try to run qhelpgenerator on the generated
1013 # .qhp file.
1014
1015 QHG_LOCATION =
1016
1017 # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
1018 # will be generated, which together with the HTML files, form an Eclipse help
1019 # plugin. To install this plugin and make it available under the help contents
1020 # menu in Eclipse, the contents of the directory containing the HTML and XML
1021 # files needs to be copied into the plugins directory of eclipse. The name of
1022 # the directory within the plugins directory should be the same as
1023 # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
1024 # the help appears.
1025
1026 GENERATE_ECLIPSEHELP = NO
1027
1028 # A unique identifier for the eclipse help plugin. When installing the plugin
1029 # the directory name containing the HTML and XML files should also have
1030 # this name.
1031
1032 ECLIPSE_DOC_ID = org.doxygen.Project
1033
1034 # The DISABLE_INDEX tag can be used to turn on/off the condensed index at
1035 # top of each HTML page. The value NO (the default) enables the index and
1036 # the value YES disables it.
1037
1038 DISABLE_INDEX = NO
1039
1040 # This tag can be used to set the number of enum values (range [0,1..20])
1041 # that doxygen will group on one line in the generated HTML documentation.
1042 # Note that a value of 0 will completely suppress the enum values from appearing in the overview section.
1043
1044 ENUM_VALUES_PER_LINE = 4
1045
1046 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1047 # structure should be generated to display hierarchical information.
1048 # If the tag value is set to YES, a side panel will be generated
1049 # containing a tree-like index structure (just like the one that
1050 # is generated for HTML Help). For this to work a browser that supports
1051 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1052 # Windows users are probably better off using the HTML help feature.
1053
1054 GENERATE_TREEVIEW = NO
1055
1056 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1057 # and Class Hierarchy pages using a tree view instead of an ordered list.
1058
1059 USE_INLINE_TREES = NO
1060
1061 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1062 # used to set the initial width (in pixels) of the frame in which the tree
1063 # is shown.
1064
1065 TREEVIEW_WIDTH = 250
1066
1067 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1068 # links to external symbols imported via tag files in a separate window.
1069
1070 EXT_LINKS_IN_WINDOW = NO
1071
1072 # Use this tag to change the font size of Latex formulas included
1073 # as images in the HTML documentation. The default is 10. Note that
1074 # when you change the font size after a successful doxygen run you need
1075 # to manually remove any form_*.png images from the HTML output directory
1076 # to force them to be regenerated.
1077
1078 FORMULA_FONTSIZE = 10
1079
1080 # Use the FORMULA_TRANPARENT tag to determine whether or not the images
1081 # generated for formulas are transparent PNGs. Transparent PNGs are
1082 # not supported properly for IE 6.0, but are supported on all modern browsers.
1083 # Note that when changing this option you need to delete any form_*.png files
1084 # in the HTML output before the changes have effect.
1085
1086 FORMULA_TRANSPARENT = YES
1087
1088 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
1089 # (see http://www.mathjax.org) which uses client side Javascript for the
1090 # rendering instead of using prerendered bitmaps. Use this if you do not
1091 # have LaTeX installed or if you want to formulas look prettier in the HTML
1092 # output. When enabled you also need to install MathJax separately and
1093 # configure the path to it using the MATHJAX_RELPATH option.
1094
1095 USE_MATHJAX = NO
1096
1097 # When MathJax is enabled you need to specify the location relative to the
1098 # HTML output directory using the MATHJAX_RELPATH option. The destination
1099 # directory should contain the MathJax.js script. For instance, if the mathjax
1100 # directory is located at the same level as the HTML output directory, then
1101 # MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing
1102 # MathJax, but it is strongly recommended to install a local copy of MathJax
1103 # before deployment.
1104
1105 MATHJAX_RELPATH = http://www.mathjax.org/mathjax
1106
1107 # When the SEARCHENGINE tag is enabled doxygen will generate a search box
1108 # for the HTML output. The underlying search engine uses javascript
1109 # and DHTML and should work on any modern browser. Note that when using
1110 # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1111 # (GENERATE_DOCSET) there is already a search function so this one should
1112 # typically be disabled. For large projects the javascript based search engine
1113 # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1114
1115 SEARCHENGINE = YES
1116
1117 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1118 # implemented using a PHP enabled web server instead of at the web client
1119 # using Javascript. Doxygen will generate the search PHP script and index
1120 # file to put on the web server. The advantage of the server
1121 # based approach is that it scales better to large projects and allows
1122 # full text search. The disadvantages are that it is more difficult to setup
1123 # and does not have live searching capabilities.
1124
1125 SERVER_BASED_SEARCH = NO
1126
1127 #---------------------------------------------------------------------------
1128 # configuration options related to the LaTeX output
1129 #---------------------------------------------------------------------------
1130
1131 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1132 # generate Latex output.
1133
1134 GENERATE_LATEX = YES
1135
1136 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1137 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1138 # put in front of it. If left blank `latex' will be used as the default path.
1139
1140 LATEX_OUTPUT = latex
1141
1142 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1143 # invoked. If left blank `latex' will be used as the default command name.
1144 # Note that when enabling USE_PDFLATEX this option is only used for
1145 # generating bitmaps for formulas in the HTML output, but not in the
1146 # Makefile that is written to the output directory.
1147
1148 LATEX_CMD_NAME = latex
1149
1150 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1151 # generate index for LaTeX. If left blank `makeindex' will be used as the
1152 # default command name.
1153
1154 MAKEINDEX_CMD_NAME = makeindex
1155
1156 # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1157 # LaTeX documents. This may be useful for small projects and may help to
1158 # save some trees in general.
1159
1160 COMPACT_LATEX = NO
1161
1162 # The PAPER_TYPE tag can be used to set the paper type that is used
1163 # by the printer. Possible values are: a4, letter, legal and
1164 # executive. If left blank a4wide will be used.
1165
1166 PAPER_TYPE = a4
1167
1168 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1169 # packages that should be included in the LaTeX output.
1170
1171 EXTRA_PACKAGES =
1172
1173 # The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1174 # the generated latex document. The header should contain everything until
1175 # the first chapter. If it is left blank doxygen will generate a
1176 # standard header. Notice: only use this tag if you know what you are doing!
1177
1178 LATEX_HEADER =
1179
1180 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1181 # is prepared for conversion to pdf (using ps2pdf). The pdf file will
1182 # contain links (just like the HTML output) instead of page references
1183 # This makes the output suitable for online browsing using a pdf viewer.
1184
1185 PDF_HYPERLINKS = YES
1186
1187 # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1188 # plain latex in the generated Makefile. Set this option to YES to get a
1189 # higher quality PDF documentation.
1190
1191 USE_PDFLATEX = YES
1192
1193 # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1194 # command to the generated LaTeX files. This will instruct LaTeX to keep
1195 # running if errors occur, instead of asking the user for help.
1196 # This option is also used when generating formulas in HTML.
1197
1198 LATEX_BATCHMODE = NO
1199
1200 # If LATEX_HIDE_INDICES is set to YES then doxygen will not
1201 # include the index chapters (such as File Index, Compound Index, etc.)
1202 # in the output.
1203
1204 LATEX_HIDE_INDICES = NO
1205
1206 # If LATEX_SOURCE_CODE is set to YES then doxygen will include
1207 # source code with syntax highlighting in the LaTeX output.
1208 # Note that which sources are shown also depends on other settings
1209 # such as SOURCE_BROWSER.
1210
1211 LATEX_SOURCE_CODE = NO
1212
1213 #---------------------------------------------------------------------------
1214 # configuration options related to the RTF output
1215 #---------------------------------------------------------------------------
1216
1217 # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1218 # The RTF output is optimized for Word 97 and may not look very pretty with
1219 # other RTF readers or editors.
1220
1221 GENERATE_RTF = NO
1222
1223 # The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1224 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1225 # put in front of it. If left blank `rtf' will be used as the default path.
1226
1227 RTF_OUTPUT = rtf
1228
1229 # If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1230 # RTF documents. This may be useful for small projects and may help to
1231 # save some trees in general.
1232
1233 COMPACT_RTF = NO
1234
1235 # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1236 # will contain hyperlink fields. The RTF file will
1237 # contain links (just like the HTML output) instead of page references.
1238 # This makes the output suitable for online browsing using WORD or other
1239 # programs which support those fields.
1240 # Note: wordpad (write) and others do not support links.
1241
1242 RTF_HYPERLINKS = NO
1243
1244 # Load stylesheet definitions from file. Syntax is similar to doxygen's
1245 # config file, i.e. a series of assignments. You only have to provide
1246 # replacements, missing definitions are set to their default value.
1247
1248 RTF_STYLESHEET_FILE =
1249
1250 # Set optional variables used in the generation of an rtf document.
1251 # Syntax is similar to doxygen's config file.
1252
1253 RTF_EXTENSIONS_FILE =
1254
1255 #---------------------------------------------------------------------------
1256 # configuration options related to the man page output
1257 #---------------------------------------------------------------------------
1258
1259 # If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1260 # generate man pages
1261
1262 GENERATE_MAN = NO
1263
1264 # The MAN_OUTPUT tag is used to specify where the man pages will be put.
1265 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1266 # put in front of it. If left blank `man' will be used as the default path.
1267
1268 MAN_OUTPUT = man
1269
1270 # The MAN_EXTENSION tag determines the extension that is added to
1271 # the generated man pages (default is the subroutine's section .3)
1272
1273 MAN_EXTENSION = .3
1274
1275 # If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1276 # then it will generate one additional man file for each entity
1277 # documented in the real man page(s). These additional files
1278 # only source the real man page, but without them the man command
1279 # would be unable to find the correct page. The default is NO.
1280
1281 MAN_LINKS = NO
1282
1283 #---------------------------------------------------------------------------
1284 # configuration options related to the XML output
1285 #---------------------------------------------------------------------------
1286
1287 # If the GENERATE_XML tag is set to YES Doxygen will
1288 # generate an XML file that captures the structure of
1289 # the code including all documentation.
1290
1291 GENERATE_XML = NO
1292
1293 # The XML_OUTPUT tag is used to specify where the XML pages will be put.
1294 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1295 # put in front of it. If left blank `xml' will be used as the default path.
1296
1297 XML_OUTPUT = xml
1298
1299 # The XML_SCHEMA tag can be used to specify an XML schema,
1300 # which can be used by a validating XML parser to check the
1301 # syntax of the XML files.
1302
1303 XML_SCHEMA =
1304
1305 # The XML_DTD tag can be used to specify an XML DTD,
1306 # which can be used by a validating XML parser to check the
1307 # syntax of the XML files.
1308
1309 XML_DTD =
1310
1311 # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1312 # dump the program listings (including syntax highlighting
1313 # and cross-referencing information) to the XML output. Note that
1314 # enabling this will significantly increase the size of the XML output.
1315
1316 XML_PROGRAMLISTING = YES
1317
1318 #---------------------------------------------------------------------------
1319 # configuration options for the AutoGen Definitions output
1320 #---------------------------------------------------------------------------
1321
1322 # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1323 # generate an AutoGen Definitions (see autogen.sf.net) file
1324 # that captures the structure of the code including all
1325 # documentation. Note that this feature is still experimental
1326 # and incomplete at the moment.
1327
1328 GENERATE_AUTOGEN_DEF = NO
1329
1330 #---------------------------------------------------------------------------
1331 # configuration options related to the Perl module output
1332 #---------------------------------------------------------------------------
1333
1334 # If the GENERATE_PERLMOD tag is set to YES Doxygen will
1335 # generate a Perl module file that captures the structure of
1336 # the code including all documentation. Note that this
1337 # feature is still experimental and incomplete at the
1338 # moment.
1339
1340 GENERATE_PERLMOD = NO
1341
1342 # If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1343 # the necessary Makefile rules, Perl scripts and LaTeX code to be able
1344 # to generate PDF and DVI output from the Perl module output.
1345
1346 PERLMOD_LATEX = NO
1347
1348 # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1349 # nicely formatted so it can be parsed by a human reader.
1350 # This is useful
1351 # if you want to understand what is going on.
1352 # On the other hand, if this
1353 # tag is set to NO the size of the Perl module output will be much smaller
1354 # and Perl will parse it just the same.
1355
1356 PERLMOD_PRETTY = YES
1357
1358 # The names of the make variables in the generated doxyrules.make file
1359 # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1360 # This is useful so different doxyrules.make files included by the same
1361 # Makefile don't overwrite each other's variables.
1362
1363 PERLMOD_MAKEVAR_PREFIX =
1364
1365 #---------------------------------------------------------------------------
1366 # Configuration options related to the preprocessor
1367 #---------------------------------------------------------------------------
1368
1369 # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1370 # evaluate all C-preprocessor directives found in the sources and include
1371 # files.
1372
1373 ENABLE_PREPROCESSING = YES
1374
1375 # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1376 # names in the source code. If set to NO (the default) only conditional
1377 # compilation will be performed. Macro expansion can be done in a controlled
1378 # way by setting EXPAND_ONLY_PREDEF to YES.
1379
1380 MACRO_EXPANSION = NO
1381
1382 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1383 # then the macro expansion is limited to the macros specified with the
1384 # PREDEFINED and EXPAND_AS_DEFINED tags.
1385
1386 EXPAND_ONLY_PREDEF = NO
1387
1388 # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1389 # in the INCLUDE_PATH (see below) will be search if a #include is found.
1390
1391 SEARCH_INCLUDES = YES
1392
1393 # The INCLUDE_PATH tag can be used to specify one or more directories that
1394 # contain include files that are not input files but should be processed by
1395 # the preprocessor.
1396
1397 INCLUDE_PATH =
1398
1399 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1400 # patterns (like *.h and *.hpp) to filter out the header-files in the
1401 # directories. If left blank, the patterns specified with FILE_PATTERNS will
1402 # be used.
1403
1404 INCLUDE_FILE_PATTERNS =
1405
1406 # The PREDEFINED tag can be used to specify one or more macro names that
1407 # are defined before the preprocessor is started (similar to the -D option of
1408 # gcc). The argument of the tag is a list of macros of the form: name
1409 # or name=definition (no spaces). If the definition and the = are
1410 # omitted =1 is assumed. To prevent a macro definition from being
1411 # undefined via #undef or recursively expanded use the := operator
1412 # instead of the = operator.
1413
1414 PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
1415
1416 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1417 # this tag can be used to specify a list of macro names that should be expanded.
1418 # The macro definition that is found in the sources will be used.
1419 # Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code.
1420
1421 EXPAND_AS_DEFINED =
1422
1423 # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1424 # doxygen's preprocessor will remove all references to function-like macros
1425 # that are alone on a line, have an all uppercase name, and do not end with a
1426 # semicolon, because these will confuse the parser if not removed.
1427
1428 SKIP_FUNCTION_MACROS = YES
1429
1430 #---------------------------------------------------------------------------
1431 # Configuration::additions related to external references
1432 #---------------------------------------------------------------------------
1433
1434 # The TAGFILES option can be used to specify one or more tagfiles.
1435 # Optionally an initial location of the external documentation
1436 # can be added for each tagfile. The format of a tag file without
1437 # this location is as follows:
1438 #
1439 # TAGFILES = file1 file2 ...
1440 # Adding location for the tag files is done as follows:
1441 #
1442 # TAGFILES = file1=loc1 "file2 = loc2" ...
1443 # where "loc1" and "loc2" can be relative or absolute paths or
1444 # URLs. If a location is present for each tag, the installdox tool
1445 # does not have to be run to correct the links.
1446 # Note that each tag file must have a unique name
1447 # (where the name does NOT include the path)
1448 # If a tag file is not located in the directory in which doxygen
1449 # is run, you must also specify the path to the tagfile here.
1450
1451 TAGFILES =
1452
1453 # When a file name is specified after GENERATE_TAGFILE, doxygen will create
1454 # a tag file that is based on the input files it reads.
1455
1456 GENERATE_TAGFILE =
1457
1458 # If the ALLEXTERNALS tag is set to YES all external classes will be listed
1459 # in the class index. If set to NO only the inherited external classes
1460 # will be listed.
1461
1462 ALLEXTERNALS = NO
1463
1464 # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1465 # in the modules index. If set to NO, only the current project's groups will
1466 # be listed.
1467
1468 EXTERNAL_GROUPS = YES
1469
1470 # The PERL_PATH should be the absolute path and name of the perl script
1471 # interpreter (i.e. the result of `which perl').
1472
1473 PERL_PATH = /usr/bin/perl
1474
1475 #---------------------------------------------------------------------------
1476 # Configuration options related to the dot tool
1477 #---------------------------------------------------------------------------
1478
1479 # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1480 # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1481 # or super classes. Setting the tag to NO turns the diagrams off. Note that
1482 # this option also works with HAVE_DOT disabled, but it is recommended to
1483 # install and use dot, since it yields more powerful graphs.
1484
1485 CLASS_DIAGRAMS = YES
1486
1487 # You can define message sequence charts within doxygen comments using the \msc
1488 # command. Doxygen will then run the mscgen tool (see
1489 # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1490 # documentation. The MSCGEN_PATH tag allows you to specify the directory where
1491 # the mscgen tool resides. If left empty the tool is assumed to be found in the
1492 # default search path.
1493
1494 MSCGEN_PATH =
1495
1496 # If set to YES, the inheritance and collaboration graphs will hide
1497 # inheritance and usage relations if the target is undocumented
1498 # or is not a class.
1499
1500 HIDE_UNDOC_RELATIONS = YES
1501
1502 # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1503 # available from the path. This tool is part of Graphviz, a graph visualization
1504 # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1505 # have no effect if this option is set to NO (the default)
1506
1507 HAVE_DOT = YES
1508
1509 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1510 # allowed to run in parallel. When set to 0 (the default) doxygen will
1511 # base this on the number of processors available in the system. You can set it
1512 # explicitly to a value larger than 0 to get control over the balance
1513 # between CPU load and processing speed.
1514
1515 DOT_NUM_THREADS = 0
1516
1517 # By default doxygen will write a font called Helvetica to the output
1518 # directory and reference it in all dot files that doxygen generates.
1519 # When you want a differently looking font you can specify the font name
1520 # using DOT_FONTNAME. You need to make sure dot is able to find the font,
1521 # which can be done by putting it in a standard location or by setting the
1522 # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
1523 # containing the font.
1524
1525 DOT_FONTNAME = Helvetica
1526
1527 # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1528 # The default size is 10pt.
1529
1530 DOT_FONTSIZE = 10
1531
1532 # By default doxygen will tell dot to use the output directory to look for the
1533 # FreeSans.ttf font (which doxygen will put there itself). If you specify a
1534 # different font using DOT_FONTNAME you can set the path where dot
1535 # can find it using this tag.
1536
1537 DOT_FONTPATH =
1538
1539 # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1540 # will generate a graph for each documented class showing the direct and
1541 # indirect inheritance relations. Setting this tag to YES will force the
1542 # the CLASS_DIAGRAMS tag to NO.
1543
1544 CLASS_GRAPH = YES
1545
1546 # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1547 # will generate a graph for each documented class showing the direct and
1548 # indirect implementation dependencies (inheritance, containment, and
1549 # class references variables) of the class with other documented classes.
1550
1551 COLLABORATION_GRAPH = YES
1552
1553 # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1554 # will generate a graph for groups, showing the direct groups dependencies
1555
1556 GROUP_GRAPHS = YES
1557
1558 # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1559 # collaboration diagrams in a style similar to the OMG's Unified Modeling
1560 # Language.
1561
1562 UML_LOOK = NO
1563
1564 # If set to YES, the inheritance and collaboration graphs will show the
1565 # relations between templates and their instances.
1566
1567 TEMPLATE_RELATIONS = NO
1568
1569 # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1570 # tags are set to YES then doxygen will generate a graph for each documented
1571 # file showing the direct and indirect include dependencies of the file with
1572 # other documented files.
1573
1574 INCLUDE_GRAPH = YES
1575
1576 # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1577 # HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1578 # documented header file showing the documented files that directly or
1579 # indirectly include this file.
1580
1581 INCLUDED_BY_GRAPH = YES
1582
1583 # If the CALL_GRAPH and HAVE_DOT options are set to YES then
1584 # doxygen will generate a call dependency graph for every global function
1585 # or class method. Note that enabling this option will significantly increase
1586 # the time of a run. So in most cases it will be better to enable call graphs
1587 # for selected functions only using the \callgraph command.
1588
1589 CALL_GRAPH = NO
1590
1591 # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1592 # doxygen will generate a caller dependency graph for every global function
1593 # or class method. Note that enabling this option will significantly increase
1594 # the time of a run. So in most cases it will be better to enable caller
1595 # graphs for selected functions only using the \callergraph command.
1596
1597 CALLER_GRAPH = NO
1598
1599 # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1600 # will generate a graphical hierarchy of all classes instead of a textual one.
1601
1602 GRAPHICAL_HIERARCHY = YES
1603
1604 # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
1605 # then doxygen will show the dependencies a directory has on other directories
1606 # in a graphical way. The dependency relations are determined by the #include
1607 # relations between the files in the directories.
1608
1609 DIRECTORY_GRAPH = YES
1610
1611 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1612 # generated by dot. Possible values are png, svg, gif or svg.
1613 # If left blank png will be used.
1614
1615 DOT_IMAGE_FORMAT = png
1616
1617 # The tag DOT_PATH can be used to specify the path where the dot tool can be
1618 # found. If left blank, it is assumed the dot tool can be found in the path.
1619
1620 DOT_PATH =
1621
1622 # The DOTFILE_DIRS tag can be used to specify one or more directories that
1623 # contain dot files that are included in the documentation (see the
1624 # \dotfile command).
1625
1626 DOTFILE_DIRS =
1627
1628 # The MSCFILE_DIRS tag can be used to specify one or more directories that
1629 # contain msc files that are included in the documentation (see the
1630 # \mscfile command).
1631
1632 MSCFILE_DIRS =
1633
1634 # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1635 # nodes that will be shown in the graph. If the number of nodes in a graph
1636 # becomes larger than this value, doxygen will truncate the graph, which is
1637 # visualized by representing a node as a red box. Note that doxygen if the
1638 # number of direct children of the root node in a graph is already larger than
1639 # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1640 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1641
1642 DOT_GRAPH_MAX_NODES = 50
1643
1644 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1645 # graphs generated by dot. A depth value of 3 means that only nodes reachable
1646 # from the root by following a path via at most 3 edges will be shown. Nodes
1647 # that lay further from the root node will be omitted. Note that setting this
1648 # option to 1 or 2 may greatly reduce the computation time needed for large
1649 # code bases. Also note that the size of a graph can be further restricted by
1650 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1651
1652 MAX_DOT_GRAPH_DEPTH = 0
1653
1654 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1655 # background. This is disabled by default, because dot on Windows does not
1656 # seem to support this out of the box. Warning: Depending on the platform used,
1657 # enabling this option may lead to badly anti-aliased labels on the edges of
1658 # a graph (i.e. they become hard to read).
1659
1660 DOT_TRANSPARENT = NO
1661
1662 # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1663 # files in one run (i.e. multiple -o and -T options on the command line). This
1664 # makes dot run faster, but since only newer versions of dot (>1.8.10)
1665 # support this, this feature is disabled by default.
1666
1667 DOT_MULTI_TARGETS = YES
1668
1669 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1670 # generate a legend page explaining the meaning of the various boxes and
1671 # arrows in the dot generated graphs.
1672
1673 GENERATE_LEGEND = YES
1674
1675 # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1676 # remove the intermediate dot files that are used to generate
1677 # the various graphs.
1678
1679 DOT_CLEANUP = YES
00 ACLOCAL_AMFLAGS = -I m4
11
2 AUTOMAKE_OPTIONS = dist-zip
2 AUTOMAKE_OPTIONS = dist-zip foreign
33
4 AM_CPPFLAGS = @PG_CFLAGS@
4 pkgconfigdir = $(libdir)/pkgconfig
5 pkgconfig_DATA = virtualpg.pc
56
6 lib_LTLIBRARIES = mod_virtualpg.la
7 include_HEADERS = virtualpg.h
8
9 lib_LTLIBRARIES = libvirtualpg.la mod_virtualpg.la
10
11 libvirtualpg_la_SOURCES = virtualpg.c
12
13 libvirtualpg_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @PG_CFLAGS@
14
15 libvirtualpg_la_LDFLAGS = -version-info 1:1:1 -no-undefined
716
817 mod_virtualpg_la_SOURCES = virtualpg.c
918
10 mod_virtualpg_la_LDFLAGS = -module -version-info 1:0:0 -no-undefined
19 mod_virtualpg_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @PG_CFLAGS@
20 mod_virtualpg_la_CPPFLAGS += -DLOADABLE_EXTENSION
1121
1222 mod_virtualpg_la_LIBTOOLFLAGS = --tag=disable-static
23
24 if MINGW
25 mod_virtualpg_la_LDFLAGS = -module -avoid-version -no-undefined
26 else
27 mod_virtualpg_la_LDFLAGS = -module -version-info 1:1:1
28 endif
29
30 mod_virtualpg_la_LDFLAGS += @PG_LDFLAGS@ @PG_LIB@
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1212 # PARTICULAR PURPOSE.
1313
1414 @SET_MAKE@
15
16
1517
1618 VPATH = @srcdir@
1719 am__is_gnu_make = { \
9698 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9799 $(ACLOCAL_M4)
98100 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
99 $(am__configure_deps) $(am__DIST_COMMON)
101 $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON)
100102 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
101103 configure.lineno config.status.lineno
102104 mkinstalldirs = $(install_sh) -d
103 CONFIG_CLEAN_FILES =
105 CONFIG_HEADER = config.h
106 CONFIG_CLEAN_FILES = Doxyfile virtualpg.pc
104107 CONFIG_CLEAN_VPATH_FILES =
105108 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
106109 am__vpath_adj = case $$p in \
129132 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
130133 $(am__cd) "$$dir" && rm -f $$files; }; \
131134 }
132 am__installdirs = "$(DESTDIR)$(libdir)"
135 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
136 "$(DESTDIR)$(includedir)"
133137 LTLIBRARIES = $(lib_LTLIBRARIES)
134 mod_virtualpg_la_LIBADD =
135 am_mod_virtualpg_la_OBJECTS = mod_virtualpg_la-virtualpg.lo
136 mod_virtualpg_la_OBJECTS = $(am_mod_virtualpg_la_OBJECTS)
138 libvirtualpg_la_LIBADD =
139 am_libvirtualpg_la_OBJECTS = libvirtualpg_la-virtualpg.lo
140 libvirtualpg_la_OBJECTS = $(am_libvirtualpg_la_OBJECTS)
137141 AM_V_lt = $(am__v_lt_@AM_V@)
138142 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
139143 am__v_lt_0 = --silent
140144 am__v_lt_1 =
145 libvirtualpg_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
146 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
147 $(AM_CFLAGS) $(CFLAGS) $(libvirtualpg_la_LDFLAGS) $(LDFLAGS) \
148 -o $@
149 mod_virtualpg_la_LIBADD =
150 am_mod_virtualpg_la_OBJECTS = mod_virtualpg_la-virtualpg.lo
151 mod_virtualpg_la_OBJECTS = $(am_mod_virtualpg_la_OBJECTS)
141152 mod_virtualpg_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
142153 $(mod_virtualpg_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
143154 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(mod_virtualpg_la_LDFLAGS) \
176187 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
177188 am__v_CCLD_0 = @echo " CCLD " $@;
178189 am__v_CCLD_1 =
179 SOURCES = $(mod_virtualpg_la_SOURCES)
180 DIST_SOURCES = $(mod_virtualpg_la_SOURCES)
190 SOURCES = $(libvirtualpg_la_SOURCES) $(mod_virtualpg_la_SOURCES)
191 DIST_SOURCES = $(libvirtualpg_la_SOURCES) $(mod_virtualpg_la_SOURCES)
181192 am__can_run_installinfo = \
182193 case $$AM_UPDATE_INFO_DIR in \
183194 n|no|NO) false;; \
184195 *) (install-info --version) >/dev/null 2>&1;; \
185196 esac
186 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
197 DATA = $(pkgconfig_DATA)
198 HEADERS = $(include_HEADERS)
199 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
200 $(LISP)config.h.in
187201 # Read a list of newline-separated strings from the standard input,
188202 # and print each of them once, without duplicates. Input order is
189203 # *not* preserved.
204218 CTAGS = ctags
205219 CSCOPE = cscope
206220 AM_RECURSIVE_TARGETS = cscope
207 am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \
208 INSTALL NEWS README compile config.guess config.sub depcomp \
209 install-sh ltmain.sh missing
221 am__DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.in \
222 $(srcdir)/config.h.in $(srcdir)/virtualpg.pc.in AUTHORS \
223 COPYING ChangeLog INSTALL NEWS README compile config.guess \
224 config.sub depcomp install-sh ltmain.sh missing
210225 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
211226 distdir = $(PACKAGE)-$(VERSION)
212227 top_distdir = $(distdir)
289304 PGCONFIG = @PGCONFIG@
290305 PG_CFLAGS = @PG_CFLAGS@
291306 PG_LDFLAGS = @PG_LDFLAGS@
307 PG_LIB = @PG_LIB@
292308 RANLIB = @RANLIB@
293309 SED = @SED@
294310 SET_MAKE = @SET_MAKE@
349365 top_builddir = @top_builddir@
350366 top_srcdir = @top_srcdir@
351367 ACLOCAL_AMFLAGS = -I m4
352 AUTOMAKE_OPTIONS = dist-zip
353 AM_CPPFLAGS = @PG_CFLAGS@
354 lib_LTLIBRARIES = mod_virtualpg.la
368 AUTOMAKE_OPTIONS = dist-zip foreign
369 pkgconfigdir = $(libdir)/pkgconfig
370 pkgconfig_DATA = virtualpg.pc
371 include_HEADERS = virtualpg.h
372 lib_LTLIBRARIES = libvirtualpg.la mod_virtualpg.la
373 libvirtualpg_la_SOURCES = virtualpg.c
374 libvirtualpg_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @PG_CFLAGS@
375 libvirtualpg_la_LDFLAGS = -version-info 1:1:1 -no-undefined
355376 mod_virtualpg_la_SOURCES = virtualpg.c
356 mod_virtualpg_la_LDFLAGS = -module -version-info 1:0:0 -no-undefined
377 mod_virtualpg_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @PG_CFLAGS@ \
378 -DLOADABLE_EXTENSION
357379 mod_virtualpg_la_LIBTOOLFLAGS = --tag=disable-static
358 all: all-am
380 @MINGW_FALSE@mod_virtualpg_la_LDFLAGS = -module -version-info 1:1:1 \
381 @MINGW_FALSE@ @PG_LDFLAGS@ @PG_LIB@ $(am__empty)
382 @MINGW_TRUE@mod_virtualpg_la_LDFLAGS = -module -avoid-version \
383 @MINGW_TRUE@ -no-undefined @PG_LDFLAGS@ @PG_LIB@
384 all: config.h
385 $(MAKE) $(AM_MAKEFLAGS) all-am
359386
360387 .SUFFIXES:
361388 .SUFFIXES: .c .lo .o .obj
393420 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
394421 $(am__aclocal_m4_deps):
395422
423 config.h: stamp-h1
424 @test -f $@ || rm -f stamp-h1
425 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
426
427 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
428 @rm -f stamp-h1
429 cd $(top_builddir) && $(SHELL) ./config.status config.h
430 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
431 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
432 rm -f stamp-h1
433 touch $@
434
435 distclean-hdr:
436 -rm -f config.h stamp-h1
437 Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
438 cd $(top_builddir) && $(SHELL) ./config.status $@
439 virtualpg.pc: $(top_builddir)/config.status $(srcdir)/virtualpg.pc.in
440 cd $(top_builddir) && $(SHELL) ./config.status $@
441
396442 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
397443 @$(NORMAL_INSTALL)
398444 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
428474 rm -f $${locs}; \
429475 }
430476
477 libvirtualpg.la: $(libvirtualpg_la_OBJECTS) $(libvirtualpg_la_DEPENDENCIES) $(EXTRA_libvirtualpg_la_DEPENDENCIES)
478 $(AM_V_CCLD)$(libvirtualpg_la_LINK) -rpath $(libdir) $(libvirtualpg_la_OBJECTS) $(libvirtualpg_la_LIBADD) $(LIBS)
479
431480 mod_virtualpg.la: $(mod_virtualpg_la_OBJECTS) $(mod_virtualpg_la_DEPENDENCIES) $(EXTRA_mod_virtualpg_la_DEPENDENCIES)
432481 $(AM_V_CCLD)$(mod_virtualpg_la_LINK) -rpath $(libdir) $(mod_virtualpg_la_OBJECTS) $(mod_virtualpg_la_LIBADD) $(LIBS)
433482
437486 distclean-compile:
438487 -rm -f *.tab.c
439488
489 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirtualpg_la-virtualpg.Plo@am__quote@
440490 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_virtualpg_la-virtualpg.Plo@am__quote@
441491
442492 .c.o:
460510 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
461511 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
462512
513 libvirtualpg_la-virtualpg.lo: virtualpg.c
514 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvirtualpg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvirtualpg_la-virtualpg.lo -MD -MP -MF $(DEPDIR)/libvirtualpg_la-virtualpg.Tpo -c -o libvirtualpg_la-virtualpg.lo `test -f 'virtualpg.c' || echo '$(srcdir)/'`virtualpg.c
515 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvirtualpg_la-virtualpg.Tpo $(DEPDIR)/libvirtualpg_la-virtualpg.Plo
516 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virtualpg.c' object='libvirtualpg_la-virtualpg.lo' libtool=yes @AMDEPBACKSLASH@
517 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
518 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvirtualpg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvirtualpg_la-virtualpg.lo `test -f 'virtualpg.c' || echo '$(srcdir)/'`virtualpg.c
519
463520 mod_virtualpg_la-virtualpg.lo: virtualpg.c
464 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(mod_virtualpg_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mod_virtualpg_la-virtualpg.lo -MD -MP -MF $(DEPDIR)/mod_virtualpg_la-virtualpg.Tpo -c -o mod_virtualpg_la-virtualpg.lo `test -f 'virtualpg.c' || echo '$(srcdir)/'`virtualpg.c
521 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(mod_virtualpg_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_virtualpg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mod_virtualpg_la-virtualpg.lo -MD -MP -MF $(DEPDIR)/mod_virtualpg_la-virtualpg.Tpo -c -o mod_virtualpg_la-virtualpg.lo `test -f 'virtualpg.c' || echo '$(srcdir)/'`virtualpg.c
465522 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mod_virtualpg_la-virtualpg.Tpo $(DEPDIR)/mod_virtualpg_la-virtualpg.Plo
466523 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virtualpg.c' object='mod_virtualpg_la-virtualpg.lo' libtool=yes @AMDEPBACKSLASH@
467524 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
468 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(mod_virtualpg_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mod_virtualpg_la-virtualpg.lo `test -f 'virtualpg.c' || echo '$(srcdir)/'`virtualpg.c
525 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(mod_virtualpg_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_virtualpg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mod_virtualpg_la-virtualpg.lo `test -f 'virtualpg.c' || echo '$(srcdir)/'`virtualpg.c
469526
470527 mostlyclean-libtool:
471528 -rm -f *.lo
475532
476533 distclean-libtool:
477534 -rm -f libtool config.lt
535 install-pkgconfigDATA: $(pkgconfig_DATA)
536 @$(NORMAL_INSTALL)
537 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
538 if test -n "$$list"; then \
539 echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
540 $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
541 fi; \
542 for p in $$list; do \
543 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
544 echo "$$d$$p"; \
545 done | $(am__base_list) | \
546 while read files; do \
547 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
548 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
549 done
550
551 uninstall-pkgconfigDATA:
552 @$(NORMAL_UNINSTALL)
553 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
554 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
555 dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
556 install-includeHEADERS: $(include_HEADERS)
557 @$(NORMAL_INSTALL)
558 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
559 if test -n "$$list"; then \
560 echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
561 $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
562 fi; \
563 for p in $$list; do \
564 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
565 echo "$$d$$p"; \
566 done | $(am__base_list) | \
567 while read files; do \
568 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
569 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
570 done
571
572 uninstall-includeHEADERS:
573 @$(NORMAL_UNINSTALL)
574 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
575 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
576 dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
478577
479578 ID: $(am__tagged_files)
480579 $(am__define_uniq_tagged_files); mkid -fID $$unique
699798 exit 1; } >&2
700799 check-am: all-am
701800 check: check-am
702 all-am: Makefile $(LTLIBRARIES)
801 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
703802 installdirs:
704 for dir in "$(DESTDIR)$(libdir)"; do \
803 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
705804 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
706805 done
707806 install: install-am
744843 -rm -rf ./$(DEPDIR)
745844 -rm -f Makefile
746845 distclean-am: clean-am distclean-compile distclean-generic \
747 distclean-libtool distclean-tags
846 distclean-hdr distclean-libtool distclean-tags
748847
749848 dvi: dvi-am
750849
758857
759858 info-am:
760859
761 install-data-am:
860 install-data-am: install-includeHEADERS install-pkgconfigDATA
762861
763862 install-dvi: install-dvi-am
764863
806905
807906 ps-am:
808907
809 uninstall-am: uninstall-libLTLIBRARIES
810
811 .MAKE: install-am install-strip
908 uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
909 uninstall-pkgconfigDATA
910
911 .MAKE: all install-am install-strip
812912
813913 .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
814914 clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
815915 cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
816916 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
817917 distcheck distclean distclean-compile distclean-generic \
818 distclean-libtool distclean-tags distcleancheck distdir \
819 distuninstallcheck dvi dvi-am html html-am info info-am \
820 install install-am install-data install-data-am install-dvi \
821 install-dvi-am install-exec install-exec-am install-html \
822 install-html-am install-info install-info-am \
823 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
918 distclean-hdr distclean-libtool distclean-tags distcleancheck \
919 distdir distuninstallcheck dvi dvi-am html html-am info \
920 info-am install install-am install-data install-data-am \
921 install-dvi install-dvi-am install-exec install-exec-am \
922 install-html install-html-am install-includeHEADERS \
923 install-info install-info-am install-libLTLIBRARIES \
924 install-man install-pdf install-pdf-am install-pkgconfigDATA \
824925 install-ps install-ps-am install-strip installcheck \
825926 installcheck-am installdirs maintainer-clean \
826927 maintainer-clean-generic mostlyclean mostlyclean-compile \
827928 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
828 tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
929 tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
930 uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
829931
830932 .PRECIOUS: Makefile
831933
0 # generated automatically by aclocal 1.15 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
2323 #
2424 # This file is free software; the Free Software Foundation
2525 # gives unlimited permission to copy and/or distribute it,
3434 [am__api_version='1.15'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.15], [],
37 m4_if([$1], [1.15.1], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.15])dnl
53 [AM_AUTOMAKE_VERSION([1.15.1])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5757
5858 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
5959
60 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
60 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
6161 #
6262 # This file is free software; the Free Software Foundation
6363 # gives unlimited permission to copy and/or distribute it,
109109
110110 # AM_CONDITIONAL -*- Autoconf -*-
111111
112 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
112 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
113113 #
114114 # This file is free software; the Free Software Foundation
115115 # gives unlimited permission to copy and/or distribute it,
140140 Usually this means the macro was only invoked conditionally.]])
141141 fi])])
142142
143 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
143 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
144144 #
145145 # This file is free software; the Free Software Foundation
146146 # gives unlimited permission to copy and/or distribute it,
331331
332332 # Generate code to set up dependency tracking. -*- Autoconf -*-
333333
334 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
334 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
335335 #
336336 # This file is free software; the Free Software Foundation
337337 # gives unlimited permission to copy and/or distribute it,
407407
408408 # Do all the work for Automake. -*- Autoconf -*-
409409
410 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
410 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
411411 #
412412 # This file is free software; the Free Software Foundation
413413 # gives unlimited permission to copy and/or distribute it,
604604 done
605605 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
606606
607 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
607 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
608608 #
609609 # This file is free software; the Free Software Foundation
610610 # gives unlimited permission to copy and/or distribute it,
625625 fi
626626 AC_SUBST([install_sh])])
627627
628 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
628 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
629629 #
630630 # This file is free software; the Free Software Foundation
631631 # gives unlimited permission to copy and/or distribute it,
647647 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
648648 # From Jim Meyering
649649
650 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
650 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
651651 #
652652 # This file is free software; the Free Software Foundation
653653 # gives unlimited permission to copy and/or distribute it,
682682
683683 # Check to see how 'make' treats includes. -*- Autoconf -*-
684684
685 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
685 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
686686 #
687687 # This file is free software; the Free Software Foundation
688688 # gives unlimited permission to copy and/or distribute it,
732732
733733 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
734734
735 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
735 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
736736 #
737737 # This file is free software; the Free Software Foundation
738738 # gives unlimited permission to copy and/or distribute it,
769769 fi
770770 ])
771771
772 # -*- Autoconf -*-
773 # Obsolete and "removed" macros, that must however still report explicit
774 # error messages when used, to smooth transition.
775 #
776 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
777 #
778 # This file is free software; the Free Software Foundation
779 # gives unlimited permission to copy and/or distribute it,
780 # with or without modifications, as long as this notice is preserved.
781
782 AC_DEFUN([AM_CONFIG_HEADER],
783 [AC_DIAGNOSE([obsolete],
784 ['$0': this macro is obsolete.
785 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
786 AC_CONFIG_HEADERS($@)])
787
788 AC_DEFUN([AM_PROG_CC_STDC],
789 [AC_PROG_CC
790 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
791 AC_DIAGNOSE([obsolete],
792 ['$0': this macro is obsolete.
793 You should simply use the 'AC][_PROG_CC' macro instead.
794 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
795 but upon 'ac_cv_prog_cc_stdc'.])])
796
797 AC_DEFUN([AM_C_PROTOTYPES],
798 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
799 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
800
772801 # Helper functions for option handling. -*- Autoconf -*-
773802
774 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
803 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
775804 #
776805 # This file is free software; the Free Software Foundation
777806 # gives unlimited permission to copy and/or distribute it,
800829 AC_DEFUN([_AM_IF_OPTION],
801830 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
802831
803 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
832 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
804833 #
805834 # This file is free software; the Free Software Foundation
806835 # gives unlimited permission to copy and/or distribute it,
847876 # For backward compatibility.
848877 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
849878
850 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
879 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
851880 #
852881 # This file is free software; the Free Software Foundation
853882 # gives unlimited permission to copy and/or distribute it,
866895
867896 # Check to make sure that the build environment is sane. -*- Autoconf -*-
868897
869 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
898 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
870899 #
871900 # This file is free software; the Free Software Foundation
872901 # gives unlimited permission to copy and/or distribute it,
947976 rm -f conftest.file
948977 ])
949978
950 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
979 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
951980 #
952981 # This file is free software; the Free Software Foundation
953982 # gives unlimited permission to copy and/or distribute it,
10071036 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10081037 ])
10091038
1010 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
1039 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
10111040 #
10121041 # This file is free software; the Free Software Foundation
10131042 # gives unlimited permission to copy and/or distribute it,
10351064 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10361065 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10371066
1038 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
1067 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
10391068 #
10401069 # This file is free software; the Free Software Foundation
10411070 # gives unlimited permission to copy and/or distribute it,
10541083
10551084 # Check how to create a tarball. -*- Autoconf -*-
10561085
1057 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
1086 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
10581087 #
10591088 # This file is free software; the Free Software Foundation
10601089 # gives unlimited permission to copy and/or distribute it,
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the <dlfcn.h> header file. */
3 #undef HAVE_DLFCN_H
4
5 /* Define to 1 if you have the <inttypes.h> header file. */
6 #undef HAVE_INTTYPES_H
7
8 /* Define to 1 if you have the <libpq-fe.h> header file. */
9 #undef HAVE_LIBPQ_FE_H
10
11 /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
12 #undef HAVE_LIBSQLITE3
13
14 /* Define to 1 if `lstat' has the bug that it succeeds when given the
15 zero-length file name argument. */
16 #undef HAVE_LSTAT_EMPTY_STRING_BUG
17
18 /* Define to 1 if you have the <memory.h> header file. */
19 #undef HAVE_MEMORY_H
20
21 /* Define to 1 if you have the <sqlite3ext.h> header file. */
22 #undef HAVE_SQLITE3EXT_H
23
24 /* Define to 1 if you have the <sqlite3.h> header file. */
25 #undef HAVE_SQLITE3_H
26
27 /* Define to 1 if `stat' has the bug that it succeeds when given the
28 zero-length file name argument. */
29 #undef HAVE_STAT_EMPTY_STRING_BUG
30
31 /* Define to 1 if you have the <stdint.h> header file. */
32 #undef HAVE_STDINT_H
33
34 /* Define to 1 if you have the <stdio.h> header file. */
35 #undef HAVE_STDIO_H
36
37 /* Define to 1 if you have the <stdlib.h> header file. */
38 #undef HAVE_STDLIB_H
39
40 /* Define to 1 if you have the `strftime' function. */
41 #undef HAVE_STRFTIME
42
43 /* Define to 1 if you have the <strings.h> header file. */
44 #undef HAVE_STRINGS_H
45
46 /* Define to 1 if you have the <string.h> header file. */
47 #undef HAVE_STRING_H
48
49 /* Define to 1 if you have the <sys/stat.h> header file. */
50 #undef HAVE_SYS_STAT_H
51
52 /* Define to 1 if you have the <sys/types.h> header file. */
53 #undef HAVE_SYS_TYPES_H
54
55 /* Define to 1 if you have the <unistd.h> header file. */
56 #undef HAVE_UNISTD_H
57
58 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
59 slash. */
60 #undef LSTAT_FOLLOWS_SLASHED_SYMLINK
61
62 /* Define to the sub-directory in which libtool stores uninstalled libraries.
63 */
64 #undef LT_OBJDIR
65
66 /* Must be defined in order to disable debug mode. */
67 #undef NDEBUG
68
69 /* Name of package */
70 #undef PACKAGE
71
72 /* Define to the address where bug reports for this package should be sent. */
73 #undef PACKAGE_BUGREPORT
74
75 /* Define to the full name of this package. */
76 #undef PACKAGE_NAME
77
78 /* Define to the full name and version of this package. */
79 #undef PACKAGE_STRING
80
81 /* Define to the one symbol short name of this package. */
82 #undef PACKAGE_TARNAME
83
84 /* Define to the home page for this package. */
85 #undef PACKAGE_URL
86
87 /* Define to the version of this package. */
88 #undef PACKAGE_VERSION
89
90 /* Define to 1 if you have the ANSI C header files. */
91 #undef STDC_HEADERS
92
93 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
94 #undef TIME_WITH_SYS_TIME
95
96 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
97 #undef TM_IN_SYS_TIME
98
99 /* Version number of package */
100 #undef VERSION
101
102 /* Define to empty if `const' does not conform to ANSI C. */
103 #undef const
104
105 /* Define to `long int' if <sys/types.h> does not define. */
106 #undef off_t
107
108 /* Define to `unsigned int' if <sys/types.h> does not define. */
109 #undef size_t
110
111 /* Define to empty if the keyword `volatile' does not work. Warning: valid
112 code using `volatile' can become incorrect without. Disable with care. */
113 #undef volatile
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for virtualpg 1.0.2.
2 # Generated by GNU Autoconf 2.69 for virtualpg 2.0.0-RC0.
33 #
44 # Report bugs to <a.furieri@lqt.it>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='virtualpg'
591591 PACKAGE_TARNAME='virtualpg'
592 PACKAGE_VERSION='1.0.2'
593 PACKAGE_STRING='virtualpg 1.0.2'
592 PACKAGE_VERSION='2.0.0-RC0'
593 PACKAGE_STRING='virtualpg 2.0.0-RC0'
594594 PACKAGE_BUGREPORT='a.furieri@lqt.it'
595595 PACKAGE_URL=''
596596
633633 ac_subst_vars='am__EXEEXT_FALSE
634634 am__EXEEXT_TRUE
635635 LTLIBOBJS
636 MINGW_FALSE
637 MINGW_TRUE
638 PG_LIB
636639 PG_LDFLAGS
637640 PG_CFLAGS
638641 PGCONFIG
13281331 # Omit some internal or obsolete options to make the list less imposing.
13291332 # This message is too long to be a string in the A/UX 3.1 sh.
13301333 cat <<_ACEOF
1331 \`configure' configures virtualpg 1.0.2 to adapt to many kinds of systems.
1334 \`configure' configures virtualpg 2.0.0-RC0 to adapt to many kinds of systems.
13321335
13331336 Usage: $0 [OPTION]... [VAR=VALUE]...
13341337
13981401
13991402 if test -n "$ac_init_help"; then
14001403 case $ac_init_help in
1401 short | recursive ) echo "Configuration of virtualpg 1.0.2:";;
1404 short | recursive ) echo "Configuration of virtualpg 2.0.0-RC0:";;
14021405 esac
14031406 cat <<\_ACEOF
14041407
15101513 test -n "$ac_init_help" && exit $ac_status
15111514 if $ac_init_version; then
15121515 cat <<\_ACEOF
1513 virtualpg configure 1.0.2
1516 virtualpg configure 2.0.0-RC0
15141517 generated by GNU Autoconf 2.69
15151518
15161519 Copyright (C) 2012 Free Software Foundation, Inc.
20542057 This file contains any messages produced by compilers while
20552058 running configure, to aid debugging if configure makes a mistake.
20562059
2057 It was created by virtualpg $as_me 1.0.2, which was
2060 It was created by virtualpg $as_me 2.0.0-RC0, which was
20582061 generated by GNU Autoconf 2.69. Invocation command line was
20592062
20602063 $ $0 $@
29252928
29262929 # Define the identity of the package.
29272930 PACKAGE='virtualpg'
2928 VERSION='1.0.2'
2931 VERSION='2.0.0-RC0'
29292932
29302933
29312934 cat >>confdefs.h <<_ACEOF
30403043
30413044 MAINT=$MAINTAINER_MODE_TRUE
30423045
3046
3047 ac_config_headers="$ac_config_headers config.h"
30433048
30443049
30453050 # disablibg debug support
45374542
45384543 else
45394544 as_fn_error $? "cannot find sqlite3ext.h, bailing out" "$LINENO" 5
4545 fi
4546
4547 done
4548
4549 for ac_header in sqlite3.h
4550 do :
4551 ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
4552 if test "x$ac_cv_header_sqlite3_h" = xyes; then :
4553 cat >>confdefs.h <<_ACEOF
4554 #define HAVE_SQLITE3_H 1
4555 _ACEOF
4556
4557 else
4558 as_fn_error $? "cannot find sqlite3.h, bailing out" "$LINENO" 5
45404559 fi
45414560
45424561 done
1713017149
1713117150
1713217151
17133 # Checks for installed libraries
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_create_module in -lsqlite3" >&5
17135 $as_echo_n "checking for sqlite3_create_module in -lsqlite3... " >&6; }
17136 if ${ac_cv_lib_sqlite3_sqlite3_create_module+:} false; then :
17137 $as_echo_n "(cached) " >&6
17138 else
17139 ac_check_lib_save_LIBS=$LIBS
17140 LIBS="-lsqlite3 -lm $LIBS"
17141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17142 /* end confdefs.h. */
17143
17144 /* Override any GCC internal prototype to avoid an error.
17145 Use char because int might match the return type of a GCC
17146 builtin and then its argument prototype would still apply. */
17147 #ifdef __cplusplus
17148 extern "C"
17149 #endif
17150 char sqlite3_create_module ();
17151 int
17152 main ()
17153 {
17154 return sqlite3_create_module ();
17155 ;
17156 return 0;
17157 }
17158 _ACEOF
17159 if ac_fn_c_try_link "$LINENO"; then :
17160 ac_cv_lib_sqlite3_sqlite3_create_module=yes
17161 else
17162 ac_cv_lib_sqlite3_sqlite3_create_module=no
17163 fi
17164 rm -f core conftest.err conftest.$ac_objext \
17165 conftest$ac_exeext conftest.$ac_ext
17166 LIBS=$ac_check_lib_save_LIBS
17167 fi
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_create_module" >&5
17169 $as_echo "$ac_cv_lib_sqlite3_sqlite3_create_module" >&6; }
17170 if test "x$ac_cv_lib_sqlite3_sqlite3_create_module" = xyes; then :
17171 cat >>confdefs.h <<_ACEOF
17172 #define HAVE_LIBSQLITE3 1
17173 _ACEOF
17174
17175 LIBS="-lsqlite3 $LIBS"
17176
17177 else
17178 as_fn_error $? "'libsqlite3' is required but it doesn't seem to be installed on this system." "$LINENO" 5
17179 fi
17180
17181
1718217152 # Ensure that we can parse libpq-fe.h
1718317153 CFLAGS_SAVE="$CFLAGS"
1718417154 CFLAGS="$PG_CFLAGS"
1720017170 # Ensure we can link against libpq
1720117171 LDFLAGS_SAVE="$LDFLAGS"
1720217172 LDFLAGS="$PG_LDFLAGS"
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing PQconnectdb" >&5
17204 $as_echo_n "checking for library containing PQconnectdb... " >&6; }
17205 if ${ac_cv_search_PQconnectdb+:} false; then :
17173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5
17174 $as_echo_n "checking for PQconnectdb in -lpq... " >&6; }
17175 if ${ac_cv_lib_pq_PQconnectdb+:} false; then :
1720617176 $as_echo_n "(cached) " >&6
1720717177 else
17208 ac_func_search_save_LIBS=$LIBS
17178 ac_check_lib_save_LIBS=$LIBS
17179 LIBS="-lpq $LIBS"
1720917180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1721017181 /* end confdefs.h. */
1721117182
1722417195 return 0;
1722517196 }
1722617197 _ACEOF
17227 for ac_lib in '' pq; do
17228 if test -z "$ac_lib"; then
17229 ac_res="none required"
17230 else
17231 ac_res=-l$ac_lib
17232 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17233 fi
17234 if ac_fn_c_try_link "$LINENO"; then :
17235 ac_cv_search_PQconnectdb=$ac_res
17198 if ac_fn_c_try_link "$LINENO"; then :
17199 ac_cv_lib_pq_PQconnectdb=yes
17200 else
17201 ac_cv_lib_pq_PQconnectdb=no
1723617202 fi
1723717203 rm -f core conftest.err conftest.$ac_objext \
17238 conftest$ac_exeext
17239 if ${ac_cv_search_PQconnectdb+:} false; then :
17240 break
17241 fi
17242 done
17243 if ${ac_cv_search_PQconnectdb+:} false; then :
17244
17245 else
17246 ac_cv_search_PQconnectdb=no
17247 fi
17248 rm conftest.$ac_ext
17249 LIBS=$ac_func_search_save_LIBS
17250 fi
17251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_PQconnectdb" >&5
17252 $as_echo "$ac_cv_search_PQconnectdb" >&6; }
17253 ac_res=$ac_cv_search_PQconnectdb
17254 if test "$ac_res" != no; then :
17255 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17256
17204 conftest$ac_exeext conftest.$ac_ext
17205 LIBS=$ac_check_lib_save_LIBS
17206 fi
17207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQconnectdb" >&5
17208 $as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; }
17209 if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then :
17210 PG_LIB=-lpq
1725717211 else
1725817212 as_fn_error $? "'libpq' is required but it doesn't seem to be installed on this system." "$LINENO" 5
1725917213 fi
1726017214
1726117215 LDFLAGS="$LDFLAGS_SAVE"
17262 LIBS=$LIBS$PG_LDFLAGS' -lpq'
17263
17264 ac_config_files="$ac_config_files Makefile"
17216
17217
17218 # Checks for installed libraries
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_prepare_v2 in -lsqlite3" >&5
17220 $as_echo_n "checking for sqlite3_prepare_v2 in -lsqlite3... " >&6; }
17221 if ${ac_cv_lib_sqlite3_sqlite3_prepare_v2+:} false; then :
17222 $as_echo_n "(cached) " >&6
17223 else
17224 ac_check_lib_save_LIBS=$LIBS
17225 LIBS="-lsqlite3 -lm $LIBS"
17226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227 /* end confdefs.h. */
17228
17229 /* Override any GCC internal prototype to avoid an error.
17230 Use char because int might match the return type of a GCC
17231 builtin and then its argument prototype would still apply. */
17232 #ifdef __cplusplus
17233 extern "C"
17234 #endif
17235 char sqlite3_prepare_v2 ();
17236 int
17237 main ()
17238 {
17239 return sqlite3_prepare_v2 ();
17240 ;
17241 return 0;
17242 }
17243 _ACEOF
17244 if ac_fn_c_try_link "$LINENO"; then :
17245 ac_cv_lib_sqlite3_sqlite3_prepare_v2=yes
17246 else
17247 ac_cv_lib_sqlite3_sqlite3_prepare_v2=no
17248 fi
17249 rm -f core conftest.err conftest.$ac_objext \
17250 conftest$ac_exeext conftest.$ac_ext
17251 LIBS=$ac_check_lib_save_LIBS
17252 fi
17253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&5
17254 $as_echo "$ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&6; }
17255 if test "x$ac_cv_lib_sqlite3_sqlite3_prepare_v2" = xyes; then :
17256 cat >>confdefs.h <<_ACEOF
17257 #define HAVE_LIBSQLITE3 1
17258 _ACEOF
17259
17260 LIBS="-lsqlite3 $LIBS"
17261
17262 else
17263 as_fn_error $? "'libsqlite3' is required but it doesn't seem to be installed on this system." "$LINENO" 5
17264 fi
17265
17266
17267 ac_config_files="$ac_config_files Makefile Doxyfile virtualpg.pc"
17268
17269
17270 # Checking for MinGW
17271 if test "$target_alias" = "mingw32"; then
17272 MINGW_TRUE=
17273 MINGW_FALSE='#'
17274 else
17275 MINGW_TRUE='#'
17276 MINGW_FALSE=
17277 fi
1726517278
1726617279
1726717280 cat >confcache <<\_ACEOF
1735417367 # Let make expand exec_prefix.
1735517368 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1735617369
17357 # Transform confdefs.h into DEFS.
17358 # Protect against shell expansion while executing Makefile rules.
17359 # Protect against Makefile macro expansion.
17360 #
17361 # If the first sed substitution is executed (which looks for macros that
17362 # take arguments), then branch to the quote section. Otherwise,
17363 # look for a macro that doesn't take arguments.
17364 ac_script='
17365 :mline
17366 /\\$/{
17367 N
17368 s,\\\n,,
17369 b mline
17370 }
17371 t clear
17372 :clear
17373 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
17374 t quote
17375 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
17376 t quote
17377 b any
17378 :quote
17379 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
17380 s/\[/\\&/g
17381 s/\]/\\&/g
17382 s/\$/$$/g
17383 H
17384 :any
17385 ${
17386 g
17387 s/^\n//
17388 s/\n/ /g
17389 p
17390 }
17391 '
17392 DEFS=`sed -n "$ac_script" confdefs.h`
17393
17370 DEFS=-DHAVE_CONFIG_H
1739417371
1739517372 ac_libobjs=
1739617373 ac_ltlibobjs=
17397 U=
1739817374 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
1739917375 # 1. Remove the extension, and $U if already installed.
1740017376 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
1744317419 fi
1744417420 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
1744517421 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
17422 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17423 fi
17424 if test -z "${MINGW_TRUE}" && test -z "${MINGW_FALSE}"; then
17425 as_fn_error $? "conditional \"MINGW\" was never defined.
1744617426 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1744717427 fi
1744817428
1784217822 # report actual input values of CONFIG_FILES etc. instead of their
1784317823 # values after options handling.
1784417824 ac_log="
17845 This file was extended by virtualpg $as_me 1.0.2, which was
17825 This file was extended by virtualpg $as_me 2.0.0-RC0, which was
1784617826 generated by GNU Autoconf 2.69. Invocation command line was
1784717827
1784817828 CONFIG_FILES = $CONFIG_FILES
1786017840 "*) set x $ac_config_files; shift; ac_config_files=$*;;
1786117841 esac
1786217842
17843 case $ac_config_headers in *"
17844 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17845 esac
1786317846
1786417847
1786517848 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1786617849 # Files that config.status was made for.
1786717850 config_files="$ac_config_files"
17851 config_headers="$ac_config_headers"
1786817852 config_commands="$ac_config_commands"
1786917853
1787017854 _ACEOF
1788617870 --recheck update $as_me by reconfiguring in the same conditions
1788717871 --file=FILE[:TEMPLATE]
1788817872 instantiate the configuration file FILE
17873 --header=FILE[:TEMPLATE]
17874 instantiate the configuration header FILE
1788917875
1789017876 Configuration files:
1789117877 $config_files
17878
17879 Configuration headers:
17880 $config_headers
1789217881
1789317882 Configuration commands:
1789417883 $config_commands
1789917888 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1790017889 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1790117890 ac_cs_version="\\
17902 virtualpg config.status 1.0.2
17891 virtualpg config.status 2.0.0-RC0
1790317892 configured by $0, generated by GNU Autoconf 2.69,
1790417893 with options \\"\$ac_cs_config\\"
1790517894
1795617945 esac
1795717946 as_fn_append CONFIG_FILES " '$ac_optarg'"
1795817947 ac_need_defaults=false;;
17959 --he | --h | --help | --hel | -h )
17948 --header | --heade | --head | --hea )
17949 $ac_shift
17950 case $ac_optarg in
17951 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17952 esac
17953 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17954 ac_need_defaults=false;;
17955 --he | --h)
17956 # Conflict between --help and --header
17957 as_fn_error $? "ambiguous option: \`$1'
17958 Try \`$0 --help' for more information.";;
17959 --help | --hel | -h )
1796017960 $as_echo "$ac_cs_usage"; exit ;;
1796117961 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1796217962 | -silent | --silent | --silen | --sile | --sil | --si | --s)
1839418394 for ac_config_target in $ac_config_targets
1839518395 do
1839618396 case $ac_config_target in
18397 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
1839718398 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
1839818399 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
1839918400 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18401 "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
18402 "virtualpg.pc") CONFIG_FILES="$CONFIG_FILES virtualpg.pc" ;;
1840018403
1840118404 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1840218405 esac
1840918412 # bizarre bug on SunOS 4.1.3.
1841018413 if $ac_need_defaults; then
1841118414 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18415 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
1841218416 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
1841318417 fi
1841418418
1859718601 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1859818602 fi # test -n "$CONFIG_FILES"
1859918603
18600
18601 eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
18604 # Set up the scripts for CONFIG_HEADERS section.
18605 # No need to generate them if there are no CONFIG_HEADERS.
18606 # This happens for instance with `./config.status Makefile'.
18607 if test -n "$CONFIG_HEADERS"; then
18608 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18609 BEGIN {
18610 _ACEOF
18611
18612 # Transform confdefs.h into an awk script `defines.awk', embedded as
18613 # here-document in config.status, that substitutes the proper values into
18614 # config.h.in to produce config.h.
18615
18616 # Create a delimiter string that does not exist in confdefs.h, to ease
18617 # handling of long lines.
18618 ac_delim='%!_!# '
18619 for ac_last_try in false false :; do
18620 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18621 if test -z "$ac_tt"; then
18622 break
18623 elif $ac_last_try; then
18624 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18625 else
18626 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18627 fi
18628 done
18629
18630 # For the awk script, D is an array of macro values keyed by name,
18631 # likewise P contains macro parameters if any. Preserve backslash
18632 # newline sequences.
18633
18634 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18635 sed -n '
18636 s/.\{148\}/&'"$ac_delim"'/g
18637 t rset
18638 :rset
18639 s/^[ ]*#[ ]*define[ ][ ]*/ /
18640 t def
18641 d
18642 :def
18643 s/\\$//
18644 t bsnl
18645 s/["\\]/\\&/g
18646 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18647 D["\1"]=" \3"/p
18648 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18649 d
18650 :bsnl
18651 s/["\\]/\\&/g
18652 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18653 D["\1"]=" \3\\\\\\n"\\/p
18654 t cont
18655 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18656 t cont
18657 d
18658 :cont
18659 n
18660 s/.\{148\}/&'"$ac_delim"'/g
18661 t clear
18662 :clear
18663 s/\\$//
18664 t bsnlc
18665 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18666 d
18667 :bsnlc
18668 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18669 b cont
18670 ' <confdefs.h | sed '
18671 s/'"$ac_delim"'/"\\\
18672 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18673
18674 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18675 for (key in D) D_is_set[key] = 1
18676 FS = ""
18677 }
18678 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18679 line = \$ 0
18680 split(line, arg, " ")
18681 if (arg[1] == "#") {
18682 defundef = arg[2]
18683 mac1 = arg[3]
18684 } else {
18685 defundef = substr(arg[1], 2)
18686 mac1 = arg[2]
18687 }
18688 split(mac1, mac2, "(") #)
18689 macro = mac2[1]
18690 prefix = substr(line, 1, index(line, defundef) - 1)
18691 if (D_is_set[macro]) {
18692 # Preserve the white space surrounding the "#".
18693 print prefix "define", macro P[macro] D[macro]
18694 next
18695 } else {
18696 # Replace #undef with comments. This is necessary, for example,
18697 # in the case of _POSIX_SOURCE, which is predefined and required
18698 # on some systems where configure will not decide to define it.
18699 if (defundef == "undef") {
18700 print "/*", prefix defundef, macro, "*/"
18701 next
18702 }
18703 }
18704 }
18705 { print }
18706 _ACAWK
18707 _ACEOF
18708 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18709 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18710 fi # test -n "$CONFIG_HEADERS"
18711
18712
18713 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
1860218714 shift
1860318715 for ac_tag
1860418716 do
1881718929 esac \
1881818930 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1881918931 ;;
18820
18932 :H)
18933 #
18934 # CONFIG_HEADER
18935 #
18936 if test x"$ac_file" != x-; then
18937 {
18938 $as_echo "/* $configure_input */" \
18939 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18940 } >"$ac_tmp/config.h" \
18941 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18942 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18944 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18945 else
18946 rm -f "$ac_file"
18947 mv "$ac_tmp/config.h" "$ac_file" \
18948 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18949 fi
18950 else
18951 $as_echo "/* $configure_input */" \
18952 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18953 || as_fn_error $? "could not create -" "$LINENO" 5
18954 fi
18955 # Compute "$ac_file"'s index in $config_headers.
18956 _am_arg="$ac_file"
18957 _am_stamp_count=1
18958 for _am_header in $config_headers :; do
18959 case $_am_header in
18960 $_am_arg | $_am_arg:* )
18961 break ;;
18962 * )
18963 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
18964 esac
18965 done
18966 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
18967 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18968 X"$_am_arg" : 'X\(//\)[^/]' \| \
18969 X"$_am_arg" : 'X\(//\)$' \| \
18970 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
18971 $as_echo X"$_am_arg" |
18972 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18973 s//\1/
18974 q
18975 }
18976 /^X\(\/\/\)[^/].*/{
18977 s//\1/
18978 q
18979 }
18980 /^X\(\/\/\)$/{
18981 s//\1/
18982 q
18983 }
18984 /^X\(\/\).*/{
18985 s//\1/
18986 q
18987 }
18988 s/.*/./; q'`/stamp-h$_am_stamp_count
18989 ;;
1882118990
1882218991 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
1882318992 $as_echo "$as_me: executing $ac_file commands" >&6;}
11 # Process this file with autoconf to produce a configure script.
22
33 AC_PREREQ(2.61)
4 AC_INIT(virtualpg, 1.0.2, a.furieri@lqt.it)
4 AC_INIT(virtualpg, 2.0.0-RC0, a.furieri@lqt.it)
55 AC_LANG(C)
66 AC_CONFIG_MACRO_DIR([m4])
77
88 AM_INIT_AUTOMAKE([foreign])
99 AM_MAINTAINER_MODE
10 AM_CONFIG_HEADER(config.h)
1011
1112 # disablibg debug support
1213 AH_TEMPLATE([NDEBUG],
1819 AC_CHECK_HEADERS(stdio.h,, [AC_MSG_ERROR([cannot find stdio.h, bailing out])])
1920 AC_CHECK_HEADERS(string.h,, [AC_MSG_ERROR([cannot find string.h, bailing out])])
2021 AC_CHECK_HEADERS(sqlite3ext.h,, [AC_MSG_ERROR([cannot find sqlite3ext.h, bailing out])])
22 AC_CHECK_HEADERS(sqlite3.h,, [AC_MSG_ERROR([cannot find sqlite3.h, bailing out])])
2123
2224 # Checks for programs.
2325 AC_PROG_CXX
7577 AC_SUBST(PG_CFLAGS)
7678 AC_SUBST(PG_LDFLAGS)
7779
78 # Checks for installed libraries
79 AC_CHECK_LIB(sqlite3,sqlite3_create_module,,AC_MSG_ERROR(['libsqlite3' is required but it doesn't seem to be installed on this system.]),-lm)
80
8180 # Ensure that we can parse libpq-fe.h
8281 CFLAGS_SAVE="$CFLAGS"
8382 CFLAGS="$PG_CFLAGS"
8685 # Ensure we can link against libpq
8786 LDFLAGS_SAVE="$LDFLAGS"
8887 LDFLAGS="$PG_LDFLAGS"
89 AC_SEARCH_LIBS(PQconnectdb,pq,,AC_MSG_ERROR(['libpq' is required but it doesn't seem to be installed on this system.]))
88 AC_CHECK_LIB(pq,PQconnectdb,PG_LIB=-lpq,AC_MSG_ERROR(['libpq' is required but it doesn't seem to be installed on this system.]))
9089 LDFLAGS="$LDFLAGS_SAVE"
91 LIBS=$LIBS$PG_LDFLAGS' -lpq'
90 AC_SUBST(PG_LIB)
9291
93 AC_CONFIG_FILES([Makefile])
92 # Checks for installed libraries
93 AC_CHECK_LIB(sqlite3,sqlite3_prepare_v2,,AC_MSG_ERROR(['libsqlite3' is required but it doesn't seem to be installed on this system.]),-lm)
94
95 AC_CONFIG_FILES([Makefile \
96 Doxyfile \
97 virtualpg.pc])
98
99 # Checking for MinGW
100 AM_CONDITIONAL([MINGW], [test "$target_alias" = "mingw32"])
94101
95102 AC_OUTPUT
11
22 virtualpg.c -- SQLite3 extension [VIRTUAL TABLE accessing PostgreSQL tables]
33
4 version 1.0.2, 2017 June 3
4 version 2.0.0-RC0, 2018 July 14
55
66 Author: Sandro Furieri a.furieri@lqt.it
77
2323
2424 The Initial Developer of the Original Code is Alessandro Furieri
2525
26 Portions created by the Initial Developer are Copyright (C) 2013
26 Portions created by the Initial Developer are Copyright (C) 2013-2018
2727 the Initial Developer. All Rights Reserved.
2828
2929 Contributor(s):
4646 #include <stdio.h>
4747 #include <string.h>
4848
49 #include <libpq-fe.h>
49 #ifndef LOADABLE_EXTENSION
50 #include <sqlite3.h>
51 #else
5052 #include <sqlite3ext.h>
51
53 #endif
54
55 #include "virtualpg.h"
56 #include "config.h"
57
58 #ifndef LOADABLE_EXTENSION
59 struct sqlite3_module my_pg_module;
60 #else
5261 SQLITE_EXTENSION_INIT1 struct sqlite3_module my_pg_module;
62 #endif
5363
5464 #define SQLITEX_DATE 10001
5565 #define SQLITEX_TIME 10002
6676 PGconn *pg_conn; /* Postgres connection handle */
6777 char *pg_schema; /* the Postgres schema name */
6878 char *pg_table; /* the Postgres table name */
79 int isView; /* is a Postgres View or not */
6980 int nColumns; /* number of columns into the table */
7081 char **Column; /* the name for each column */
7182 char **Type; /* the Postgres datatype for each column */
7283 int *Mapping; /* the SQlite datatype for each column */
7384 int *MaxSize; /* the max size (in bytes) for each column */
7485 int *NotNull; /* NotNull clause for each column */
86 char *IsPK; /* Y/N for each column */
7587 int newRowid;
76 char **CTIDs; /* most recently used CTIDs array */
77 int nCTIDs; /* count of CTIDs items */
88 char **PKstrings; /* array of PK string values */
89 int *PKidx; /* array of PK column indices */
90 int PKrows; /* number of rows in the PK array */
91 int PKcols; /* number of columns in the PK array */
7892 int readOnly; /* PostgreSQL readOnly mode */
93 int julianNumbers; /* DATE/TIME as Julian numbers */
94 int pendingTransaction; /* True/False: if there is PostgreSQL pending transaction */
7995 } VirtualPg;
8096 typedef VirtualPg *VirtualPgPtr;
8197
114130 int Error;
115131 } vpgMemBuffer;
116132 typedef vpgMemBuffer *vpgMemBufferPtr;
133
134
135
136
137 /*************************************************************
138 /
139 / virtualized libPQ methods
140 /
141 **************************************************************/
142 static virtualPQ pq;
143
144 extern void
145 vpgPQclear (PGresult * res)
146 {
147 /* PQclear */
148 pq.PQclear (res);
149 }
150
151 extern PGconn *
152 vpgPQconnectdb (const char *conninfo)
153 {
154 /* PQconnectdb */
155 return pq.PQconnectdb (conninfo);
156 }
157
158 extern char *
159 vpgPQerrorMessage (const PGconn * conn)
160 {
161 /* PQerrorMessage */
162 return pq.PQerrorMessage (conn);
163 }
164
165 extern PGresult *
166 vpgPQexec (PGconn * conn, const char *command)
167 {
168 /* PQexec */
169 return pq.PQexec (conn, command);
170 }
171
172 extern void
173 vpgPQfinish (PGconn * conn)
174 {
175 /* PQfinish */
176 pq.PQfinish (conn);
177 }
178
179 extern int
180 vpgPQgetisnull (const PGresult * res, int row_number, int column_number)
181 {
182 /* PQgetisnull */
183 return pq.PQgetisnull (res, row_number, column_number);
184 }
185
186 extern char *
187 vpgPQgetvalue (const PGresult * res, int row_number, int column_number)
188 {
189 /* PQgetvalue */
190 return pq.PQgetvalue (res, row_number, column_number);
191 }
192
193 extern int
194 vpgPQlibVersion (void)
195 {
196 /* PQlibVersion */
197 return pq.PQlibVersion ();
198 }
199
200 extern int
201 vpgPQnfields (const PGresult * res)
202 {
203 /* PQnfields */
204 return pq.PQnfields (res);
205 }
206
207 extern int
208 vpgPQntuples (const PGresult * res)
209 {
210 /* PQntuples */
211 return pq.PQntuples (res);
212 }
213
214 extern ExecStatusType
215 vpgPQresultStatus (const PGresult * res)
216 {
217 /* PQresultStatus */
218 return pq.PQresultStatus (res);
219 }
220
221 extern ConnStatusType
222 vpgPQstatus (const PGconn * conn)
223 {
224 /* PQstatus */
225 return pq.PQstatus (conn);
226 }
227
228
229
230
231 /*************************************************************
232 /
233 / VirtualPG internal methods
234 /
235 **************************************************************/
236 static void
237 vpgResetError (sqlite3 * db)
238 {
239 /* attempting to reset the PostgreSQL error */
240 const char *sql = "SELECT PostgreSql_ResetLastError()";
241 sqlite3_exec (db, sql, NULL, 0, NULL);
242 }
243
244 static void
245 vpgReportError (sqlite3 * db, const char *emsg)
246 {
247 /* attempting to report some PostgreSQL error */
248 char *sql =
249 sqlite3_mprintf
250 ("SELECT PostgreSql_SetLastError('VirtualPostgres: %q')", emsg);
251 sqlite3_exec (db, sql, NULL, 0, NULL);
252 sqlite3_free (sql);
253 }
117254
118255 static void
119256 vpgMemBufferInitialize (vpgMemBufferPtr buf)
199336 }
200337
201338 static void
339 vpgFreePKstrings (VirtualPgPtr p_vt)
340 {
341 /* freeing the PK string values */
342 if (p_vt->PKidx != NULL)
343 free (p_vt->PKidx);
344 p_vt->PKidx = NULL;
345 if (p_vt->PKstrings != NULL)
346 {
347 int nPKs = p_vt->PKrows * p_vt->PKcols;
348 int c;
349 for (c = 0; c < nPKs; c++)
350 {
351 char *p = *(p_vt->PKstrings + c);
352 if (p != NULL)
353 free (p);
354 }
355 free (p_vt->PKstrings);
356 }
357 p_vt->PKstrings = NULL;
358 p_vt->PKrows = 0;
359 p_vt->PKcols = 0;
360 }
361
362 static int
363 vpgCountPKcols (VirtualPgPtr p_vt)
364 {
365 /* counting how many PK columns */
366 int c;
367 int n = 0;
368 for (c = 0; c < p_vt->nColumns; c++)
369 {
370 if (*(p_vt->IsPK + c) == 'Y')
371 n++;
372 }
373 return n;
374 }
375
376 static char *
377 vpgDoubleQuoted (const char *value)
378 {
379 /*
380 / returns a well formatted TEXT value for SQL
381 / 1] strips trailing spaces
382 / 2] masks any QUOTE inside the string, appending another QUOTE
383 */
384 const char *p_in;
385 const char *p_end;
386 char qt = '"';
387 char *out;
388 char *p_out;
389 int len = 0;
390 int i;
391
392 if (!value)
393 return NULL;
394
395 p_end = value;
396 for (i = (strlen (value) - 1); i >= 0; i--)
397 {
398 /* stripping trailing spaces */
399 p_end = value + i;
400 if (value[i] != ' ')
401 break;
402 }
403
404 p_in = value;
405 while (p_in <= p_end)
406 {
407 /* computing the output length */
408 len++;
409 if (*p_in == qt)
410 len++;
411 p_in++;
412 }
413 if (len == 1 && *value == ' ')
414 {
415 /* empty string */
416 len = 0;
417 }
418
419 out = malloc (len + 3);
420 if (!out)
421 return NULL;
422
423 p_out = out;
424 p_in = value;
425 *p_out++ = '"';
426 if (len == 0)
427 {
428 /* empty string */
429 *p_out++ = '"';
430 *p_out = '\0';
431 return out;
432 }
433 while (p_in <= p_end)
434 {
435 /* creating the output string */
436 if (*p_in == qt)
437 *p_out++ = qt;
438 *p_out++ = *p_in++;
439 }
440 *p_out++ = '"';
441 *p_out = '\0';
442 return out;
443 }
444
445 static char *
446 vpgBuildPkWhere (VirtualPgPtr p_vt, int nRow)
447 {
448 /* attempting to build a WHERE clause (PK columns) */
449 int idx;
450 int c;
451 char *where;
452 char *prev;
453 int col_idx;
454 const char *col_name;
455 char *xcol_name;
456 const char *value;
457 int type;
458 int quoted;
459 if (nRow < 0 || nRow >= p_vt->PKrows)
460 return NULL;
461
462 where = sqlite3_mprintf (" WHERE");
463 idx = nRow * p_vt->PKcols;
464 for (c = 0; c < p_vt->PKcols; c++)
465 {
466 prev = where;
467 col_idx = *(p_vt->PKidx + c);
468 col_name = *(p_vt->Column + col_idx);
469 xcol_name = vpgDoubleQuoted (col_name);
470 type = *(p_vt->Mapping + col_idx);
471 value = *(p_vt->PKstrings + idx + c);
472 switch (type)
473 {
474 case SQLITE_TEXT:
475 case SQLITEX_DATE:
476 case SQLITEX_TIME:
477 case SQLITEX_DATETIME:
478 case SQLITEX_BOOL:
479 quoted = 1;
480 break;
481 default:
482 quoted = 0;
483 break;
484 };
485 if (value == NULL)
486 {
487 if (c == 0)
488 where = sqlite3_mprintf ("%s %s IS NULL", prev, xcol_name);
489 else
490 where =
491 sqlite3_mprintf ("%s AND %s IS NULL", prev, xcol_name);
492 }
493 else if (quoted)
494 {
495 if (c == 0)
496 where =
497 sqlite3_mprintf ("%s %s = %Q", prev, xcol_name, value);
498 else
499 where =
500 sqlite3_mprintf ("%s AND %s = %Q", prev, xcol_name,
501 value);
502 }
503 else
504 {
505 if (c == 0)
506 where =
507 sqlite3_mprintf ("%s %s = %s", prev, xcol_name, value);
508 else
509 where =
510 sqlite3_mprintf ("%s AND %s = %s", prev, xcol_name,
511 value);
512 }
513 free (xcol_name);
514 sqlite3_free (prev);
515 }
516 return where;
517 }
518
519 static char *
520 vpgBuildPkOrderBy (VirtualPgPtr p_vt)
521 {
522 /* attempting to build an ORDER BY clause (PK columns) */
523 int c;
524 char *orderBy;
525 char *prev;
526 const char *col_name;
527 char *xcol_name;
528 int first = 1;
529
530 orderBy = sqlite3_mprintf (" ORDER BY");
531 for (c = 0; c < p_vt->nColumns; c++)
532 {
533 if (p_vt->IsPK[c] == 'Y')
534 {
535 prev = orderBy;
536 col_name = *(p_vt->Column + c);
537 xcol_name = vpgDoubleQuoted (col_name);
538 if (first)
539 {
540 first = 0;
541 orderBy = sqlite3_mprintf ("%s %s", prev, xcol_name);
542 }
543 else
544 orderBy = sqlite3_mprintf ("%s, %s", prev, xcol_name);
545 free (xcol_name);
546 sqlite3_free (prev);
547 }
548 }
549 return orderBy;
550 }
551
552 static void
202553 vpgSetNullValue (vpgSqliteValuePtr p)
203554 {
204555 /* setting a NULL value to the multitype */
310661 ret = sqlite3_prepare_v2 (db, sql, strlen (sql), &stmt, NULL);
311662 if (ret != SQLITE_OK)
312663 {
313 fprintf (stderr, "SQL error (JulianDay): %s\n", sqlite3_errmsg (db));
664 char *emsg = sqlite3_mprintf ("SQLite error (JulianDay): %s\n",
665 sqlite3_errmsg (db));
666 vpgReportError (db, emsg);
667 sqlite3_free (emsg);
314668 return 0.0;
315669 }
316670 sqlite3_reset (stmt);
321675 julian = sqlite3_column_double (stmt, 0);
322676 else
323677 {
324 fprintf (stderr, "SQL error (JulianDay): %s\n", sqlite3_errmsg (db));
678 char *emsg = sqlite3_mprintf ("SQLite error (JulianDay): %s\n",
679 sqlite3_errmsg (db));
325680 sqlite3_finalize (stmt);
681 vpgReportError (db, emsg);
682 sqlite3_free (emsg);
326683 return 0.0;
327684 }
328685 sqlite3_finalize (stmt);
341698 ret = sqlite3_prepare_v2 (db, sql, strlen (sql), &stmt, NULL);
342699 if (ret != SQLITE_OK)
343700 {
344 fprintf (stderr, "SQL error (Date): %s\n", sqlite3_errmsg (db));
701 char *emsg = sqlite3_mprintf ("SQLite error (Date): %s\n",
702 sqlite3_errmsg (db));
703 vpgReportError (db, emsg);
704 sqlite3_free (emsg);
345705 return sqlite3_mprintf ("%s", "1900-01-01");
346706 }
347707 sqlite3_reset (stmt);
355715 }
356716 else
357717 {
358 fprintf (stderr, "SQL error (Date): %s\n", sqlite3_errmsg (db));
718 char *emsg = sqlite3_mprintf ("SQLite error (Date): %s\n",
719 sqlite3_errmsg (db));
720 vpgReportError (db, emsg);
721 sqlite3_free (emsg);
359722 sqlite3_finalize (stmt);
360723 return sqlite3_mprintf ("%s", "1900-01-01");
361724 }
375738 ret = sqlite3_prepare_v2 (db, sql, strlen (sql), &stmt, NULL);
376739 if (ret != SQLITE_OK)
377740 {
378 fprintf (stderr, "SQL error (Time): %s\n", sqlite3_errmsg (db));
741 char *emsg = sqlite3_mprintf ("SQLite error (Time): %s\n",
742 sqlite3_errmsg (db));
743 vpgReportError (db, emsg);
744 sqlite3_free (emsg);
379745 return sqlite3_mprintf ("%s", "12:00:00.000");
380746 }
381747 sqlite3_reset (stmt);
389755 }
390756 else
391757 {
392 fprintf (stderr, "SQL error (Time): %s\n", sqlite3_errmsg (db));
758 char *emsg = sqlite3_mprintf ("SQLite error (Time): %s\n",
759 sqlite3_errmsg (db));
760 vpgReportError (db, emsg);
761 sqlite3_free (emsg);
393762 sqlite3_finalize (stmt);
394763 return sqlite3_mprintf ("%s", "12:00:00.000");
395764 }
409778 ret = sqlite3_prepare_v2 (db, sql, strlen (sql), &stmt, NULL);
410779 if (ret != SQLITE_OK)
411780 {
412 fprintf (stderr, "SQL error (Datetime): %s\n", sqlite3_errmsg (db));
781 char *emsg = sqlite3_mprintf ("SQLite error (Datetime): %s\n",
782 sqlite3_errmsg (db));
783 vpgReportError (db, emsg);
784 sqlite3_free (emsg);
413785 return sqlite3_mprintf ("%s", "1900-01-01 12:00:00.000");
414786 }
415787 sqlite3_reset (stmt);
423795 }
424796 else
425797 {
426 fprintf (stderr, "SQL error (Datetime): %s\n", sqlite3_errmsg (db));
798 char *emsg = sqlite3_mprintf ("SQLite error (Datetime): %s\n",
799 sqlite3_errmsg (db));
800 vpgReportError (db, emsg);
801 sqlite3_free (emsg);
427802 sqlite3_finalize (stmt);
428803 return sqlite3_mprintf ("%s", "1900-01-01 12:00:00.000");
429804 }
436811 {
437812 /* tranforming an INTEGER into a BOOL */
438813 return sqlite3_mprintf ("%c", (value == 0) ? 'f' : 't');
439 }
440
441 static char *
442 vpgDoubleQuoted (const char *value)
443 {
444 /*
445 / returns a well formatted TEXT value for SQL
446 / 1] strips trailing spaces
447 / 2] masks any QUOTE inside the string, appending another QUOTE
448 */
449 const char *p_in;
450 const char *p_end;
451 char qt = '"';
452 char *out;
453 char *p_out;
454 int len = 0;
455 int i;
456
457 if (!value)
458 return NULL;
459
460 p_end = value;
461 for (i = (strlen (value) - 1); i >= 0; i--)
462 {
463 /* stripping trailing spaces */
464 p_end = value + i;
465 if (value[i] != ' ')
466 break;
467 }
468
469 p_in = value;
470 while (p_in <= p_end)
471 {
472 /* computing the output length */
473 len++;
474 if (*p_in == qt)
475 len++;
476 p_in++;
477 }
478 if (len == 1 && *value == ' ')
479 {
480 /* empty string */
481 len = 0;
482 }
483
484 out = malloc (len + 3);
485 if (!out)
486 return NULL;
487
488 p_out = out;
489 p_in = value;
490 *p_out++ = '"';
491 if (len == 0)
492 {
493 /* empty string */
494 *p_out++ = '"';
495 *p_out = '\0';
496 return out;
497 }
498 while (p_in <= p_end)
499 {
500 /* creating the output string */
501 if (*p_in == qt)
502 *p_out++ = qt;
503 *p_out++ = *p_in++;
504 }
505 *p_out++ = '"';
506 *p_out = '\0';
507 return out;
508814 }
509815
510816 static char *
576882 }
577883 *po = '\0';
578884 return clean;
579 }
580
581 static const char *
582 vpgGetCTID (VirtualPgPtr p_vt, int n)
583 {
584 /* attempting to retrieve a CTID by its index */
585 if (p_vt->CTIDs == NULL)
586 return NULL;
587 if (n < 0 || n >= p_vt->nCTIDs)
588 return NULL;
589 return *(p_vt->CTIDs + n);
590885 }
591886
592887 static int
626921 if (!p_vt)
627922 return;
628923 if (p_vt->pg_conn)
629 PQfinish (p_vt->pg_conn);
924 vpgPQfinish (p_vt->pg_conn);
630925 if (p_vt->pg_schema)
631926 sqlite3_free (p_vt->pg_schema);
632927 if (p_vt->pg_table)
655950 sqlite3_free (p_vt->MaxSize);
656951 if (p_vt->NotNull)
657952 sqlite3_free (p_vt->NotNull);
658 if (p_vt->CTIDs != NULL)
659 {
660 for (i = 0; i < p_vt->nCTIDs; i++)
661 {
662 if (*(p_vt->CTIDs + i) != NULL)
663 free (*(p_vt->CTIDs + i));
664 }
665 free (p_vt->CTIDs);
666 }
953 if (p_vt->IsPK)
954 sqlite3_free (p_vt->IsPK);
955 vpgFreePKstrings (p_vt);
667956 sqlite3_free (p_vt);
668957 }
669958
679968 int c;
680969 int comma;
681970 PGresult *res;
971 char dummy[1024];
972 char *emsg;
973
974 vpgResetError (p_vt->db);
682975
683976 /* preparing the PostgreSQL query */
684977 schema = vpgDoubleQuoted (p_vt->pg_schema);
7111004 switch (pg_type)
7121005 {
7131006 case SQLITE_INTEGER:
714 sql = sqlite3_mprintf ("%d", sqlite3_value_int (argv[c]));
1007 #if defined(_WIN32) || defined(__MINGW32__)
1008 /* CAVEAT - M$ runtime doesn't supports %lld for 64 bits */
1009 sprintf (dummy, "%I64d", sqlite3_value_int64 (argv[c]));
1010 #else
1011 sprintf (dummy, "%lld", sqlite3_value_int64 (argv[c]));
1012 #endif
1013 sql = sqlite3_mprintf ("%s", dummy);
7151014 vpgMemBufferAppend (&sql_statement, sql);
7161015 sqlite3_free (sql);
7171016 break;
7221021 sqlite3_free (sql);
7231022 break;
7241023 case SQLITEX_DATE:
725 xname = vpgMakeDate (p_vt->db, sqlite3_value_double (argv[c]));
726 sql = sqlite3_mprintf ("%Q", xname);
727 sqlite3_free (xname);
1024 if (p_vt->julianNumbers)
1025 {
1026 xname =
1027 vpgMakeDate (p_vt->db,
1028 sqlite3_value_double (argv[c]));
1029 sql = sqlite3_mprintf ("%Q", xname);
1030 sqlite3_free (xname);
1031 }
1032 else
1033 sql = sqlite3_mprintf ("%Q", sqlite3_value_text (argv[c]));
7281034 vpgMemBufferAppend (&sql_statement, sql);
7291035 sqlite3_free (sql);
7301036 break;
7311037 case SQLITEX_TIME:
732 xname = vpgMakeTime (p_vt->db, sqlite3_value_double (argv[c]));
733 sql = sqlite3_mprintf ("%Q", xname);
734 sqlite3_free (xname);
1038 if (p_vt->julianNumbers)
1039 {
1040 xname =
1041 vpgMakeTime (p_vt->db,
1042 sqlite3_value_double (argv[c]));
1043 sql = sqlite3_mprintf ("%Q", xname);
1044 sqlite3_free (xname);
1045 }
1046 else
1047 sql = sqlite3_mprintf ("%Q", sqlite3_value_text (argv[c]));
7351048 vpgMemBufferAppend (&sql_statement, sql);
7361049 sqlite3_free (sql);
7371050 break;
7381051 case SQLITEX_DATETIME:
739 xname =
740 vpgMakeDatetime (p_vt->db, sqlite3_value_double (argv[c]));
741 sql = sqlite3_mprintf ("%Q", xname);
742 sqlite3_free (xname);
1052 if (p_vt->julianNumbers)
1053 {
1054 xname =
1055 vpgMakeDatetime (p_vt->db,
1056 sqlite3_value_double (argv[c]));
1057 sql = sqlite3_mprintf ("%Q", xname);
1058 sqlite3_free (xname);
1059 }
1060 else
1061 sql = sqlite3_mprintf ("%Q", sqlite3_value_text (argv[c]));
7431062 vpgMemBufferAppend (&sql_statement, sql);
7441063 sqlite3_free (sql);
7451064 break;
7671086 vpgMemBufferAppend (&sql_statement, ")");
7681087 if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
7691088 {
770 res = PQexec (p_vt->pg_conn, sql_statement.Buffer);
771 if (PQresultStatus (res) != PGRES_COMMAND_OK)
1089 res = vpgPQexec (p_vt->pg_conn, sql_statement.Buffer);
1090 if (vpgPQresultStatus (res) != PGRES_COMMAND_OK)
7721091 goto illegal;
7731092 vpgMemBufferReset (&sql_statement);
774 PQclear (res);
1093 vpgPQclear (res);
7751094 return SQLITE_OK;
7761095 }
7771096 illegal:
778 fprintf (stderr, "INSERT failed: %s", PQerrorMessage (p_vt->pg_conn));
1097 emsg =
1098 sqlite3_mprintf ("Postgres INSERT failed:\n%s",
1099 vpgPQerrorMessage (p_vt->pg_conn));
1100 vpgReportError (p_vt->db, emsg);
1101 sqlite3_free (emsg);
7791102 vpgMemBufferReset (&sql_statement);
780 PQclear (res);
1103 vpgPQclear (res);
7811104 return SQLITE_ERROR;
7821105 }
7831106
7841107 static int
785 vpgUpdateRow (VirtualPgPtr p_vt, const char *ctid, int argc,
786 sqlite3_value ** argv)
1108 vpgUpdateRow (VirtualPgPtr p_vt, int nRow, int argc, sqlite3_value ** argv)
7871109 {
7881110 /* trying to update a row into the PostgreSQL real-table */
7891111 vpgMemBuffer sql_statement;
7911113 char *schema;
7921114 char *table;
7931115 char *xname;
1116 char *where;
7941117 int c;
7951118 int comma;
7961119 PGresult *res;
1120 char dummy[1024];
1121 char *emsg;
1122
1123 vpgResetError (p_vt->db);
7971124
7981125 if (p_vt->nColumns + 2 != argc)
7991126 {
800 fprintf (stderr, "UPDATE failed: mismatching argc count\n");
1127 emsg = sqlite3_mprintf ("UPDATE failed: mismatching argc count\n");
1128 vpgReportError (p_vt->db, emsg);
1129 sqlite3_free (emsg);
8011130 return SQLITE_ERROR;
8021131 }
803
8041132
8051133 /* preparing the PostgreSQL query */
8061134 schema = vpgDoubleQuoted (p_vt->pg_schema);
8261154 switch (pg_type)
8271155 {
8281156 case SQLITE_INTEGER:
829 sql = sqlite3_mprintf ("%d", sqlite3_value_int (argv[c2]));
1157 #if defined(_WIN32) || defined(__MINGW32__)
1158 // CAVEAT - M$ runtime doesn't supports %lld for 64 bits
1159 sprintf (dummy, "%I64d", sqlite3_value_int64 (argv[c2]));
1160 #else
1161 sprintf (dummy, "%lld", sqlite3_value_int64 (argv[c2]));
1162 #endif
1163 sql = sqlite3_mprintf ("%s", dummy);
8301164 vpgMemBufferAppend (&sql_statement, sql);
8311165 sqlite3_free (sql);
8321166 break;
8371171 sqlite3_free (sql);
8381172 break;
8391173 case SQLITEX_DATE:
840 xname = vpgMakeDate (p_vt->db, sqlite3_value_double (argv[c]));
841 sql = sqlite3_mprintf ("%Q", xname);
842 sqlite3_free (xname);
1174 if (p_vt->julianNumbers)
1175 {
1176 xname =
1177 vpgMakeDate (p_vt->db,
1178 sqlite3_value_double (argv[c2]));
1179 sql = sqlite3_mprintf ("%Q", xname);
1180 sqlite3_free (xname);
1181 }
1182 else
1183 sql = sqlite3_mprintf ("%Q", sqlite3_value_text (argv[c2]));
8431184 vpgMemBufferAppend (&sql_statement, sql);
8441185 sqlite3_free (sql);
8451186 break;
8461187 case SQLITEX_TIME:
847 xname = vpgMakeTime (p_vt->db, sqlite3_value_double (argv[c]));
848 sql = sqlite3_mprintf ("%Q", xname);
849 sqlite3_free (xname);
1188 if (p_vt->julianNumbers)
1189 {
1190 xname =
1191 vpgMakeTime (p_vt->db,
1192 sqlite3_value_double (argv[c2]));
1193 sql = sqlite3_mprintf ("%Q", xname);
1194 sqlite3_free (xname);
1195 }
1196 else
1197 sql = sqlite3_mprintf ("%Q", sqlite3_value_text (argv[c2]));
8501198 vpgMemBufferAppend (&sql_statement, sql);
8511199 sqlite3_free (sql);
8521200 break;
8531201 case SQLITEX_DATETIME:
854 xname =
855 vpgMakeDatetime (p_vt->db, sqlite3_value_double (argv[c]));
856 sql = sqlite3_mprintf ("%Q", xname);
857 sqlite3_free (xname);
1202 if (p_vt->julianNumbers)
1203 {
1204 xname =
1205 vpgMakeDatetime (p_vt->db,
1206 sqlite3_value_double (argv[c2]));
1207 sql = sqlite3_mprintf ("%Q", xname);
1208 sqlite3_free (xname);
1209 }
1210 else
1211 sql = sqlite3_mprintf ("%Q", sqlite3_value_text (argv[c2]));
8581212 vpgMemBufferAppend (&sql_statement, sql);
8591213 sqlite3_free (sql);
8601214 break;
8611215 case SQLITEX_BOOL:
862 xname = vpgMakeBool (sqlite3_value_int (argv[c]));
1216 xname = vpgMakeBool (sqlite3_value_int (argv[c2]));
8631217 sql = sqlite3_mprintf ("%Q", xname);
8641218 sqlite3_free (xname);
8651219 vpgMemBufferAppend (&sql_statement, sql);
8791233 };
8801234 comma = 1;
8811235 }
882 vpgMemBufferAppend (&sql_statement, " WHERE ctid = ");
883 xname = sqlite3_mprintf ("%Q::tid", ctid);
884 vpgMemBufferAppend (&sql_statement, xname);
885 sqlite3_free (xname);
1236
1237 /* appending the WHERE clause (PK values) */
1238 where = vpgBuildPkWhere (p_vt, nRow);
1239 if (where == NULL)
1240 goto illegal_pk;
1241 vpgMemBufferAppend (&sql_statement, where);
1242 sqlite3_free (where);
8861243
8871244 if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
8881245 {
889 res = PQexec (p_vt->pg_conn, sql_statement.Buffer);
890 if (PQresultStatus (res) != PGRES_COMMAND_OK)
1246 res = vpgPQexec (p_vt->pg_conn, sql_statement.Buffer);
1247 if (vpgPQresultStatus (res) != PGRES_COMMAND_OK)
8911248 goto illegal;
8921249 vpgMemBufferReset (&sql_statement);
893 PQclear (res);
1250 vpgPQclear (res);
8941251 return SQLITE_OK;
8951252 }
1253 illegal_pk:
1254 emsg =
1255 sqlite3_mprintf
1256 ("Postgres UPDATE failed: unable to get PK values, sorry");
1257 vpgReportError (p_vt->db, emsg);
1258 sqlite3_free (emsg);
1259 vpgMemBufferReset (&sql_statement);
1260 return SQLITE_ERROR;
8961261 illegal:
897 fprintf (stderr, "UPDATE failed: %s", PQerrorMessage (p_vt->pg_conn));
1262 emsg =
1263 sqlite3_mprintf ("Postgres UPDATE failed:\n%s",
1264 vpgPQerrorMessage (p_vt->pg_conn));
1265 vpgReportError (p_vt->db, emsg);
1266 sqlite3_free (emsg);
8981267 vpgMemBufferReset (&sql_statement);
899 PQclear (res);
1268 vpgPQclear (res);
9001269 return SQLITE_ERROR;
9011270 }
9021271
9031272 static int
904 vpgDeleteRow (VirtualPgPtr p_vt, const char *ctid)
1273 vpgDeleteRow (VirtualPgPtr p_vt, int nRow)
9051274 {
9061275 /* trying to delete a row from the PostgreSQL real-table */
907 char *sql_statement;
1276 vpgMemBuffer sql_statement;
9081277 char *schema;
9091278 char *table;
1279 char *where;
1280 char *sql;
9101281 PGresult *res;
1282 char *emsg;
1283
1284 vpgResetError (p_vt->db);
1285
9111286 schema = vpgDoubleQuoted (p_vt->pg_schema);
9121287 table = vpgDoubleQuoted (p_vt->pg_table);
913 sql_statement =
914 sqlite3_mprintf ("DELETE FROM %s.%s WHERE ctid = %Q::tid", schema,
915 table, ctid);
1288 sql = sqlite3_mprintf ("DELETE FROM %s.%s", schema, table);
9161289 free (schema);
9171290 free (table);
918 res = PQexec (p_vt->pg_conn, sql_statement);
919 sqlite3_free (sql_statement);
920 if (PQresultStatus (res) != PGRES_COMMAND_OK)
921 goto illegal;
922 PQclear (res);
923 return SQLITE_OK;
1291 vpgMemBufferInitialize (&sql_statement);
1292 vpgMemBufferAppend (&sql_statement, sql);
1293 sqlite3_free (sql);
1294
1295 /* appending the WHERE clause (PK values) */
1296 where = vpgBuildPkWhere (p_vt, nRow);
1297 if (where == NULL)
1298 goto illegal_pk;
1299 vpgMemBufferAppend (&sql_statement, where);
1300 sqlite3_free (where);
1301
1302 if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
1303 {
1304 res = vpgPQexec (p_vt->pg_conn, sql_statement.Buffer);
1305 if (vpgPQresultStatus (res) != PGRES_COMMAND_OK)
1306 goto illegal;
1307 vpgMemBufferReset (&sql_statement);
1308 vpgPQclear (res);
1309 return SQLITE_OK;
1310 }
1311 illegal_pk:
1312 emsg =
1313 sqlite3_mprintf
1314 ("Postgres DELETE failed: unable to get PK values, sorry");
1315 vpgReportError (p_vt->db, emsg);
1316 sqlite3_free (emsg);
1317 vpgMemBufferReset (&sql_statement);
1318 return SQLITE_ERROR;
9241319 illegal:
925 fprintf (stderr, "DELETE failed: %s", PQerrorMessage (p_vt->pg_conn));
926 PQclear (res);
1320 emsg =
1321 sqlite3_mprintf ("Postgres DELETE failed:\n%s",
1322 vpgPQerrorMessage (p_vt->pg_conn));
1323 vpgReportError (p_vt->db, emsg);
1324 sqlite3_free (emsg);
1325 vpgPQclear (res);
9271326 return SQLITE_ERROR;
9281327 }
9291328
9431342 }
9441343
9451344 r = cursor->currentRow;
946 for (c = 1; c < cursor->nFields; c++)
1345 for (c = 0; c < cursor->nFields; c++)
9471346 {
9481347 /* extracting/converting column values */
949 value = *(cursor->Values + c - 1);
950 if (PQgetisnull (res, r, c))
1348 value = *(cursor->Values + c);
1349 if (vpgPQgetisnull (res, r, c))
9511350 vpgSetNullValue (value);
9521351 else
9531352 {
954 const char *pg_value = PQgetvalue (res, r, c);
955 switch (*(cursor->pVtab->Mapping + c - 1))
1353 const char *pg_value = vpgPQgetvalue (res, r, c);
1354 switch (*(cursor->pVtab->Mapping + c))
9561355 {
9571356 case SQLITE_INTEGER:
9581357 vpgSetIntValue (value, pg_value);
9631362 case SQLITEX_DATE:
9641363 case SQLITEX_TIME:
9651364 case SQLITEX_DATETIME:
966 vpgSetDateValue (value,
967 vpgMakeJulianDay (cursor->pVtab->db,
968 pg_value));
1365 if (cursor->pVtab->julianNumbers)
1366 vpgSetDateValue (value,
1367 vpgMakeJulianDay (cursor->pVtab->db,
1368 pg_value));
1369 else
1370 vpgSetTextValue (value, pg_value);
9691371 break;
9701372 case SQLITEX_BOOL:
9711373 vpgSetBoolValue (value, pg_value);
9801382 }
9811383 }
9821384
1385 static void
1386 vpgCheckView (PGconn * pg_conn, const char *pg_schema, const char *pg_name,
1387 VirtualPgPtr p_vt)
1388 {
1389 /* testing for a Postgres View */
1390 char *sql;
1391 PGresult *res;
1392 int nRows;
1393 int nFields;
1394 int count = 0;
1395
1396 sql =
1397 sqlite3_mprintf
1398 ("SELECT count(*) FROM pg_views where schemaname = %Q AND viewname = %Q",
1399 pg_schema, pg_name);
1400 res = vpgPQexec (pg_conn, sql);
1401 sqlite3_free (sql);
1402 if (vpgPQresultStatus (res) != PGRES_TUPLES_OK)
1403 goto illegal;
1404 nRows = vpgPQntuples (res);
1405 nFields = vpgPQnfields (res);
1406 if (nRows == 1 && nFields == 1)
1407 count = atoi (vpgPQgetvalue (res, 0, 0));
1408 if (count)
1409 p_vt->isView = 1;
1410 illegal:
1411 /* something has gone the wrong way */
1412 if (res != NULL)
1413 vpgPQclear (res);
1414 }
1415
1416 static int
1417 vpg_setPKcolumn (VirtualPgPtr p_vt, const char *column)
1418 {
1419 /* marking a PK column */
1420 int c;
1421 for (c = 0; c < p_vt->nColumns; c++)
1422 {
1423 if (strcmp (column, *(p_vt->Column + c)) == 0)
1424 {
1425 *(p_vt->IsPK + c) = 'Y';
1426 return 1;
1427 }
1428 }
1429 return 0;
1430 }
1431
1432
1433
1434 /*************************************************************
1435 /
1436 / VirtualTable methods
1437 /
1438 **************************************************************/
9831439 static int
9841440 vpg_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
9851441 sqlite3_vtab ** ppVTab, char **pzErr)
10041460 int r;
10051461 int len;
10061462 int readOnly = 1;
1463 int julianNumbers = 0;
1464 int nPKs = 0;
10071465 VirtualPgPtr p_vt = NULL;
10081466 vpgMemBuffer sql_statement;
1467 char *emsg;
1468
1469 vpgResetError (db);
10091470
10101471 if (pAux)
10111472 pAux = pAux; /* unused arg warning suppression */
10121473 /* checking arguments */
1013 if (argc == 6 || argc == 7)
1474 if (argc >= 6 || argc <= 8)
10141475 {
10151476 vtable = vpgDequoted ((char *) argv[2]);
10161477 conninfo = vpgDequoted ((char *) argv[3]);
10171478 pg_schema = vpgDequoted ((char *) argv[4]);
10181479 pg_table = vpgDequoted ((char *) argv[5]);
1019 if (argc == 7)
1480 if (argc >= 7)
10201481 {
10211482 /* testing for W */
10221483 char *wr = vpgDequoted ((char *) argv[6]);
10241485 readOnly = 0;
10251486 free (wr);
10261487 }
1488 if (argc == 8)
1489 {
1490 /* testing for J */
1491 char *julian = vpgDequoted ((char *) argv[7]);
1492 if (strcmp (julian, "J") == 0)
1493 julianNumbers = 1;
1494 free (julian);
1495 }
10271496 }
10281497 else
10291498 {
1030 *pzErr =
1499 *pzErr
1500 =
10311501 sqlite3_mprintf
1032 ("[VirtualPostgres] CREATE VIRTUAL: illegal arg list {conn_info, schema, table}\n");
1502 ("[VirtualPostgres] CREATE VIRTUAL: illegal arg list {conn_info, schema, table [ , 'W' [ , 'J' ]] }\n");
10331503 goto error;
10341504 }
10351505
10361506 /* Make a connection to the PostgreSQL database */
1037 pg_conn = PQconnectdb (conninfo);
1038 if (PQstatus (pg_conn) != CONNECTION_OK)
1039 {
1040 fprintf (stderr, "Connection to Postgres failed: %s",
1041 PQerrorMessage (pg_conn));
1042 PQfinish (pg_conn);
1043 return SQLITE_ERROR;
1507 pg_conn = vpgPQconnectdb (conninfo);
1508 if (vpgPQstatus (pg_conn) != CONNECTION_OK)
1509 {
1510 emsg =
1511 sqlite3_mprintf ("Connection to Postgres failed:\n%s",
1512 vpgPQerrorMessage (pg_conn));
1513 vpgReportError (db, emsg);
1514 sqlite3_free (emsg);
1515 vpgPQfinish (pg_conn);
1516 goto create_emergency_default;
10441517 }
10451518
10461519 /* retrieving the PosgreSQL table columns */
10521525 "JOIN pg_type AS d ON (c.atttypid = d.oid) "
10531526 "WHERE s.nspname = %Q AND t.relname = %Q AND c.attnum > 0 "
10541527 "ORDER BY c.attnum", pg_schema, pg_table);
1055 res = PQexec (pg_conn, sql);
1528 res = vpgPQexec (pg_conn, sql);
10561529 sqlite3_free (sql);
1057 if (PQresultStatus (res) != PGRES_TUPLES_OK)
1530 if (vpgPQresultStatus (res) != PGRES_TUPLES_OK)
10581531 goto illegal;
1059 nRows = PQntuples (res);
1060 nFields = PQnfields (res);
1532 nRows = vpgPQntuples (res);
1533 nFields = vpgPQnfields (res);
10611534 if (nRows > 0 && nFields == 4)
10621535 {
10631536 p_vt = (VirtualPgPtr) sqlite3_malloc (sizeof (VirtualPg));
10641537 if (!p_vt)
10651538 return SQLITE_NOMEM;
10661539 p_vt->db = db;
1540 p_vt->isView = 0;
10671541 p_vt->readOnly = readOnly;
1542 p_vt->pendingTransaction = 0;
1543 p_vt->julianNumbers = julianNumbers;
10681544 p_vt->pg_conn = pg_conn;
10691545 p_vt->nRef = 0;
10701546 p_vt->zErrMsg = NULL;
10801556 p_vt->Mapping = sqlite3_malloc (sizeof (int) * nRows);
10811557 p_vt->MaxSize = sqlite3_malloc (sizeof (int) * nRows);
10821558 p_vt->NotNull = sqlite3_malloc (sizeof (int) * nRows);
1559 p_vt->IsPK = sqlite3_malloc (sizeof (char) * nRows);
10831560 p_vt->newRowid = 0;
1561 p_vt->PKstrings = NULL;
1562 p_vt->PKidx = NULL;
1563 p_vt->PKrows = 0;
1564 p_vt->PKcols = 0;
10841565 for (r = 0; r < p_vt->nColumns; r++)
10851566 {
10861567 *(p_vt->Column + r) = NULL;
10881569 *(p_vt->Mapping + r) = SQLITE_NULL;
10891570 *(p_vt->MaxSize + r) = -1;
10901571 *(p_vt->NotNull + r) = -1;
1572 *(p_vt->IsPK + r) = 'N';
10911573 }
10921574 for (r = 0; r < nRows; r++)
10931575 {
1094 col_name = PQgetvalue (res, r, 0);
1095 col_type = PQgetvalue (res, r, 1);
1096 max_size = atoi (PQgetvalue (res, r, 2));
1576 col_name = vpgPQgetvalue (res, r, 0);
1577 col_type = vpgPQgetvalue (res, r, 1);
1578 max_size = atoi (vpgPQgetvalue (res, r, 2));
10971579 if (max_size > 0)
10981580 max_size -= 4;
1099 is_not_null = PQgetvalue (res, r, 3);
1581 is_not_null = vpgPQgetvalue (res, r, 3);
11001582 if (*is_not_null == 't')
11011583 not_null = 1;
11021584 else
11121594 *(p_vt->NotNull + r) = not_null;
11131595 }
11141596 }
1115 PQclear (res);
1597 vpgPQclear (res);
11161598 res = NULL;
11171599
11181600 if (p_vt == NULL)
11191601 goto illegal;
1602
1603 /* retrieving all PosgreSQL PK columns */
1604 sql =
1605 sqlite3_mprintf
1606 ("SELECT a.attname FROM pg_index AS i "
1607 "JOIN pg_attribute AS a ON (a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey)) "
1608 "WHERE i.indrelid = '%s.%s'::regclass AND i.indisprimary", pg_schema,
1609 pg_table);
1610 res = vpgPQexec (pg_conn, sql);
1611 sqlite3_free (sql);
1612 if (vpgPQresultStatus (res) != PGRES_TUPLES_OK)
1613 goto illegal;
1614 nRows = vpgPQntuples (res);
1615 nFields = vpgPQnfields (res);
1616 if (nRows > 0 && nFields == 1)
1617 {
1618 for (r = 0; r < nRows; r++)
1619 {
1620 col_name = vpgPQgetvalue (res, r, 0);
1621 if (!vpg_setPKcolumn (p_vt, col_name))
1622 goto illegal;
1623 nPKs++;
1624 }
1625 }
1626 vpgPQclear (res);
1627 res = NULL;
1628 if (nPKs == 0)
1629 {
1630 /* missing PK; defaulting to ReadOnly */
1631 p_vt->readOnly = 1;
1632 }
11201633
11211634 /* preparing the COLUMNs for this VIRTUAL TABLE */
11221635 vpgMemBufferInitialize (&sql_statement);
11651678 {
11661679 if (sqlite3_declare_vtab (db, sql_statement.Buffer) != SQLITE_OK)
11671680 {
1168 *pzErr =
1681 *pzErr
1682 =
11691683 sqlite3_mprintf
11701684 ("[VirtualPostgres] CREATE VIRTUAL: invalid SQL statement \"%s\"",
11711685 sql);
11751689 }
11761690 else
11771691 goto error;
1178 p_vt->CTIDs = NULL;
1179 p_vt->nCTIDs = 0;
1692 *ppVTab = (sqlite3_vtab *) p_vt;
1693 free (vtable);
1694 free (conninfo);
1695 vpgCheckView (pg_conn, pg_schema, pg_table, p_vt);
1696 free (pg_schema);
1697 free (pg_table);
1698 return SQLITE_OK;
1699
1700 create_emergency_default:
1701 /* preparing a fake VIRTUAL TABLE */
1702 xname = vpgDoubleQuoted (vtable);
1703 sql = sqlite3_mprintf ("CREATE TABLE %s (dummy integer)", xname);
1704 free (xname);
1705 if (sqlite3_declare_vtab (db, sql) != SQLITE_OK)
1706 {
1707 *pzErr
1708 =
1709 sqlite3_mprintf
1710 ("[VirtualPostgres] CREATE VIRTUAL: invalid SQL statement \"%s\"",
1711 sql);
1712 goto error;
1713 }
1714 sqlite3_free (sql);
1715 nRows = 1;
1716 p_vt = (VirtualPgPtr) sqlite3_malloc (sizeof (VirtualPg));
1717 if (!p_vt)
1718 return SQLITE_NOMEM;
1719 p_vt->db = db;
1720 p_vt->isView = 0;
1721 p_vt->readOnly = 1;
1722 p_vt->pendingTransaction = 0;
1723 p_vt->julianNumbers = 0;
1724 p_vt->pg_conn = NULL;
1725 p_vt->nRef = 0;
1726 p_vt->zErrMsg = NULL;
1727 len = strlen (pg_schema);
1728 p_vt->pg_schema = sqlite3_malloc (len + 1);
1729 strcpy (p_vt->pg_schema, pg_schema);
1730 len = strlen (pg_table);
1731 p_vt->pg_table = sqlite3_malloc (len + 1);
1732 strcpy (p_vt->pg_table, pg_table);
1733 p_vt->nColumns = nRows;
1734 p_vt->Column = sqlite3_malloc (sizeof (char *) * nRows);
1735 p_vt->Type = sqlite3_malloc (sizeof (char *) * nRows);
1736 p_vt->Mapping = sqlite3_malloc (sizeof (int) * nRows);
1737 p_vt->MaxSize = sqlite3_malloc (sizeof (int) * nRows);
1738 p_vt->NotNull = sqlite3_malloc (sizeof (int) * nRows);
1739 p_vt->IsPK = sqlite3_malloc (sizeof (char) * nRows);
1740 p_vt->newRowid = 0;
1741 p_vt->PKstrings = NULL;
1742 p_vt->PKidx = NULL;
1743 p_vt->PKrows = 0;
1744 p_vt->PKcols = 0;
1745 for (r = 0; r < p_vt->nColumns; r++)
1746 {
1747 *(p_vt->Column + r) = NULL;
1748 *(p_vt->Type + r) = NULL;
1749 *(p_vt->Mapping + r) = SQLITE_NULL;
1750 *(p_vt->MaxSize + r) = -1;
1751 *(p_vt->NotNull + r) = -1;
1752 *(p_vt->IsPK + r) = 'N';
1753 }
1754 for (r = 0; r < nRows; r++)
1755 {
1756 col_name = "dummy";
1757 col_type = "integer";
1758 not_null = 0;
1759 max_size = 10;
1760 len = strlen (col_name);
1761 *(p_vt->Column + r) = sqlite3_malloc (len + 1);
1762 strcpy (*(p_vt->Column + r), col_name);
1763 len = strlen (col_type);
1764 *(p_vt->Type + r) = sqlite3_malloc (len + 1);
1765 strcpy (*(p_vt->Type + r), col_type);
1766 *(p_vt->Mapping + r) = vpgMapType (col_type);
1767 *(p_vt->MaxSize + r) = max_size;
1768 *(p_vt->NotNull + r) = not_null;
1769 }
11801770 *ppVTab = (sqlite3_vtab *) p_vt;
11811771 free (vtable);
11821772 free (conninfo);
11831773 free (pg_schema);
11841774 free (pg_table);
11851775 return SQLITE_OK;
1776
11861777 illegal:
11871778 /* something has gone the wrong way */
11881779 if (res != NULL)
1189 PQclear (res);
1190 *pzErr =
1780 vpgPQclear (res);
1781 *pzErr
1782 =
11911783 sqlite3_mprintf
11921784 ("[VirtualPostgres] '%s'.'%s' isn't a valid Postgres table\n",
11931785 pg_schema, pg_table);
12481840 PGresult *res;
12491841 int nRows;
12501842 int nFields;
1843 int first = 1;
12511844 vpgMemBuffer sql_statement;
12521845 VirtualPgCursorPtr cursor = NULL;
12531846 VirtualPgPtr p_vt = (VirtualPgPtr) pVTab;
12541847
12551848 /* preparing the PostgreSQL query */
12561849 vpgMemBufferInitialize (&sql_statement);
1257 vpgMemBufferAppend (&sql_statement, "SELECT ctid");
1850 vpgMemBufferAppend (&sql_statement, "SELECT");
12581851 for (c = 0; c < p_vt->nColumns; c++)
12591852 {
12601853 xname = vpgDoubleQuoted (*(p_vt->Column + c));
1261 vpgMemBufferAppend (&sql_statement, ", ");
1854 if (first)
1855 {
1856 first = 0;
1857 vpgMemBufferAppend (&sql_statement, " ");
1858 }
1859 else
1860 vpgMemBufferAppend (&sql_statement, ", ");
12621861 vpgMemBufferAppend (&sql_statement, xname);
12631862 free (xname);
12641863 }
12701869 xname = vpgDoubleQuoted (p_vt->pg_table);
12711870 vpgMemBufferAppend (&sql_statement, xname);
12721871 free (xname);
1872 if (p_vt->readOnly == 0)
1873 {
1874 /* appending the ORDER BY <PK> clause */
1875 char *orderBy = vpgBuildPkOrderBy (p_vt);
1876 if (orderBy != NULL)
1877 {
1878 vpgMemBufferAppend (&sql_statement, orderBy);
1879 sqlite3_free (orderBy);
1880 }
1881 }
12731882 if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
12741883 {
1275 res = PQexec (p_vt->pg_conn, sql_statement.Buffer);
1276 if (PQresultStatus (res) != PGRES_TUPLES_OK)
1884 res = vpgPQexec (p_vt->pg_conn, sql_statement.Buffer);
1885 if (vpgPQresultStatus (res) != PGRES_TUPLES_OK)
12771886 goto illegal;
1278 nRows = PQntuples (res);
1279 nFields = PQnfields (res);
1887 nRows = vpgPQntuples (res);
1888 nFields = vpgPQnfields (res);
12801889 vpgMemBufferReset (&sql_statement);
12811890 }
12821891 else
12991908 cursor->pVtab = p_vt;
13001909 cursor->eof = 0;
13011910 cursor->currentRow = 0;
1302 /* saving all CTIDs */
1303 if (p_vt->CTIDs != NULL)
1304 {
1305 for (c = 0; c < p_vt->nCTIDs; c++)
1306 {
1307 if (*(p_vt->CTIDs + c) != NULL)
1308 free (*(p_vt->CTIDs + c));
1309 }
1310 free (p_vt->CTIDs);
1311 }
1312 p_vt->CTIDs = NULL;
1313 p_vt->nCTIDs = 0;
1314 p_vt->nCTIDs = nRows;
1315 if (nRows > 0)
1316 {
1317 p_vt->CTIDs = malloc (sizeof (char *) * nRows);
1318 for (c = 0; c < nRows; c++)
1319 {
1320 const char *ctid = PQgetvalue (res, c, 0);
1321 int len = strlen (ctid);
1322 *(p_vt->CTIDs + c) = malloc (len + 1);
1323 strcpy (*(p_vt->CTIDs + c), ctid);
1911 if (p_vt->readOnly == 0)
1912 {
1913 /* saving all PK values */
1914 vpgFreePKstrings (p_vt);
1915 p_vt->PKcols = vpgCountPKcols (p_vt);
1916 if (nRows > 0 && p_vt->PKcols > 0)
1917 {
1918 /* allocating and initializing the PK struct */
1919 int k;
1920 int r;
1921 int nPKs = nRows * p_vt->PKcols;
1922 p_vt->PKrows = nRows;
1923 p_vt->PKstrings = malloc (sizeof (char *) * nPKs);
1924 p_vt->PKidx = malloc (sizeof (int) * p_vt->PKcols);
1925 r = 0;
1926 for (c = 0; c < p_vt->nColumns; c++)
1927 {
1928 /* initializing the PK column indices array */
1929 if (*(p_vt->IsPK + c) == 'Y')
1930 {
1931 *(p_vt->PKidx + r) = c;
1932 r++;
1933 }
1934 }
1935 k = 0;
1936 for (r = 0; r < nRows; r++)
1937 {
1938 for (c = 0; c < p_vt->PKcols; c++)
1939 {
1940 if (vpgPQgetisnull (res, r, *(p_vt->PKidx + c)))
1941 *(p_vt->PKstrings + k) = NULL;
1942 else
1943 {
1944 int len;
1945 const char *value = vpgPQgetvalue (res, r,
1946 *
1947 (p_vt->
1948 PKidx +
1949 c));
1950 len = strlen (value);
1951 *(p_vt->PKstrings + k) = malloc (len + 1);
1952 strcpy (*(p_vt->PKstrings + k), value);
1953 }
1954 k++;
1955 }
1956 }
13241957 }
13251958 }
13261959
13281961 vpgReadRow (cursor);
13291962 return SQLITE_OK;
13301963 illegal:
1331 PQclear (res);
1964 vpgPQclear (res);
1965 vpgMemBufferReset (&sql_statement);
13321966 return SQLITE_ERROR;
13331967 }
13341968
13411975 for (c = 0; c < cursor->nColumns; c++)
13421976 vpgFreeValue (*(cursor->Values + c));
13431977 sqlite3_free (cursor->Values);
1344 PQclear (cursor->resultSet);
1978 vpgPQclear (cursor->resultSet);
13451979 sqlite3_free (pCursor);
13461980 return SQLITE_OK;
13471981 }
14262060 /* generic update [INSERT / UPDATE / DELETE] */
14272061 int ret;
14282062 int nRow;
1429 const char *ctid;
14302063 VirtualPgPtr p_vt = (VirtualPgPtr) pVTab;
14312064 if (p_vt->readOnly)
14322065 return SQLITE_READONLY;
14342067 {
14352068 /* performing a DELETE */
14362069 nRow = sqlite3_value_int (argv[0]);
1437 ctid = vpgGetCTID (p_vt, nRow);
1438 if (ctid == NULL)
1439 return SQLITE_ERROR;
1440 ret = vpgDeleteRow (p_vt, ctid);
2070 ret = vpgDeleteRow (p_vt, nRow);
14412071 }
14422072 else
14432073 {
14522082 {
14532083 /* performing an UPDATE */
14542084 nRow = sqlite3_value_int (argv[0]);
1455 ctid = vpgGetCTID (p_vt, nRow);
1456 if (ctid == NULL)
1457 return SQLITE_ERROR;
1458 ret = vpgUpdateRow (p_vt, ctid, argc, argv);
2085 ret = vpgUpdateRow (p_vt, nRow, argc, argv);
14592086 }
14602087 }
14612088 return ret;
14652092 vpg_begin (sqlite3_vtab * pVTab)
14662093 {
14672094 /* BEGIN TRANSACTION */
2095 VirtualPgPtr p_vt = (VirtualPgPtr) pVTab;
2096 if (pVTab)
2097 pVTab = pVTab; /* unused arg warning suppression */
2098 if (p_vt->readOnly == 0)
2099 {
2100 /* Beginning a PostgreSQL Transaction */
2101 PGresult *res = vpgPQexec (p_vt->pg_conn, "BEGIN");
2102 if (vpgPQresultStatus (res) != PGRES_COMMAND_OK)
2103 goto end;
2104 vpgPQclear (res);
2105 p_vt->pendingTransaction = 1;
2106 }
2107 end:
2108 return SQLITE_OK;
2109 }
2110
2111 static int
2112 vpg_sync (sqlite3_vtab * pVTab)
2113 {
2114 /* SYNC */
14682115 if (pVTab)
14692116 pVTab = pVTab; /* unused arg warning suppression */
14702117 return SQLITE_OK;
14712118 }
14722119
14732120 static int
1474 vpg_sync (sqlite3_vtab * pVTab)
1475 {
1476 /* BEGIN TRANSACTION */
2121 vpg_commit (sqlite3_vtab * pVTab)
2122 {
2123 /* COMMIT TRANSACTION */
2124 VirtualPgPtr p_vt = (VirtualPgPtr) pVTab;
14772125 if (pVTab)
14782126 pVTab = pVTab; /* unused arg warning suppression */
2127 if (p_vt->pendingTransaction)
2128 {
2129 /* Committing a PostgreSQL Transaction */
2130 PGresult *res = vpgPQexec (p_vt->pg_conn, "COMMIT");
2131 if (vpgPQresultStatus (res) != PGRES_COMMAND_OK)
2132 goto end;
2133 vpgPQclear (res);
2134 p_vt->pendingTransaction = 0;
2135 }
2136 end:
14792137 return SQLITE_OK;
14802138 }
14812139
14822140 static int
1483 vpg_commit (sqlite3_vtab * pVTab)
1484 {
1485 /* BEGIN TRANSACTION */
2141 vpg_rollback (sqlite3_vtab * pVTab)
2142 {
2143 /* ROLLBACK TRANSACTION */
2144 VirtualPgPtr p_vt = (VirtualPgPtr) pVTab;
14862145 if (pVTab)
14872146 pVTab = pVTab; /* unused arg warning suppression */
2147 if (p_vt->pendingTransaction)
2148 {
2149 /* Rolling back a PostgreSQL Transaction */
2150 PGresult *res = vpgPQexec (p_vt->pg_conn, "ROLLBACK");
2151 if (vpgPQresultStatus (res) != PGRES_COMMAND_OK)
2152 goto end;
2153 vpgPQclear (res);
2154 p_vt->pendingTransaction = 0;
2155 }
2156 end:
14882157 return SQLITE_OK;
14892158 }
14902159
14912160 static int
1492 vpg_rollback (sqlite3_vtab * pVTab)
1493 {
1494 /* BEGIN TRANSACTION */
2161 vpg_rename (sqlite3_vtab * pVTab, const char *zNew)
2162 {
2163 /* RENAME TABLE */
14952164 if (pVTab)
14962165 pVTab = pVTab; /* unused arg warning suppression */
1497 return SQLITE_OK;
1498 }
1499
1500 static void
1501 VirtualpgInit ()
2166 if (zNew)
2167 zNew = zNew; /* unused arg warning suppression */
2168 return SQLITE_ERROR;
2169 }
2170
2171 static int
2172 VirtualpgInit (sqlite3 * db)
15022173 {
15032174 /* initializing the module methods */
2175 int rc = SQLITE_OK;
15042176 my_pg_module.iVersion = 1;
15052177 my_pg_module.xCreate = &vpg_create;
15062178 my_pg_module.xConnect = &vpg_connect;
15202192 my_pg_module.xCommit = &vpg_commit;
15212193 my_pg_module.xRollback = &vpg_rollback;
15222194 my_pg_module.xFindFunction = NULL;
1523 }
1524
1525 #ifdef _WIN32
1526 __declspec (dllexport)
1527 #endif
1528 int sqlite3_modvirtualpg_init (sqlite3 * db, char **pzErrMsg,
1529 const sqlite3_api_routines * pApi)
2195 my_pg_module.xRename = &vpg_rename;
2196 sqlite3_create_module_v2 (db, "VirtualPostgres", &my_pg_module, NULL, 0);
2197 return rc;
2198 }
2199
2200 #ifndef LOADABLE_EXTENSION
2201
2202 VIRTUALPG_DECLARE int
2203 virtualpg_extension_init (sqlite3 * db, virtualPQptr virtual_api)
2204 {
2205 /* registrering the virtual table - classic library */
2206 if (virtual_api == NULL)
2207 return SQLITE_ERROR;
2208
2209 /*
2210 / initializing the virtual LibPQ methods
2211 /
2212 / the library is always based on a virtualized LibPQ
2213 / expected to be correctly initialized by the caller
2214 */
2215 pq.PQclear = NULL;
2216 pq.PQconnectdb = NULL;
2217 pq.PQerrorMessage = NULL;
2218 pq.PQexec = NULL;
2219 pq.PQfinish = NULL;
2220 pq.PQgetisnull = NULL;
2221 pq.PQgetvalue = NULL;
2222 pq.PQlibVersion = NULL;
2223 pq.PQnfields = NULL;
2224 pq.PQntuples = NULL;
2225 pq.PQresultStatus = NULL;
2226 pq.PQstatus = NULL;
2227
2228 if (virtual_api->PQclear == NULL)
2229 return SQLITE_ERROR;
2230 pq.PQclear = virtual_api->PQclear;
2231
2232 if (virtual_api->PQconnectdb == NULL)
2233 return SQLITE_ERROR;
2234 pq.PQconnectdb = virtual_api->PQconnectdb;
2235
2236 if (virtual_api->PQerrorMessage == NULL)
2237 return SQLITE_ERROR;
2238 pq.PQerrorMessage = virtual_api->PQerrorMessage;
2239
2240 if (virtual_api->PQexec == NULL)
2241 return SQLITE_ERROR;
2242 pq.PQexec = virtual_api->PQexec;
2243
2244 if (virtual_api->PQfinish == NULL)
2245 return SQLITE_ERROR;
2246 pq.PQfinish = virtual_api->PQfinish;
2247
2248 if (virtual_api->PQgetisnull == NULL)
2249 return SQLITE_ERROR;
2250 pq.PQgetisnull = virtual_api->PQgetisnull;
2251
2252 if (virtual_api->PQgetvalue == NULL)
2253 return SQLITE_ERROR;
2254 pq.PQgetvalue = virtual_api->PQgetvalue;
2255
2256 if (virtual_api->PQlibVersion == NULL)
2257 return SQLITE_ERROR;
2258 pq.PQlibVersion = virtual_api->PQlibVersion;
2259
2260 if (virtual_api->PQnfields == NULL)
2261 return SQLITE_ERROR;
2262 pq.PQnfields = virtual_api->PQnfields;
2263
2264 if (virtual_api->PQntuples == NULL)
2265 return SQLITE_ERROR;
2266 pq.PQntuples = virtual_api->PQntuples;
2267
2268 if (virtual_api->PQresultStatus == NULL)
2269 return SQLITE_ERROR;
2270 pq.PQresultStatus = virtual_api->PQresultStatus;
2271
2272 if (virtual_api->PQstatus == NULL)
2273 return SQLITE_ERROR;
2274 pq.PQstatus = virtual_api->PQstatus;
2275
2276 /* registering the VirtualTable */
2277 return VirtualpgInit (db);
2278 }
2279
2280 VIRTUALPG_DECLARE const char *
2281 virtualpg_version ()
2282 {
2283 /* returning the current Version string */
2284 return VERSION;
2285 }
2286
2287 #else /* built as LOADABLE EXTENSION only */
2288
2289 VIRTUALPG_DECLARE int
2290 sqlite3_modvirtualpg_init (sqlite3 * db, char **pzErrMsg,
2291 const sqlite3_api_routines * pApi)
15302292 {
15312293 /* Register the virtual table */
1532 int rc = SQLITE_OK;
15332294 SQLITE_EXTENSION_INIT2 (pApi);
15342295 (void) pzErrMsg;
1535 VirtualpgInit ();
1536 sqlite3_create_module (db, "VirtualPostgres", &my_pg_module, 0);
1537 return rc;
1538 }
2296
2297 /*
2298 / initializing the virtual LibPQ methods
2299 /
2300 / the loadable module is always based on hard-linked LibPQ
2301 */
2302 pq.PQclear = PQclear;
2303 pq.PQconnectdb = PQconnectdb;
2304 pq.PQerrorMessage = PQerrorMessage;
2305 pq.PQexec = PQexec;
2306 pq.PQfinish = PQfinish;
2307 pq.PQgetisnull = PQgetisnull;
2308 pq.PQgetvalue = PQgetvalue;
2309 pq.PQlibVersion = PQlibVersion;
2310 pq.PQnfields = PQnfields;
2311 pq.PQntuples = PQntuples;
2312 pq.PQresultStatus = PQresultStatus;
2313 pq.PQstatus = PQstatus;
2314
2315 return VirtualpgInit (db);
2316 }
2317
2318 #endif
0 /*
1 / virtualpg.h
2 /
3 / public declarations
4 /
5 / version 2.0.0-RC0, 2018 July 14
6 /
7 / Author: Sandro Furieri a.furieri@lqt.it
8 /
9 / ------------------------------------------------------------------------------
10 /
11 / Version: MPL 1.1/GPL 2.0/LGPL 2.1
12 /
13 / The contents of this file are subject to the Mozilla Public License Version
14 / 1.1 (the "License"); you may not use this file except in compliance with
15 / the License. You may obtain a copy of the License at
16 / http://www.mozilla.org/MPL/
17 /
18 / Software distributed under the License is distributed on an "AS IS" basis,
19 / WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
20 / for the specific language governing rights and limitations under the
21 / License.
22 /
23 / The Original Code is the VirtualPG library
24 /
25 / The Initial Developer of the Original Code is Alessandro Furieri
26 /
27 / Portions created by the Initial Developer are Copyright (C) 2013-2018
28 / the Initial Developer. All Rights Reserved.
29 /
30 / Contributor(s):
31 /
32 / Alternatively, the contents of this file may be used under the terms of
33 / either the GNU General Public License Version 2 or later (the "GPL"), or
34 / the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
35 / in which case the provisions of the GPL or the LGPL are applicable instead
36 / of those above. If you wish to allow use of your version of this file only
37 / under the terms of either the GPL or the LGPL, and not to allow others to
38 / use your version of this file under the terms of the MPL, indicate your
39 / decision by deleting the provisions above and replace them with the notice
40 / and other provisions required by the GPL or the LGPL. If you do not delete
41 / the provisions above, a recipient may use your version of this file under
42 / the terms of any one of the MPL, the GPL or the LGPL.
43 /
44 */
45
46 /**
47 \file virtualpg.h
48
49 Function declarations and constants for VirtualPG library
50 */
51 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 #ifdef DLL_EXPORT
53 #define VIRTUALPG_DECLARE __declspec(dllexport)
54 #else
55 #define VIRTUALPG_DECLARE extern
56 #endif
57 #endif
58
59 #ifndef _VIRTUALPG_H
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61 #define _VIRTUALPG_H
62 #endif
63
64 #include <libpq-fe.h>
65
66 #ifdef __cplusplus
67 extern "C"
68 {
69 #endif
70
71 /**
72 virtualized libPQ methods
73
74 \sa virtualPQptr
75 */
76 typedef struct virtualPQstruct
77 {
78 /** pointer to PQclear */
79 void (*PQclear) (PGresult * res);
80 /** pointer to PQconnectdb */
81 PGconn *(*PQconnectdb) (const char *conninfo);
82 /** pointer to PQerrorMessage */
83 char *(*PQerrorMessage) (const PGconn * conn);
84 /** pointer to PQexec */
85 PGresult *(*PQexec) (PGconn * conn, const char *command);
86 /** pointer to PQfinish */
87 void (*PQfinish) (PGconn * conn);
88 /** pointer to PQgetisnull */
89 int (*PQgetisnull) (const PGresult * res, int row_number,
90 int column_number);
91 /** pointer to PQgetvalue */
92 char *(*PQgetvalue) (const PGresult * res, int row_number,
93 int column_number);
94 /** pointer to PQlibVersion */
95 int (*PQlibVersion) (void);
96 /** pointer to PQnfields */
97 int (*PQnfields) (const PGresult * res);
98 /** pointer to PQntuples */
99 int (*PQntuples) (const PGresult * res);
100 /** pointer to PQresultStatus */
101 ExecStatusType (*PQresultStatus) (const PGresult * res);
102 /** pointer to PQstatus */
103 ConnStatusType (*PQstatus) (const PGconn * conn);
104 } virtualPQ;
105 /**
106 Typedef for virtual libPQ structure
107
108 \sa virtualPQ
109 */
110 typedef virtualPQ *virtualPQptr;
111
112 /** virtual implementation for LibPQ - PQclear */
113 VIRTUALPG_DECLARE void vpgPQclear (PGresult * res);
114 /** virtual implementation for LibPQ - PQconnectdb */
115 VIRTUALPG_DECLARE PGconn *vpgPQconnectdb (const char *conninfo);
116 /** virtual implementation for LibPQ - PQerrorMessage */
117 VIRTUALPG_DECLARE char *vpgPQerrorMessage (const PGconn * conn);
118 /** virtual implementation for LibPQ - PQexec */
119 VIRTUALPG_DECLARE PGresult *vpgPQexec (PGconn * conn, const char *command);
120 /** virtual implementation for LibPQ - PQfinish */
121 VIRTUALPG_DECLARE void vpgPQfinish (PGconn * conn);
122 /** virtual implementation for LibPQ - PQgetisnull */
123 VIRTUALPG_DECLARE int vpgPQgetisnull (const PGresult * res, int row_number,
124 int column_number);
125 /** virtual implementation for LibPQ - PQgetvalue */
126 VIRTUALPG_DECLARE char *vpgPQgetvalue (const PGresult * res, int row_number,
127 int column_number);
128 /** virtual implementation for LibPQ - PQlibVersion */
129 VIRTUALPG_DECLARE int vpgPQlibVersion(void);
130 /** virtual implementation for LibPQ - PQnfields */
131 VIRTUALPG_DECLARE int vpgPQnfields (const PGresult * res);
132 /** virtual implementation for LibPQ - PQntuples */
133 VIRTUALPG_DECLARE int vpgPQntuples (const PGresult * res);
134 /** virtual implementation for LibPQ - PQresultStatus */
135 VIRTUALPG_DECLARE ExecStatusType vpgPQresultStatus (const PGresult * res);
136 /** virtual implementation for LibPQ - PQstatus */
137 VIRTUALPG_DECLARE ConnStatusType vpgPQstatus (const PGconn * conn);
138
139 /**
140 Return the current library version.
141
142 \return the version string.
143 */
144 VIRTUALPG_DECLARE const char *virtualpg_version (void);
145
146 /**
147 Initializes libvirtualpg as an extension to SQLite
148
149 \param db_handle pointer to the current DB connection.
150 \param virtual_api pointer to a virtualPQ struct.
151
152 \return SQLITE_OK will be returned on success, otherwise any appropriate
153 error code on failure.
154 */
155 VIRTUALPG_DECLARE int virtualpg_extension_init (sqlite3 * db_handle,
156 virtualPQptr virtual_api);
157
158 #ifdef __cplusplus
159 }
160 #endif
161
162 #endif /* _VIRTUALPG_H */
0 # Package Information for pkg-config
1
2 prefix=@prefix@
3 exec_prefix=@exec_prefix@
4 libdir=@libdir@
5 includedir=@includedir@
6
7 Name: virtualpg
8 Description: a library for accessing the PostgreSQL DBMS from SpatiaLite
9 Version: @VERSION@
10 Libs: -L${libdir} -lvirtualpg
11 Cflags: -I${includedir}