I have two similar applications in their own source trees and I am using autotools to build them. In each application’s configure.ac I have:AC_INIT(appname, appversion)
Since the code base is similar and is sharing some code, I’d like to merge them to 1 source tree but I need to have the appname and appversion distinct for each application, can this be achieved using autotools?
I am using PACKAGE_NAME, PACKAGE_VERSION in the application.
My current source structure looks like this:
./configure.ac
./src/Makefile.am
./src/*.cpp
./src/include/*.h
Thanks.
In configure.ac, you could do:
These versions are independent of PACKAGE_VERSION, but in your .c files
you can simply concatenate them: