Skip to content
  • Simon McVittie's avatar
    m4macros: Fix detection of glib-2.0 alone · 54cbc9bc
    Simon McVittie authored
    
    
    We unconditionally appended ">= $min_glib_version" to the modules to
    look for, even though we had already included
    "glib-2.0 >= $min_glib_version" in our list. When requesting additional
    modules, this was fine, for example
    
        AM_PATH_GLIB_2_0([2.58], [:], [:], [gobject gio])
    
    ended up asking pkg-config for
    
        glib-2.0 >= 2.58 gobject-2.0 gio-2.0 >= 2.58
    
    which is redundant (since they all share a version number) but
    otherwise OK.
    
    However,
    
        AM_PATH_GLIB_2_0([2.58], [:], [:], [])
    
    ended up asking pkg-config for
    
        glib-2.0 >= 2.58 >= 2.58
    
    which is not OK; the second ">=" was parsed as a bizarrely-named package
    to check for, and obviously few people have ">=.pc" installed.
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    Fixes: 4bb16f48 "m4macros: Allow information from pkg-config to be overridden"
    54cbc9bc