Browse Source

Bugfix: Use AC_PROG_CPP in libusb include subdirectory detection for improved portability

Luke Dashjr 13 years ago
parent
commit
1c9c0dc70a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      configure.ac

+ 2 - 1
configure.ac

@@ -207,8 +207,9 @@ PKG_CHECK_MODULES([USB], [libusb-1.0],[
 			AC_CHECK_DECL([libusb_init],[
 				true
 			],[
+				AC_PROG_CPP
 				AC_MSG_CHECKING([whether libusb_init is declared in subdirectory])
-				libusb_include_path=`echo '#include <libusb-1.0/libusb.h>' | cpp -M 2>/dev/null | sed 's/^[^[:space:]]\+[[:space:]]\+\([^[:space:]]\+\)\/.*$/\1/;t;d'`
+				libusb_include_path=`echo '#include <libusb-1.0/libusb.h>' | ${CPP} -M - 2>/dev/null | sed 's/^[^[:space:]]\+[[:space:]]\+\([^[:space:]]\+\)\/.*$/\1/;t;d'`
 				if test "x$libusb_include_path" != "x"; then
 					USB_LIBS="-l$usb_lib"
 					USB_CFLAGS="-I$libusb_include_path"