0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

configure: Add --with-magic-file=path; use as default.

This commit is contained in:
Jason Volk 2020-04-19 21:02:06 -07:00
parent 69f4c2b224
commit ca6a1d127f
2 changed files with 16 additions and 2 deletions

View file

@ -1410,6 +1410,15 @@ AC_HELP_STRING([--with-magic-libs=[[[DIR]]]], [Path to magic library directory])
MAGIC_LDFLAGS="-L$withval"
], [])
AC_ARG_WITH(magic-file,
AC_HELP_STRING([--with-magic-file=[[[FILE]]]], [Path to magic database file]),
[
MAGIC_FILE="$withval"
RB_DEFINE_UNQUOTED([MAGIC_FILE], ["$MAGIC_FILE"], [Magic file path])
], [
RB_DEFINE_UNQUOTED([MAGIC_FILE], [""], [Magic file path])
])
RB_CHK_SYSHEADER(magic.h, [MAGIC_H])
AC_CHECK_LIB(magic, magic_version,
[

View file

@ -38,8 +38,13 @@ ircd::magic::version_abi
decltype(ircd::magic::file_path)
ircd::magic::file_path
{
{ "name", "ircd.magic.file" },
{ "default", getenv("MAGIC") },
{ "name", "ircd.magic.file" },
{
"default",
getenv("MAGIC")?
getenv("MAGIC"):
RB_MAGIC_FILE
},
};
decltype(ircd::magic::fallback_paths)