From Technologic Systems Manuals

Something something, 4.9 only compatible with the 1.4 branch. Most 4.9 kernels shipped with 1.4.1. Latest can be built on host or for cross compiling

building: (note, root needed for make install in most cases) (note, autoconf-archive needed, libtool, pkg-config)

git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
cd libgpiod
git checkout v1.4.x   # The 1.4 branch
./autogen.sh --enable-tools=yes && make && make install

Cross compililation library:
Debian stretch, link to that section.
./autogen.sh --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf/ && make && make install