#ifndef RZ_CONFIGURE_H
#define RZ_CONFIGURE_H

#include "rz_version.h"

#define RZ_CHECKS_LEVEL @RZ_CHECKS_LEVEL@
#define DEBUGGER @DEBUGGER@
#define HAVE_DECL_ADDR_NO_RANDOMIZE @HAVE_DECL_ADDR_NO_RANDOMIZE@
#define HAVE_ARC4RANDOM_UNIFORM @HAVE_ARC4RANDOM_UNIFORM@
#define HAVE_EXPLICIT_BZERO @HAVE_EXPLICIT_BZERO@
#define HAVE_EXPLICIT_MEMSET @HAVE_EXPLICIT_MEMSET@
#define HAVE_CLOCK_NANOSLEEP @HAVE_CLOCK_NANOSLEEP@
#define HAVE_SIGACTION @HAVE_SIGACTION@
#define HAVE_PIPE @HAVE_PIPE@
#define HAVE_EXECV @HAVE_EXECV@
#define HAVE_EXECVE @HAVE_EXECVE@
#define HAVE_EXECVP @HAVE_EXECVP@
#define HAVE_EXECL @HAVE_EXECL@
#define HAVE_SYSTEM @HAVE_SYSTEM@
#define HAVE_PIPE2 @HAVE_PIPE2@

#ifdef RZ_MESON_VERSION
#define RZ_PREFIX "@PREFIX@"
#define RZ_LIBDIR "@LIBDIR@"
#define RZ_INCDIR "@INCLUDEDIR@"
#define RZ_DATDIR "@DATADIR@"
#define RZ_WWWROOT "@WWWROOT@"
#define RZ_PLUGINS "@PLUGINS@"
#define RZ_EXTRAS "@EXTRAS@"
#define RZ_BINDINGS "@BINDINGS@"
#define RZ_DATDIR_RZ "@DATADIR_RZ@"
#define RZ_SDB "@SDB@"
#define RZ_ZIGNS "@ZIGNS@"
#define RZ_THEMES "@THEMES@"
#define RZ_FORTUNES "@FORTUNES@"
#define RZ_FLAGS "@FLAGS@"
#define RZ_HUD "@HUD@"
#else
#if __WINDOWS__ || _MSC_VER
#define RZ_PREFIX "."
#define RZ_LIBDIR "lib"
#define RZ_INCDIR "include\\librz"
#define RZ_DATDIR "share"
#define RZ_WWWROOT "www"
#define RZ_PLUGINS "lib\\plugins"
#define RZ_EXTRAS "lib\\extras"
#define RZ_BINDINGS "lib\\bindings"
#else
#define RZ_PREFIX "@PREFIX@"
#define RZ_LIBDIR "@LIBDIR@"
#define RZ_INCDIR "@INCLUDEDIR@/librz"
#define RZ_DATDIR "@DATADIR@"
#define RZ_WWWROOT RZ_DATDIR "/rizin/" RZ_VERSION "/www"
#define RZ_PLUGINS "lib/rizin/" RZ_VERSION
#define RZ_EXTRAS "lib/rizin-extras/" RZ_VERSION
#define RZ_BINDINGS "lib/rizin-bindings/" RZ_VERSION
#endif
#define RZ_DATDIR_RZ        RZ_JOIN_2_PATHS ("share", "rizin")
#define RZ_SDB              RZ_JOIN_3_PATHS ("share", "rizin", RZ_VERSION)
#define RZ_ZIGNS            RZ_JOIN_4_PATHS ("share", "rizin", RZ_VERSION, "zigns")
#define RZ_THEMES           RZ_JOIN_4_PATHS ("share", "rizin", RZ_VERSION, "cons")
#define RZ_FLAGS            RZ_JOIN_4_PATHS ("share", "rizin", RZ_VERSION, "flag")
#define RZ_FORTUNES         RZ_JOIN_3_PATHS ("share", "doc", "rizin")
#define RZ_HUD              RZ_JOIN_4_PATHS ("share", "rizin", RZ_VERSION, "hud")
#endif

#define RZ_SDB_FCNSIGN      RZ_JOIN_2_PATHS (RZ_SDB, "fcnsign")
#define RZ_SDB_OPCODES      RZ_JOIN_2_PATHS (RZ_SDB, "opcodes")
#define RZ_SDB_MAGIC        RZ_JOIN_2_PATHS (RZ_SDB, "magic")
#define RZ_SDB_FORMAT       RZ_JOIN_2_PATHS (RZ_SDB, "format")

#define RZ_HOME_CONFIGDIR   RZ_JOIN_2_PATHS (".config", "rizin")
#define RZ_HOME_DATADIR     RZ_JOIN_3_PATHS (".local", "share", "rizin")
#define RZ_HOME_CACHEDIR    RZ_JOIN_2_PATHS (".cache", "rizin")

#define RZ_HOME_THEMES      RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "cons")
#define RZ_HOME_PLUGINS     RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "plugins")
#define RZ_HOME_ZIGNS       RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "zigns")
#define RZ_HOME_PDB         RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "pdb")
#define RZ_HOME_PROJECTS    RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "projects")
#define RZ_HOME_WWWROOT     RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "www")
#define RZ_HOME_SDB_FCNSIGN RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "fcnsign")
#define RZ_HOME_SDB_FORMAT  RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "format")
#define RZ_HOME_HUD         RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "hud")
#define RZ_HOME_BINRC       RZ_JOIN_2_PATHS (RZ_HOME_DATADIR, "rc.d")
#define RZ_HOME_BIN         RZ_JOIN_3_PATHS (RZ_HOME_DATADIR, "prefix", "bin")

#define RZ_HOME_HISTORY     RZ_JOIN_2_PATHS (RZ_HOME_CACHEDIR, "history")

#define RZ_HOME_RC          RZ_JOIN_2_PATHS (RZ_HOME_CONFIGDIR, "rizinrc")
#define RZ_HOME_RC_DIR      RZ_JOIN_2_PATHS (RZ_HOME_CONFIGDIR, "rizinrc.d")
#define RZ_GLOBAL_RC        RZ_JOIN_2_PATHS (RZ_DATDIR_RZ, "rizinrc")

#define HAVE_LIB_MAGIC @HAVE_LIB_MAGIC@
#define USE_LIB_MAGIC @USE_LIB_MAGIC@
#define HAVE_LIB_XXHASH @HAVE_LIB_XXHASH@
#define USE_LIB_XXHASH @USE_LIB_XXHASH@

#ifndef HAVE_LIB_SSL
#define HAVE_LIB_SSL @HAVE_OPENSSL@
#endif

#define HAVE_LIBUV @HAVE_LIBUV@

#define HAVE_PTRACE @HAVE_PTRACE@
#define USE_PTRACE_WRAP @USE_PTRACE_WRAP@
#define HAVE_FORK @HAVE_FORK@
#define WANT_DYLINK @WANT_DYLINK@
#define WITH_GPL @WITH_GPL@

#if __APPLE__ && __POWERPC__
#define HAVE_JEMALLOC 0
#else
#define HAVE_JEMALLOC @HAVE_JEMALLOC@
#endif

#endif
