I am building a small library and I am using autotools. The code is in c++, and it outputs some html code. There is a lot of stylesheets and javascript code associated with the html code. Since the latter is fixed, the code copies these files to the folder where the html output (dynamic) is written. The output path is an argument to a function.
The problem is that, to copy the javascript and stylesheets, I need to know the full path of the source directory. Some of the code is based on templates and the code is directly inside the header file. So defining a variable (compiler flags) in Makefile wont work for me.
I was planning to define a variable in config.h so that, if config.h is included in the original header files, I will get the path.
I tried by using
AC_DEFINE_UNQUOTED([DATA_PATH], ["$srcdir"], "data path"
after autoconf is run, the config.h file defines DATA_PATH as "." . But I require full installation path.
What is the correct/best way to do this