That can cause unexpected behavior, especially with third party tools.
The ignored files will be lost if the source tree is re-imported to
another git repository, unless special care is taken.
Whitelist all non-generated makefiles.
To whitelist instfiles/pam.d/xrdp-sesman, add path to all generated
executables listed in the top-level .gitignore, sort .gitignore
alphabetically.
Add mkinstalldir, it's used by Automake on some systems.
Absolute symlinks break when the source is moved to another location. In
the best case, the symlink will be replaced with a copy, but that creates
code duplication. A user who got the packaged source may decide to change
one config.c without realizing that another config.c will get the same
changes.
Don't ignore config.c, it's a regular source file now, albeit very
short.
Testing done: compiled inside and outside build directory.