Optional dependencies with fpm

You may want to have a look at the open issue 773 on GitHub. It presents different ways to deal with the problem you are facing.

If you want to keep the preprocessing mechanism you can also do as follows:

#ifdef EXTDEPS                               
#include <stdlib.inc>
#endif

and in the file stdlib.inc

use stdlib_hash_64bit, only: fnv_1a_hash   

It’s a bit hacky but it does the job.