aboutsummaryrefslogtreecommitdiff
path: root/libbase/include/core/config
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-02 02:07:38 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-02 02:07:38 +0800
commite3c4c7709f65404bcf8ce195a518e7d445e768d2 (patch)
tree48ac475db03a63827f8910acce982fead7612d26 /libbase/include/core/config
parent02b615c8704aeda9a94cf5457c9c78de847c911a (diff)
downloadrcc-project-e3c4c7709f65404bcf8ce195a518e7d445e768d2.tar.gz
rcc-project-e3c4c7709f65404bcf8ce195a518e7d445e768d2.tar.xz
Restructure libbase and RCCCore build
Diffstat (limited to 'libbase/include/core/config')
-rw-r--r--libbase/include/core/config/config.h.cmake219
-rw-r--r--libbase/include/core/config/libbase-config.h.cmake89
2 files changed, 308 insertions, 0 deletions
diff --git a/libbase/include/core/config/config.h.cmake b/libbase/include/core/config/config.h.cmake
new file mode 100644
index 0000000..cf9b602
--- /dev/null
+++ b/libbase/include/core/config/config.h.cmake
@@ -0,0 +1,219 @@
+#ifndef LIBBASE_PRIVATE_CONFIG_H
+#define LIBBASE_PRIVATE_CONFIG_H
+
+// Include this header only under the libbase source tree.
+// This is a private header.
+
+/* Exported configuration */
+#include "core/config/libbase-config.h"
+
+/* Define to 1 to enable backtraces, and to 0 otherwise. */
+#cmakedefine01 ENABLE_BACKTRACES
+
+/* Define to 1 to enable crash overrides, and to 0 otherwise. */
+#cmakedefine01 ENABLE_CRASH_OVERRIDES
+
+/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */
+#cmakedefine01 RCC_ENABLE_CRASH_DUMPS
+
+/* Define to 1 to prefer forward slashes on Windows, and to 0 otherwise. */
+#cmakedefine01 RCC_WINDOWS_PREFER_FORWARD_SLASH
+
+/* Define to 1 if you have the `backtrace' function. */
+#cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
+
+#define BACKTRACE_HEADER <${BACKTRACE_HEADER}>
+
+/* can use __crashreporter_info__ */
+#cmakedefine01 HAVE_CRASHREPORTER_INFO
+
+/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
+ don't. */
+#cmakedefine01 HAVE_DECL_ARC4RANDOM
+
+/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you
+ don't. */
+#cmakedefine01 HAVE_DECL_STRERROR_S
+
+/* Define if dlopen() is available on this platform. */
+#cmakedefine HAVE_DLOPEN ${HAVE_DLOPEN}
+
+/* Define to 1 if you have the `futimens' function. */
+#cmakedefine HAVE_FUTIMENS ${HAVE_FUTIMENS}
+
+/* Define to 1 if you have the `futimes' function. */
+#cmakedefine HAVE_FUTIMES ${HAVE_FUTIMES}
+
+/* Define to 1 if you have the `getpagesize' function. */
+#cmakedefine HAVE_GETPAGESIZE ${HAVE_GETPAGESIZE}
+
+/* Define to 1 if you have the `getrusage' function. */
+#cmakedefine HAVE_GETRUSAGE ${HAVE_GETRUSAGE}
+
+/* Define to 1 if you have the `isatty' function. */
+#cmakedefine HAVE_ISATTY 1
+
+/* Define to 1 if you have the `edit' library (-ledit). */
+#cmakedefine HAVE_LIBEDIT ${HAVE_LIBEDIT}
+
+/* Define to 1 if you have the `psapi' library (-lpsapi). */
+#cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI}
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#cmakedefine HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD}
+
+/* Define to 1 if you have the `pthread_getname_np' function. */
+#cmakedefine HAVE_PTHREAD_GETNAME_NP ${HAVE_PTHREAD_GETNAME_NP}
+
+/* Define to 1 if you have the `pthread_setname_np' function. */
+#cmakedefine HAVE_PTHREAD_SETNAME_NP ${HAVE_PTHREAD_SETNAME_NP}
+
+/* Define to 1 if you have the `pthread_get_name_np' function. */
+#cmakedefine HAVE_PTHREAD_GET_NAME_NP ${HAVE_PTHREAD_GET_NAME_NP}
+
+/* Define to 1 if you have the `pthread_set_name_np' function. */
+#cmakedefine HAVE_PTHREAD_SET_NAME_NP ${HAVE_PTHREAD_SET_NAME_NP}
+
+/* Define to 1 if you have the <mach/mach.h> header file. */
+#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}
+
+/* Define to 1 if you have the `mallctl' function. */
+#cmakedefine HAVE_MALLCTL ${HAVE_MALLCTL}
+
+/* Define to 1 if you have the `mallinfo' function. */
+#cmakedefine HAVE_MALLINFO ${HAVE_MALLINFO}
+
+/* Define to 1 if you have the `mallinfo2' function. */
+#cmakedefine HAVE_MALLINFO2 ${HAVE_MALLINFO2}
+
+/* Define to 1 if you have the <malloc/malloc.h> header file. */
+#cmakedefine HAVE_MALLOC_MALLOC_H ${HAVE_MALLOC_MALLOC_H}
+
+/* Define to 1 if you have the `malloc_zone_statistics' function. */
+#cmakedefine HAVE_MALLOC_ZONE_STATISTICS ${HAVE_MALLOC_ZONE_STATISTICS}
+
+/* Define to 1 if you have the `posix_spawn' function. */
+#cmakedefine HAVE_POSIX_SPAWN ${HAVE_POSIX_SPAWN}
+
+/* Define to 1 if you have the `pread' function. */
+#cmakedefine HAVE_PREAD ${HAVE_PREAD}
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#cmakedefine HAVE_PTHREAD_H ${HAVE_PTHREAD_H}
+
+/* Have pthread_rwlock_init */
+#cmakedefine HAVE_PTHREAD_RWLOCK_INIT ${HAVE_PTHREAD_RWLOCK_INIT}
+
+/* Define to 1 if you have the `sbrk' function. */
+#cmakedefine HAVE_SBRK ${HAVE_SBRK}
+
+/* Define to 1 if you have the `setenv' function. */
+#cmakedefine HAVE_SETENV ${HAVE_SETENV}
+
+/* Define to 1 if you have the `sigaltstack' function. */
+#cmakedefine HAVE_SIGALTSTACK ${HAVE_SIGALTSTACK}
+
+/* Define to 1 if you have the `strerror_r' function. */
+#cmakedefine HAVE_STRERROR_R ${HAVE_STRERROR_R}
+
+/* Define to 1 if you have the `sysconf' function. */
+#cmakedefine HAVE_SYSCONF ${HAVE_SYSCONF}
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#cmakedefine HAVE_SYS_MMAN_H ${HAVE_SYS_MMAN_H}
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H}
+
+/* Define to 1 if stat struct has st_mtimespec member .*/
+#cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC ${HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC}
+
+/* Define to 1 if stat struct has st_mtim member. */
+#cmakedefine HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC ${HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC}
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
+
+/* Have host's _alloca */
+#cmakedefine HAVE__ALLOCA ${HAVE__ALLOCA}
+
+/* Define to 1 if you have the `_chsize_s' function. */
+#cmakedefine HAVE__CHSIZE_S ${HAVE__CHSIZE_S}
+
+/* Define to 1 if you have the `_Unwind_Backtrace' function. */
+#cmakedefine HAVE__UNWIND_BACKTRACE ${HAVE__UNWIND_BACKTRACE}
+
+/* Have host's __alloca */
+#cmakedefine HAVE___ALLOCA ${HAVE___ALLOCA}
+
+/* Have host's __ashldi3 */
+#cmakedefine HAVE___ASHLDI3 ${HAVE___ASHLDI3}
+
+/* Have host's __ashrdi3 */
+#cmakedefine HAVE___ASHRDI3 ${HAVE___ASHRDI3}
+
+/* Have host's __chkstk */
+#cmakedefine HAVE___CHKSTK ${HAVE___CHKSTK}
+
+/* Have host's __chkstk_ms */
+#cmakedefine HAVE___CHKSTK_MS ${HAVE___CHKSTK_MS}
+
+/* Have host's __cmpdi2 */
+#cmakedefine HAVE___CMPDI2 ${HAVE___CMPDI2}
+
+/* Have host's __divdi3 */
+#cmakedefine HAVE___DIVDI3 ${HAVE___DIVDI3}
+
+/* Have host's __fixdfdi */
+#cmakedefine HAVE___FIXDFDI ${HAVE___FIXDFDI}
+
+/* Have host's __fixsfdi */
+#cmakedefine HAVE___FIXSFDI ${HAVE___FIXSFDI}
+
+/* Have host's __floatdidf */
+#cmakedefine HAVE___FLOATDIDF ${HAVE___FLOATDIDF}
+
+/* Have host's __lshrdi3 */
+#cmakedefine HAVE___LSHRDI3 ${HAVE___LSHRDI3}
+
+/* Have host's __main */
+#cmakedefine HAVE___MAIN ${HAVE___MAIN}
+
+/* Have host's __moddi3 */
+#cmakedefine HAVE___MODDI3 ${HAVE___MODDI3}
+
+/* Have host's __udivdi3 */
+#cmakedefine HAVE___UDIVDI3 ${HAVE___UDIVDI3}
+
+/* Have host's __umoddi3 */
+#cmakedefine HAVE___UMODDI3 ${HAVE___UMODDI3}
+
+/* Have host's ___chkstk */
+#cmakedefine HAVE____CHKSTK ${HAVE____CHKSTK}
+
+/* Have host's ___chkstk_ms */
+#cmakedefine HAVE____CHKSTK_MS ${HAVE____CHKSTK_MS}
+
+/* Define if ICU library is available */
+#cmakedefine01 HAVE_ICU
+
+/* Define if Windows vendored ICU is available */
+#cmakedefine01 HAVE_WINDOWS_ICU
+
+/* Define if iconv library is available */
+#cmakedefine01 HAVE_ICONV
+
+/* Define to a function implementing stricmp */
+#cmakedefine stricmp ${stricmp}
+
+/* Define to a function implementing strdup */
+#cmakedefine strdup ${strdup}
+
+/* Whether Timers signpost passes in Xcode Instruments */
+#cmakedefine01 RCC_SUPPORT_XCODE_SIGNPOSTS
+
+#cmakedefine HAVE_PROC_PID_RUSAGE 1
+
+#cmakedefine HAVE_GETAUXVAL ${HAVE_GETAUXVAL}
+
+#endif
diff --git a/libbase/include/core/config/libbase-config.h.cmake b/libbase/include/core/config/libbase-config.h.cmake
new file mode 100644
index 0000000..2ea111b
--- /dev/null
+++ b/libbase/include/core/config/libbase-config.h.cmake
@@ -0,0 +1,89 @@
+/*
+ RCC-Project
+
+ Copyright (C) 2026 Richard Qin
+
+ This file is part of RCC-Project.
+
+ RCC-Project is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your option) any
+ later version.
+
+ RCC-Project is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ RCC-Project; see the file COPYING. If not see
+ <http://www.gnu.org/licenses/>.
+*/
+
+/* This file enumerates variables from the libbase configuration so that they
+ can be used by exported headers without depending on RCC configuration. */
+
+#ifndef LIBBASE_CONFIG_H
+#define LIBBASE_CONFIG_H
+
+/* Define if libbase dump support is enabled. */
+#cmakedefine LIBBASE_ENABLE_DUMP
+
+/* Define if threads are enabled in libbase. */
+#cmakedefine01 LIBBASE_ENABLE_THREADS
+
+/* Has gcc/MSVC atomic intrinsics. */
+#cmakedefine01 LIBBASE_HAS_ATOMICS
+
+/* Define if this is a Unixish platform. */
+#cmakedefine LIBBASE_ON_UNIX ${LIBBASE_ON_UNIX}
+
+/* Whether libbase records statistics. */
+#cmakedefine01 LIBBASE_FORCE_ENABLE_STATS
+
+/* Define if libbase has z3 support. */
+#cmakedefine LIBBASE_WITH_Z3 ${LIBBASE_WITH_Z3}
+
+/* Define if libbase has curl support. */
+#cmakedefine LIBBASE_ENABLE_CURL ${LIBBASE_ENABLE_CURL}
+
+/* Define if libbase has cpp-httplib support. */
+#cmakedefine LIBBASE_ENABLE_HTTPLIB ${LIBBASE_ENABLE_HTTPLIB}
+
+/* Define if zlib compression is available to libbase. */
+#cmakedefine01 LIBBASE_ENABLE_ZLIB
+
+/* Define if zstd compression is available to libbase. */
+#cmakedefine01 LIBBASE_ENABLE_ZSTD
+
+/* Define if xz (lzma) decompression is available to libbase. */
+#cmakedefine01 LIBBASE_ENABLE_LZMA
+
+/* Define to 1 if libbase has the <sysexits.h> header file. */
+#cmakedefine LIBBASE_HAVE_SYSEXITS_H ${LIBBASE_HAVE_SYSEXITS_H}
+
+/* Define if libbase is built with BUILD_SHARED_LIBS. */
+#cmakedefine LIBBASE_BUILD_SHARED_LIBS
+
+/* Define if libbase is built as a static library. */
+#cmakedefine LIBBASE_BUILD_STATIC
+
+/* Define if exporting the libbase public interface for a shared library. */
+#cmakedefine LIBBASE_ENABLE_EXPORT_ANNOTATIONS
+
+/* Define if libbase uses the old toolchain behavior. */
+#cmakedefine LIBBASE_FORCE_USE_OLD_TOOLCHAIN ${LIBBASE_FORCE_USE_OLD_TOOLCHAIN}
+
+/* Define if libbase_unreachable should be optimized with undefined behavior
+ * in non-assert builds. */
+#cmakedefine01 LIBBASE_UNREACHABLE_OPTIMIZE
+
+/* Define if libbase provides I/O sandbox support. */
+#cmakedefine01 LIBBASE_ENABLE_IO_SANDBOX
+
+/* Define if logf128 is available to libbase. */
+#cmakedefine LIBBASE_HAS_LOGF128
+
+/* Define if libbase provides on-disk content-addressable storage. */
+#cmakedefine01 LIBBASE_ENABLE_ONDISK_CAS
+
+#endif