diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-08-06 16:54:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-08-06 16:54:57 (GMT) |
commit | 4fcc35a52ccb025b6d803d85e017931cd2452960 (patch) | |
tree | e95920f16c273e41f9cae1ea2f02571c221a514e /configure.ac | |
parent | 74d062d4ec55d7ac3914bbf64b8b6c5ab52227df (diff) |
Extend the ROST grammar with a first batch of new features.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6b6da96..165cb40 100644 --- a/configure.ac +++ b/configure.ac @@ -232,6 +232,10 @@ AC_ARG_ENABLE([curl-support], AS_HELP_STRING([--disable-curl-support], [disable cURL support [default=no]]), [], [enable_curl_support=yes]) +AC_ARG_ENABLE([magic-support], + AS_HELP_STRING([--disable-magic-support], [disable magic number recognition [default=no]]), + [], [enable_magic_support=yes]) + AC_ARG_ENABLE([python-bindings], AS_HELP_STRING([--disable-python-bindings], [disable Python bindings [default=no]]), [], [enable_python_bindings=yes]) @@ -503,6 +507,35 @@ AC_SUBST(LIBYAML_CFLAGS) AC_SUBST(LIBYAML_LIBS) +#--- Checks for libmagic + +AM_CONDITIONAL([BUILD_MAGIC_SUPPORT], [test "x$enable_magic_support" = "xyes"]) + +if test "x$BUILD_MAGIC_SUPPORT_TRUE" = "x"; then + AC_DEFINE(HAVE_MAGIC_SUPPORT, 1, + [Define to 1 if the magic support is available and enabled.]) +fi + + +PKG_CHECK_MODULES(LIBMAGIC,libmagic >= 5.44,[libmagic_found=yes],[libmagic_found=no]) + +if test "$libmagic_found" = "yes"; then + libmagic_version=`pkg-config libmagic --modversion` +else + libmagic_version='-' +fi + + +if test "x$enable_magic_support" = "xyes"; then + + AC_SUBST(LIBMAGIC_CFLAGS) + AC_SUBST(LIBMAGIC_LIBS) + + true # empty if/then body not allowed + +fi + + #--- Checks for Python if test "x$enable_debug" = "xyes"; then @@ -760,6 +793,7 @@ echo The small, fast and reliable database engine. : $libsqlite_version echo The cryptography and SSL/TLS toolkit......... : $libssl_version echo The client URL library....................... : $libcurl_version echo The YAML support library..................... : $libyaml_version +echo The magic number recognition library......... : $libmagic_version echo echo Available Python programming language........ : $python3_version @@ -781,6 +815,12 @@ else disable_curl_support="yes" fi +if test "x$enable_magic_support" = "xyes"; then + disable_magic_support="no" +else + disable_magic_support="yes" +fi + if test "x$enable_python_bindings" = "xyes"; then disable_python_bindings="no" else @@ -792,6 +832,7 @@ echo Print debugging messages..................... : $enable_debug echo Consider local resources..................... : $with_local_resources echo Disable GTK support.......................... : $disable_gtk_support echo Disable cURL support......................... : $disable_curl_support +echo Disable Magic support........................ : $disable_magic_support echo Disable Python bindings...................... : $disable_python_bindings echo Build a Python binary distribution........... : $build_python_package |