mirror of
https://github.com/matrix-construct/construct
synced 2025-02-26 21:50:18 +01:00
configure: Add --with-magic-file=path; use as default.
This commit is contained in:
parent
69f4c2b224
commit
ca6a1d127f
2 changed files with 16 additions and 2 deletions
|
@ -1410,6 +1410,15 @@ AC_HELP_STRING([--with-magic-libs=[[[DIR]]]], [Path to magic library directory])
|
||||||
MAGIC_LDFLAGS="-L$withval"
|
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])
|
RB_CHK_SYSHEADER(magic.h, [MAGIC_H])
|
||||||
AC_CHECK_LIB(magic, magic_version,
|
AC_CHECK_LIB(magic, magic_version,
|
||||||
[
|
[
|
||||||
|
|
|
@ -39,7 +39,12 @@ decltype(ircd::magic::file_path)
|
||||||
ircd::magic::file_path
|
ircd::magic::file_path
|
||||||
{
|
{
|
||||||
{ "name", "ircd.magic.file" },
|
{ "name", "ircd.magic.file" },
|
||||||
{ "default", getenv("MAGIC") },
|
{
|
||||||
|
"default",
|
||||||
|
getenv("MAGIC")?
|
||||||
|
getenv("MAGIC"):
|
||||||
|
RB_MAGIC_FILE
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
decltype(ircd::magic::fallback_paths)
|
decltype(ircd::magic::fallback_paths)
|
||||||
|
|
Loading…
Add table
Reference in a new issue