Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14451 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36708 invoked by uid 1010); 28 Jan 2005 23:51:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36688 invoked by uid 1007); 28 Jan 2005 23:51:47 -0000 Message-ID: <20050128235146.36673.qmail@lists.php.net> To: internals@lists.php.net References: Date: Fri, 28 Jan 2005 15:51:46 -0800 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Posted-By: 169.229.135.175 Subject: Re: How to detect GD in source code. From: pollita@php.net ("Sara Golemon") > I've been writing a module, it is dependent on some GD functions, how > can I detect that GD has been installed PHP native? > Taking a page out of Zend/zend_builtin_functions and the source code for the extension_loaded() userspace function: int gd_is_loaded = zend_hash_exists(&module_registry, "gd", sizeof("gd")); > Anything I can add to aclocal.m4 and/or configure.ac would be greatly > appreciated. > You could adapt the stuff in ext/gd/config.m4 to look for and link libgd yourself... -Sara