I am writing this question in part based on a related question on helper-scripts.
I have a C++ software system built with autotools. For a small part of its functionality, my system uses a closed-source pre-built binary: AMPL. I’m a freely-available student version of their software. Suppose the name of the AMPL binary file I call from within my C++ code is ampl-student. I run it from within my code using a system(...) call.
I would like ampl-student to be moved to /usr/bin along with the binary of my compiled C++ code when “make install” is run. Where in the Makefile.am should I add ampl-student. Should I just add it to the bin_PROGRAMS variable?
A related question is should I even put ampl-student in /usr/bin. Is there a more appropriate place for a “helper binary”?
I think this is, in general, a bad idea since distributing a pre-built binary along with the code doesn’t guarantee that the binary will run on the end user’s computer. But in this case, the user base is very small, and I happen to know that they are all using the same system configurations. So we are in fact using the deb package as a way to keep everyone updated of new releases of the software system.
Edit 1: I should emphasize that the question is first and foremost asking for where to specify ampl-student in the Makefile.am file used by autotools.
I’d install it in
$(pkglibexecdir):It’s not really a user program, so this installs it somewhere out of the way. By default, this is going to be
$(prefix)/libexec/$(package).