Ok, just tried to compile Imlib2 under Roswell (RH 7.2 beta) and I discovered that

it installs freetype 2.0.3 , and so freetype.h (for ftype1) is under
/usr/include/freetype1/freetype/freetype.h .
As to not have plp complaining imlib2 can't find freetype under rh 7.2 , I patched
configure to work with roswell.
Lightman


SVN revision: 5304
This commit is contained in:
Franz Marini 2001-08-29 09:10:03 +00:00
parent 671e93942f
commit b490abdb4e
3 changed files with 40 additions and 10 deletions

View File

@ -129,13 +129,15 @@ echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
echo ""
AC_MSG_ERROR([Fatal Error: no FreeType detected.])], -lm)
AC_CHECK_HEADERS(freetype.h freetype/freetype.h,[ break] , )
AC_CHECK_HEADERS(freetype.h freetype/freetype.h freetype1/freetype/freetype.h,[ break] , )
AC_CHECK_HEADER(freetype.h, [ ftype=yes ], [ ftype=no ])
AC_CHECK_HEADER(freetype/freetype.h, [ ftype_ftype=yes ], [ ftype_ftype=no ])
AC_CHECK_HEADER(freetype1/freetype/freetype.h, [ ftype1_ftype=yes ], [ ftype1_ftype=no ])
if test x$ftype = xno; then
if test x$ftype_ftype = xno; then
if test x$ftype1_ftype = xno; then
echo ""
echo "ERROR: freetype.h not found in freetype.h or freetype/freetype.h include"
echo "paths. (ie /usr/include, /usr/local/include etc.). You need the freetype"
@ -155,6 +157,7 @@ echo ""
AC_MSG_ERROR([Fatal Error: no FreeType header files detected.])
fi
fi
fi
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
EXTRA_LIBS="-L/usr/local/lib -L/usr/X11R6/lib"

View File

@ -24,11 +24,15 @@
#include "updates.h"
#include "rgbadraw.h"
#include "Imlib2.h"
#ifdef HAVE_FREETYPE_FREETYPE_H
#ifdef HAVE_FREETYPE1_FREETYPE_FREETYPE_H
#include <freetype1/freetype/freetype.h>
#else
#if HAVE_FREETYPE_FREETYPE_H
#include <freetype/freetype.h>
#else
#include <freetype.h>
#endif
#endif
#include "font.h"
#include "grad.h"
#include "rotate.h"
@ -3236,14 +3240,33 @@ imlib_image_draw_pixel(int x, int y, char make_updates)
return NULL;
__imlib_DirtyImage(im);
__imlib_DirtyPixmapsForImage(im);
return (Imlib_Updates) __imlib_draw_pixel(im, x, y,
(DATA8) ctx->color.red,
(DATA8) ctx->color.green,
(DATA8) ctx->color.blue,
(DATA8) ctx->color.alpha,
ctx->operation,
(char) make_updates);
}
if (ctx->cliprect.w)
{
__imlib_set_point(im, x, y,
(DATA8) ctx->color.red,
(DATA8) ctx->color.green,
(DATA8) ctx->color.blue,
(DATA8) ctx->color.alpha,
ctx->operation);
}
else
{
__imlib_set_point_clipped(im, x, y,
ctx->cliprect.x,
ctx->cliprect.x +
ctx->cliprect.w - 1,
ctx->cliprect.y,
ctx->cliprect.y +
ctx->cliprect.h - 1,
(DATA8) ctx->color.red,
(DATA8) ctx->color.green,
(DATA8) ctx->color.blue,
(DATA8) ctx->color.alpha,
ctx->operation);
}
if (!make_updates) return (Imlib_Updates) NULL;
return (Imlib_Updates) __imlib_AddUpdate(NULL, x, y, 1, 1);
}
Imlib_Updates
imlib_image_draw_line(int x1, int y1, int x2, int y2, char make_updates)

View File

@ -3,11 +3,15 @@
#include "colormod.h"
#include "image.h"
#include "blend.h"
#ifdef HAVE_FREETYPE1_FREETYPE_FREETYPE_H
#include <freetype1/freetype/freetype.h>
#else
#ifdef HAVE_FREETYPE_FREETYPE_H
#include <freetype/freetype.h>
#else
#include <freetype.h>
#endif
#endif
#include "font.h"
#include <sys/types.h>
#include <string.h>