def _configure_libconfig(self): """ Configuration callback using a generic CONFIG tool """ lc = self.library_config_program found_header = False if not lc or not libconfig.has_libconfig(lc): return False incdirs = libconfig.get_incdirs(lc) for d in incdirs: for h in self.header_files: p = msys_obj.msys_to_windows (os.path.join(d, h)) if os.path.isfile(p): found_header = True if not found_header: return False self.incdirs += incdirs self.libdirs += libconfig.get_libdirs(lc) self.libs += libconfig.get_libs(lc) self.cflags += libconfig.get_cflags(lc) self.lflags += libconfig.get_lflags(lc) return True
def _configure_libconfig(self): """ Configuration callback using a generic CONFIG tool """ lc = self.library_config_program if not lc or not libconfig.has_libconfig(lc): return False self.incdirs += libconfig.get_incdirs(lc) self.libdirs += libconfig.get_libdirs(lc) self.libs += libconfig.get_libs(lc) self.cflags += libconfig.get_cflags(lc) self.lflags += libconfig.get_lflags(lc) return True
def sdl_get_version(): """ Returns the installed SDL library version. By default, we obtain the version using either 'pkgconfig' or the 'sdl-config' tool. """ if pkgconfig.has_pkgconfig (): return pkgconfig.get_version ("sdl")[0] elif libconfig.has_libconfig("sdl-config"): return libconfig.get_version("sdl-config")[0] # TODO: SDL may be installed manually (i.e. compiled from # source). any way to find the version? return None