In the *.pc files, use a C preprocessor include path both with
and without the gphoto2/ path component:
Cflags: -I${includedir} -I${includedir}/gphoto2
This allows both the preferred way to include gphoto2 headers
#include <gphoto2/gphoto2.h>
#include <gphoto2/gphoto2-camera.h>
and also the early 2000s legacy way (still in use by kamera and
others because we did not properly communicate and enforce that
back when we were still stabilizing the API)
#include <gphoto2.h>
#include <gphoto2-camera.h>
to produce builds with the libgphoto2 headers actually corresponding
to the *.pc files in use.
Any other option for the *.pc file Cflags either produces
unintended build failures or builds which use the wrong header
files (the `-I${includedir}/gphoto2` option), or breaks the
`#include <...>` part of the libgphoto2 API from the early 2000s
still in use by kamera and others (the `-I${includedir}` option).
For details, see https://github.com/gphoto/libgphoto2/issues/717 and
https://github.com/gphoto/libgphoto2/issues/717#issuecomment-1018040615
Fixes: https://github.com/gphoto/libgphoto2/issues/717
autoconf 2.59c has introduced docdir, htmldir, so we do not need to
have --with-doc-dir= and --with-html-dir= any more. --docdir= and
--htmldir= will do the job.
While adding support for "make rpm" appeared to be a good idea in the
early 2000s, it really is not and only clutters up the build system.
At least the libgphoto2_port translation cannot have worked in the
rpm package since at least 5255d80210
from 2007-10-28, so it is a good guess that this has not really been
in use.
Remove remnants of OS/2 support, which has been broken at least since
commit 9831fa553c from 2006-10, but more probably even since after
gphoto2 2.1.0 which was some time in 2002.
Closes: https://github.com/gphoto/libgphoto2/issues/710