Ignore:
Timestamp:
Oct 30, 2008, 6:35:58 PM (11 years ago)
Author:
nico
Message:
  • Available the compilation of caca-php without gd development files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/php_caca.c

    r3151 r3153  
    1717#include "php.h"
    1818#include "php_caca.h"
     19
     20#ifdef HAVE_GD
    1921#include <gd.h>
     22#endif
    2023
    2124static function_entry caca_functions[] = {
     
    362365//Fetch buffer of pixels from gdImage
    363366
     367#ifdef HAVE_GD
    364368void *gd_get_pixels(gdImage *img) {
    365369        void *result;
     
    396400        return caca_set_dither_palette(dither, &r[0], &g[0], &b[0], &a[0]);
    397401}
    398 
     402#endif
    399403//------- Caca's functions ----------------//
    400404
     
    10271031                RETURN_FALSE;
    10281032        }
    1029 
     1033#ifdef HAVE_GD
    10301034        gdImage *img = fetch_external_resource(_zval, "gd");
    10311035        if (!img) {
     
    10441048
    10451049        ZEND_REGISTER_RESOURCE(return_value, dither, le_caca_dither);
     1050#else
     1051        RETURN_FALSE
     1052#endif
    10461053}
    10471054
     
    12971304        ZEND_FETCH_RESOURCE(dither, caca_dither_t*, &_zval2, -1, PHP_CACA_DITHER_RES_NAME, le_caca_dither);
    12981305
     1306#ifdef HAVE_GD
    12991307        gdImage *img = fetch_external_resource(_zval3, "gd");
    13001308        if (!img) {
     
    13151323        free(pixels);
    13161324        RETURN_TRUE;
     1325#else
     1326        RETURN_FALSE;
     1327#endif
    13171328}
    13181329
     
    13971408        ZEND_FETCH_RESOURCE(font, caca_font_t*, &_zval2, -1, PHP_CACA_FONT_RES_NAME, le_caca_font);
    13981409
     1410#ifdef HAVE_GD
    13991411        gdImage *img = fetch_external_resource(_zval3, "gd");
    14001412        if (!img || !img->trueColor) {
     
    14191431        free(buffer);
    14201432        RETURN_TRUE;
     1433#else
     1434        RETURN_FALSE;
     1435#endif
    14211436}
    14221437
Note: See TracChangeset for help on using the changeset viewer.