Skip to content

Less conditional build

config.h should always be included, a build without it never happens. The checks on Linux always succeed, because autotools automatically defines HAVE_CONFIG_H on all the Makefiles. On Windows this is not the case. Removing all the checks revealed that multiple projects did not include config.h because HAVE_CONFIG_H wasn't defined. This was the case for at least the following projects:

  • acyclic
  • bcomps
  • ccomps
  • dijkstra
  • ingraphs
  • gc
  • gml2gv
  • graphml2gv
  • gv2gml
  • gvcolor
  • gvgen
  • mm2gv
  • nop
  • pathplan
  • rbtree
  • sccmap
  • topfish
  • tred

Added windows\include to the additional include directories and adding some library paths solves some, but not all problems that emerged. The main problem was code calling getopt, a function not present on Windows systems. This is solved by adding a library project (windows\getopt), that provides a getopt implementation for Windows. This project only build on the Windows build.

Merge request reports