"Fossies" - the Fresh Open Source Software Archive

Member "pkg-config-0.29.2/pkg.h" (19 Mar 2017, 4475 Bytes) of package /linux/misc/pkg-config-0.29.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pkg.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.29.1_vs_0.29.2.

    1 /* 
    2  * Copyright (C) 2001, 2002 Red Hat Inc.
    3  * 
    4  * This program is free software; you can redistribute it and/or
    5  * modify it under the terms of the GNU General Public License as
    6  * published by the Free Software Foundation; either version 2 of the
    7  * License, or (at your option) any later version.
    8  *
    9  * This program is distributed in the hope that it will be useful, but
   10  * WITHOUT ANY WARRANTY; without even the implied warranty of
   11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12  * General Public License for more details.
   13  * 
   14  * You should have received a copy of the GNU General Public License
   15  * along with this program; if not, write to the Free Software
   16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   17  * 02111-1307, USA.
   18  */
   19 
   20 #ifndef PKG_CONFIG_PKG_H
   21 #define PKG_CONFIG_PKG_H
   22 
   23 #include <glib.h>
   24 
   25 typedef guint8 FlagType; /* bit mask for flag types */
   26 
   27 #define LIBS_l       (1 << 0)
   28 #define LIBS_L       (1 << 1)
   29 #define LIBS_OTHER   (1 << 2)
   30 #define CFLAGS_I     (1 << 3)
   31 #define CFLAGS_OTHER (1 << 4)
   32 
   33 #define LIBS_ANY     (LIBS_l | LIBS_L | LIBS_OTHER)
   34 #define CFLAGS_ANY   (CFLAGS_I | CFLAGS_OTHER)
   35 #define FLAGS_ANY    (LIBS_ANY | CFLAGS_ANY)
   36 
   37 typedef enum
   38 {
   39   LESS_THAN,
   40   GREATER_THAN,
   41   LESS_THAN_EQUAL,
   42   GREATER_THAN_EQUAL,
   43   EQUAL,
   44   NOT_EQUAL,
   45   ALWAYS_MATCH
   46 } ComparisonType;
   47 
   48 typedef struct Flag_ Flag;
   49 typedef struct Package_ Package;
   50 typedef struct RequiredVersion_ RequiredVersion;
   51 
   52 struct Flag_
   53 {
   54   FlagType type;
   55   char *arg;
   56 };
   57 
   58 struct RequiredVersion_
   59 {
   60   char *name;
   61   ComparisonType comparison;
   62   char *version;
   63   Package *owner;
   64 };
   65 
   66 struct Package_
   67 {
   68   char *key;  /* filename name */
   69   char *name; /* human-readable name */
   70   char *version;
   71   char *description;
   72   char *url;
   73   char *pcfiledir; /* directory it was loaded from */
   74   GList *requires_entries;
   75   GList *requires;
   76   GList *requires_private_entries;
   77   GList *requires_private;
   78   GList *libs;
   79   GList *cflags;
   80   GHashTable *vars;
   81   GHashTable *required_versions; /* hash from name to RequiredVersion */
   82   GList *conflicts; /* list of RequiredVersion */
   83   gboolean uninstalled; /* used the -uninstalled file */
   84   int path_position; /* used to order packages by position in path of their .pc file, lower number means earlier in path */
   85   int libs_num; /* Number of times the "Libs" header has been seen */
   86   int libs_private_num;  /* Number of times the "Libs.private" header has been seen */
   87   char *orig_prefix; /* original prefix value before redefinition */
   88 };
   89 
   90 Package *get_package               (const char *name);
   91 Package *get_package_quiet         (const char *name);
   92 char *   packages_get_flags        (GList      *pkgs,
   93                                     FlagType   flags);
   94 char *   package_get_var           (Package    *pkg,
   95                                     const char *var);
   96 char *   packages_get_var          (GList      *pkgs,
   97                                     const char *var);
   98 
   99 void add_search_dir (const char *path);
  100 void add_search_dirs (const char *path, const char *separator);
  101 void package_init (gboolean want_list);
  102 int compare_versions (const char * a, const char *b);
  103 gboolean version_test (ComparisonType comparison,
  104                        const char *a,
  105                        const char *b);
  106 
  107 const char *comparison_to_str (ComparisonType comparison);
  108 
  109 void print_package_list (void);
  110 
  111 void define_global_variable (const char *varname,
  112                              const char *varval);
  113 
  114 void debug_spew (const char *format, ...);
  115 void verbose_error (const char *format, ...);
  116 
  117 gboolean name_ends_in_uninstalled (const char *str);
  118 
  119 void enable_private_libs(void);
  120 void disable_private_libs(void);
  121 void enable_requires(void);
  122 void disable_requires(void);
  123 void enable_requires_private(void);
  124 void disable_requires_private(void);
  125 
  126 /* If TRUE, do not automatically prefer uninstalled versions */
  127 extern gboolean disable_uninstalled;
  128 
  129 extern char *pcsysrootdir;
  130 
  131 /* pkg-config default search path. On Windows the current pkg-config install
  132  * directory is used. Otherwise, the build-time defined PKG_CONFIG_PC_PATH.
  133  */
  134 extern char *pkg_config_pc_path;
  135 
  136 /* Exit on parse errors if TRUE. */
  137 extern gboolean parse_strict;
  138 
  139 /* If TRUE, define "prefix" in .pc files at runtime. */
  140 extern gboolean define_prefix;
  141 
  142 /* The name of the variable that acts as prefix, unless it is "prefix" */
  143 extern char *prefix_variable;
  144 
  145 #ifdef G_OS_WIN32
  146 /* If TRUE, output flags in MSVC syntax. */
  147 extern gboolean msvc_syntax;
  148 #endif
  149 
  150 #endif