File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -533,11 +533,12 @@ install with "sudo apt-get install libusb-1.0-0-dev" or disable with
533533#
534534# check for libgpiod
535535#
536- AC_MSG_CHECKING ( [ for libgpiod] )
537- AC_CHECK_LIB ( gpiod , main ,
536+ PKG_CHECK_MODULES([ LIBGPIOD] , [ libgpiod < 2.0.0] ,
538537 [ AC_DEFINE_UNQUOTED ( [ LIBGPIOD_VER] , `pkg-config libgpiod -- modversion | awk - F. '{print ( $1 * 100 ) + ( $2 ) }'` ,
539538 [ libgpiod version, undefined if not present] )
540- LDFLAGS="$LDFLAGS -lgpiod"
539+ LDFLAGS="$LDFLAGS $LIBGPIOD_LIBS"
540+ LIBGPIOD_VERSION=`pkg-config libgpiod --modversion`
541+ AC_MSG_NOTICE ( [ libgpiod version $LIBGPIOD_VERSION found] )
541542 AC_SUBST ( [ LIBGPIOD_VER] , `pkg-config libgpiod -- modversion | awk - F. '{print ( $1 * 100 ) + ( $2 ) }'` ) ] ,
542543 [ AC_MSG_WARN ( [ Could not find libgpiod, not building hal_gpio] ) ] )
543544
You can’t perform that action at this time.
0 commit comments