From 2e21b218db0e979d56b7b6027854a86ad7ffc96b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 May 2024 08:45:22 +0200 Subject: Add libbutl-pkg-config source subdirectory This is an additional (to libbutl) utility library which contains the source code of libpkg-config configured and tuned for our needs. --- libbutl-pkg-config/libpkg-config/config.h | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 libbutl-pkg-config/libpkg-config/config.h (limited to 'libbutl-pkg-config/libpkg-config/config.h') diff --git a/libbutl-pkg-config/libpkg-config/config.h b/libbutl-pkg-config/libpkg-config/config.h new file mode 100644 index 0000000..c1c5e8d --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/config.h @@ -0,0 +1,41 @@ +/* file : libpkg-config/config.h.in -*- C -*- + * license : ISC; see accompanying COPYING file + */ +#ifndef LIBPKG_CONFIG_CONFIG_H +#define LIBPKG_CONFIG_CONFIG_H + +#if defined(__linux__) +# include /* __GLIBC__, __GLIBC_MINOR__ */ +#endif + +/* + * strndup() is not present on Windows while strl*() are only present on + * *BSD and MacOS. + * + */ +#if !defined(_WIN32) +# define HAVE_STRNDUP 1 +#endif + +/* + * GNU libc added strlcpy() and strlcat() in version 2.38 (in anticipation + * of their addition to POSIX). + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(__APPLE__) || \ + (defined(__GLIBC__) && \ + defined(__GLIBC_MINOR__) && \ + (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 38)) +# define HAVE_STRLCPY 1 +# define HAVE_STRLCAT 1 +#endif + +#define LIBPKG_CONFIG_PROJECT_URL "https://github.com/build2/libpkg-config" + +#define PKG_CONFIG_DEFAULT_PATH "" +#define SYSTEM_INCLUDEDIR "" +#define SYSTEM_LIBDIR "" + +#endif /* LIBPKG_CONFIG_CONFIG_H */ -- cgit v1.1