configure: Fixed check for libsigrok and AM_PATH_GLIB_2_0.
authorSebastian Harl <sh@tokkee.org>
Sat, 8 Feb 2014 11:14:10 +0000 (12:14 +0100)
committerSebastian Harl <sh@tokkee.org>
Sat, 8 Feb 2014 11:14:10 +0000 (12:14 +0100)
configure.ac

index 7029e1e..990c530 100644 (file)
@@ -3825,18 +3825,20 @@ AC_ARG_WITH(libsigrok, [AS_HELP_STRING([--with-libsigrok@<:@=PREFIX@:>@], [Path
                        with_libsigrok_ldflags="-L$withval/lib"
                fi
        fi
                        with_libsigrok_ldflags="-L$withval/lib"
                fi
        fi
-],[])
+],[with_libsigrok="yes"])
 
 # libsigrok has a glib dependency
 if test "x$with_libsigrok" = "xyes"
 then
 
 # libsigrok has a glib dependency
 if test "x$with_libsigrok" = "xyes"
 then
-       if test -z "m4_ifdef([AM_PATH_GLIB_2_0], [yes], [])"
-       then
-               with_libsigrok="no (glib not available)"
-       else
-               AM_PATH_GLIB_2_0([2.28.0],
-                       [with_libsigrok_cflags="$with_libsigrok_cflags $GLIB_CFLAGS"; with_libsigrok_ldflags="$with_libsigrok_ldflags $GLIB_LIBS"])
-       fi
+m4_ifdef([AM_PATH_GLIB_2_0],
+       [
+        AM_PATH_GLIB_2_0([2.28.0],
+               [with_libsigrok_cflags="$with_libsigrok_cflags $GLIB_CFLAGS"; with_libsigrok_ldflags="$with_libsigrok_ldflags $GLIB_LIBS"])
+       ],
+       [
+        with_libsigrok="no (glib not available)"
+       ]
+)
 fi
 
 # libsigrok headers
 fi
 
 # libsigrok headers