libgit_c_args = [
'-DBINDIR="' + get_option('bindir') + '"',
'-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"',
- '-DETC_GITATTRIBUTES="' + get_option('gitattributes') + '"',
- '-DETC_GITCONFIG="' + get_option('gitconfig') + '"',
'-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"',
'-DGIT_HOST_CPU="' + host_machine.cpu_family() + '"',
'-DGIT_HTML_PATH="' + get_option('datadir') / 'doc/git-doc"',
'-DSHELL_PATH="' + fs.as_posix(target_shell.full_path()) + '"',
]
+system_attributes = get_option('gitattributes')
+if system_attributes != ''
+ libgit_c_args += '-DETC_GITATTRIBUTES="' + system_attributes + '"'
+else
+ libgit_c_args += '-DETC_GITATTRIBUTES="' + get_option('sysconfdir') / 'gitattributes"'
+endif
+
+system_config = get_option('gitconfig')
+if system_config != ''
+ libgit_c_args += '-DETC_GITCONFIG="' + system_config + '"'
+else
+ libgit_c_args += '-DETC_GITCONFIG="' + get_option('sysconfdir') / 'gitconfig"'
+endif
+
editor_opt = get_option('default_editor')
if editor_opt != '' and editor_opt != 'vi'
libgit_c_args += '-DDEFAULT_EDITOR="' + editor_opt + '"'
description: 'Fall-back pager.')
option('default_editor', type: 'string', value: 'vi',
description: 'Fall-back editor.')
-option('gitconfig', type: 'string', value: '/etc/gitconfig',
- description: 'Path to the global git configuration file.')
-option('gitattributes', type: 'string', value: '/etc/gitattributes',
- description: 'Path to the global git attributes file.')
+option('gitconfig', type: 'string',
+ description: 'Path to the global git configuration file. (default: etc/gitconfig)')
+option('gitattributes', type: 'string',
+ description: 'Path to the global git attributes file. (default: etc/gitattributes)')
option('pager_environment', type: 'string', value: 'LESS=FRX LV=-c',
description: 'Environment used when spawning the pager')
option('perl_cpan_fallback', type: 'boolean', value: true,