Ejemplo n.º 1
0
 def check_functions_headers_code():
     '''helper function for CHECK_BUNDLED_SYSTEM'''
     if require_headers and headers and not conf.CHECK_HEADERS(headers,
                                                               lib=libname):
         return False
     if checkfunctions is not None:
         ok = conf.CHECK_FUNCS_IN(checkfunctions,
                                  libname,
                                  headers=headers,
                                  empty_decl=False,
                                  set_target=False)
         if not ok:
             return False
     if checkcode is not None:
         define = 'CHECK_BUNDLED_SYSTEM_%s' % libname.upper()
         ok = conf.CHECK_CODE(checkcode,
                              lib=libname,
                              headers=headers,
                              local_include=False,
                              msg=msg,
                              define=define)
         conf.CONFIG_RESET(define)
         if not ok:
             return False
     return True
Ejemplo n.º 2
0
def CHECK_ICONV(conf, define='HAVE_NATIVE_ICONV'):
    '''check if the iconv library is installed
       optionally pass a define'''
    if conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=True, headers='iconv.h'):
        conf.DEFINE(define, 1)
        return True
    return False