# Copyright (c) 2026, QDB Development Group
# Compressed File Store (CFS) subsystem

# cfs_sql.c is always compiled: it holds the pg_proc.dat-registered SQL
# functions, guarded by #ifdef USE_CFS / #else stubs, so the server links with
# or without the CFS feature.
backend_sources += files(
  'cfs_sql.c',
)

# The remaining CFS sources are compiled only when the feature is enabled.
if get_option('cfs').enabled() or get_option('cfs').auto()
  backend_sources += files(
    'cfs_cfp.c',
    'cfs_checkpoint.c',
    'cfs_codec.c',
    'cfs_codec_pglz.c',
    'cfs_codec_zlib.c',
    'cfs_compact.c',
    'cfs_compress.c',
    'cfs_format.c',
    'cfs_fsck.c',
    'cfs_guc.c',
    'cfs_io.c',
    'cfs_journal.c',
    'cfs_map_file.c',
    'cfs_path.c',
    'cfs_recovery.c',
    'cfs_rel.c',
    'cfs_shmem.c',
    'cfs_smgr.c',
    'cfs_state.c',
    'cfs_stats.c',
    'cfs_storage.c',
    'cfs_swap.c',
    'cfs_sync.c',
  )
endif
