On Sat, 15 Aug 2020 19:50:41 +0530 Akshit Achara <acharaaks...@gmail.com> wrote:
> To access these files, I need to use the path of libminizinc (which > can change per installation). I want to extract this path from either > Makevars or configure to use it in my package. Just as Makevars is generated during ./configure run from Makefile.in, you could generate a config.h from a config.h.in and substitute all the necessary #defines in it. This is how GNU autoconf is typically used in stand-alone programs [*]. A simpler option would be to add an equivalent of -DMZN_PATH='"@MZN_PATH"' to PKG_CPPFLAGS in Makevars.in and make sure that AC_SUBST is called for that variable in configure.ac [**]. Then the C or C++ code would be able to use MZN_PATH as if it was #defined in a header file. -- Best regards, Ivan [*] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Configuration-Headers.html [**] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Makefile-Substitutions.html ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel