Fix libupsclient detection
authorEdgar Fuß <ef@math.uni-bonn.de>
Tue, 29 Oct 2019 17:47:55 +0000 (18:47 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2019 17:47:55 +0000 (18:47 +0100)
Check libupsclient $withval for being a regular file in addition to being executable/searchable. The value may be a directory name.

configure.ac

index 59a7f35..3578f2e 100644 (file)
@@ -5518,7 +5518,7 @@ AC_ARG_WITH([libupsclient],
     else if test "x$withval" = "xyes"; then
       with_libupsclient="use_pkgconfig"
     else
     else if test "x$withval" = "xyes"; then
       with_libupsclient="use_pkgconfig"
     else
-      if test -x "$withval"; then
+      if test -f "$withval" && test -x "$withval"; then
         with_libupsclient_config="$withval"
         with_libupsclient="use_libupsclient_config"
       else if test -x "$withval/bin/libupsclient-config"; then
         with_libupsclient_config="$withval"
         with_libupsclient="use_libupsclient_config"
       else if test -x "$withval/bin/libupsclient-config"; then