forked from old/legacy-imlib2
parent
144d899456
commit
1d6ca99c25
|
@ -9,7 +9,7 @@ MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 config.guess \
|
|||
ltconfig ltmain.sh missing mkinstalldirs \
|
||||
stamp-h.in
|
||||
|
||||
SUBDIRS = libltdl src filters doc loaders
|
||||
SUBDIRS = src filters doc loaders
|
||||
|
||||
bin_SCRIPTS = imlib2-config
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ dnl Process this file with autoconf to create configure.
|
|||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([src/Imlib2.h])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AM_INIT_AUTOMAKE(imlib2, 1.1.0)
|
||||
AM_INIT_AUTOMAKE(imlib2, 1.1.1)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
|
|
350
configure.in
350
configure.in
|
@ -1,350 +0,0 @@
|
|||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_INIT(src/Imlib2.h)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(imlib2, 1.1.0)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl here was freetype stuff (1)
|
||||
|
||||
AC_ARG_WITH(freetype-config,
|
||||
[ --with-freetype-config=FREETYPE_CONFIG use freetype-config specified ],
|
||||
[
|
||||
PROG_CONFIG=$withval;
|
||||
echo "using "$PROG_CONFIG" for freetype-config";
|
||||
],[
|
||||
PROG="freetype-config";
|
||||
AC_PATH_PROG(PROG_CONFIG, $PROG, "", $PATH)
|
||||
])
|
||||
if [ test -z $PROG_CONFIG ]; then
|
||||
echo $PROG " is not in your \$PATH. Please ensure it is.";
|
||||
echo "You may need to install the library and/or development packages";
|
||||
echo "that contain this configure-script.";
|
||||
echo "FATAL ERROR. ABORT.";
|
||||
exit -1;
|
||||
fi
|
||||
freetype_cflags=`$PROG_CONFIG --cflags`
|
||||
freetype_libs=`$PROG_CONFIG --libs`
|
||||
|
||||
dnl /here was freetype stuff (1)
|
||||
|
||||
mmx=no
|
||||
AC_ARG_ENABLE(mmx,[ --enable-mmx attempt compiling using mmx assembly [default=yes]],
|
||||
[
|
||||
if test x$enableval = xyes; then
|
||||
mmx=yes
|
||||
fi
|
||||
],
|
||||
[
|
||||
if test x$target_os = xlinux-gnu; then
|
||||
mmx=`cat /proc/cpuinfo | grep mmx`
|
||||
if test -n "$mmx"; then
|
||||
mmx=yes
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "You are not running Linux - This script cannot auto-detect mmx assembly."
|
||||
echo "You will have to enable the mmx assembly (which gives anywhere from 10%"
|
||||
echo "to 300% speedups) by adding --enable-mmx on the configure command-line."
|
||||
echo ""
|
||||
fi
|
||||
]
|
||||
)
|
||||
if test x$mmx = xyes; then
|
||||
AC_DEFINE(DO_MMX_ASM, 1, [enabling MMX Assembly])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_MMX, test x$mmx = xyes)
|
||||
|
||||
pkglibdir='${libdir}'/loaders
|
||||
AC_SUBST(pkglibdir)
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_LIBLTDL_CONVENIENCE
|
||||
AC_CONFIG_SUBDIRS(libltdl)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_C_CONST
|
||||
|
||||
AM_ENABLE_SHARED
|
||||
dnl AM_DISABLE_STATIC
|
||||
AC_LIBTOOL_DLOPEN
|
||||
dnl AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
AM_WITH_DMALLOC
|
||||
|
||||
if test X"$enable_shared" = Xyes; then
|
||||
DLLDFLAGS=-export-dynamic
|
||||
AC_SUBST(DLLDFLAGS)
|
||||
fi
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
AC_MSG_CHECKING(whether fopen accepts "b" mode)
|
||||
AC_CACHE_VAL([ag_cv_func_fopen_binary],
|
||||
[AC_TRY_RUN([#include <stdio.h>
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
FILE *fp = fopen("/bin/sh", "rb");
|
||||
return (fclose(fp) >= 0);
|
||||
}],[ag_cv_func_fopen_binary=yes],
|
||||
[ag_cv_func_fopen_binary=yes],[ag_cv_func_fopen_binary=yes])
|
||||
rm -f core *.exe.core])
|
||||
AC_MSG_RESULT([$ag_cv_func_fopen_binary])
|
||||
if test x$ag_cv_func_fopen_binary = xyes; then
|
||||
AC_DEFINE(USE_FOPEN_BINARY, 1,
|
||||
[Define this if we can use the "b" mode for fopen safely.])
|
||||
fi
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$have_x" = "xdisabled"; then
|
||||
AC_MSG_WARN([Xlib support is disabled.])
|
||||
else
|
||||
|
||||
if test "x$x_includes" = "x"; then
|
||||
x_includes="/usr/include"
|
||||
fi
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_ldflags="$X_LDFLAGS"
|
||||
x_libs="$X_LIBS $X_EXTRA_LIBS"
|
||||
X_OBJS="color.lo context.lo draw.lo grab.lo rend.lo rgba.lo ximage.lo"
|
||||
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $x_libs",
|
||||
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
|
||||
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
AC_CHECK_LIB(Xext, XShmAttach, x_libs="-lXext $x_libs",
|
||||
AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
|
||||
$x_libs),
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
|
||||
$x_libs)
|
||||
fi
|
||||
|
||||
AC_SUBST(X_OBJS)
|
||||
|
||||
LTLIBOBJS=`echo "$LIBOBJS" | sed 's,.o ,.lo ,g;s,.o$,.lo,'`
|
||||
AC_SUBST(LTLIBOBJS)
|
||||
|
||||
|
||||
dnl here was freetype headers checking
|
||||
|
||||
|
||||
|
||||
dnl /here was freetype headers checking
|
||||
|
||||
|
||||
|
||||
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
|
||||
|
||||
EXTRA_LIBS="-L/usr/local/lib -L/usr/X11R6/lib"
|
||||
|
||||
# Test for libjpeg
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
||||
jpeg_ok=yes,
|
||||
jpeg_ok=no
|
||||
AC_MSG_WARN(*** Native JPEG support will not be built (JPEG library not found) ***), $EXTRA_LIBS)
|
||||
if test "$jpeg_ok" = yes; then
|
||||
AC_MSG_CHECKING([for jpeglib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <jpeglib.h>],
|
||||
jpeg_ok=yes,
|
||||
jpeg_ok=no)
|
||||
AC_MSG_RESULT($jpeg_ok)
|
||||
if test "$jpeg_ok" = yes; then
|
||||
JPEGLIBS="-ljpeg"
|
||||
else
|
||||
AC_MSG_WARN(*** Native JPEG support will not be built (JPEG header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for libpng
|
||||
AC_CHECK_LIB(png, png_read_info,
|
||||
png_ok=yes,
|
||||
png_ok=no
|
||||
AC_MSG_WARN(*** Native PNG support will not be built (PNG library not found) ***), $EXTRA_LIBS -lz -lm)
|
||||
if test "$png_ok" = yes; then
|
||||
AC_MSG_CHECKING([for png.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <png.h>],
|
||||
png_ok=yes,
|
||||
png_ok=no)
|
||||
AC_MSG_RESULT($png_ok)
|
||||
if test "$png_ok" = yes; then
|
||||
PNGLIBS="-lpng -lz -lm"
|
||||
REQUIREMENTS=libpng12
|
||||
else
|
||||
AC_MSG_WARN(*** Native PNG support will not be built (PNG header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for libtiff
|
||||
AC_CHECK_LIB(tiff, TIFFReadScanline,
|
||||
tiff_libs="-ltiff"
|
||||
tiff_ok=yes,
|
||||
AC_CHECK_LIB(tiff, TIFFWriteScanline,
|
||||
tiff_libs="-ltiff -ljpeg -lz -lm"
|
||||
tiff_ok=yes,
|
||||
AC_CHECK_LIB(tiff34, TIFFFlushData,
|
||||
tiff_libs="-ltiff -ljpeg -lz -lm"
|
||||
tiff_ok=yes,
|
||||
tiff_ok=no
|
||||
AC_MSG_WARN(*** Native TIFF support will not be built (TIFF library not found) ***),
|
||||
$EXTRA_LIBS -ljpeg -lz -lm),
|
||||
$EXTRA_LIBS -ljpeg -lz -lm),
|
||||
$EXTRA_LIBS)
|
||||
if test "$tiff_ok" = yes; then
|
||||
AC_MSG_CHECKING([for tiffio.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <tiffio.h>],
|
||||
tiff_ok=yes,
|
||||
tiff_ok=no)
|
||||
AC_MSG_RESULT($tiff_ok)
|
||||
if test "$tiff_ok" = yes; then
|
||||
TIFFLIBS=$tiff_libs
|
||||
else
|
||||
AC_MSG_WARN(*** Native TIFF support will not be built (TIFF header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for libungif
|
||||
AC_CHECK_LIB(ungif, DGifOpenFileName,
|
||||
gif_libs="-lungif"
|
||||
gif_ok=yes,
|
||||
gif_ok=no,
|
||||
$EXTRA_LIBS -lX11)
|
||||
if test "$gif_ok" = yes; then
|
||||
AC_MSG_CHECKING([for gif_lib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <gif_lib.h>],
|
||||
gif_ok=yes,
|
||||
gif_ok=no)
|
||||
AC_MSG_RESULT($gif_ok)
|
||||
if test "$gif_ok" = yes; then
|
||||
GIFLIBS=$gif_libs
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for libgif
|
||||
if test "$gif_ok" = no; then
|
||||
AC_CHECK_LIB(gif, DGifOpenFileName,
|
||||
gif_libs="-lgif"
|
||||
gif_ok=yes,
|
||||
gif_ok=no
|
||||
AC_MSG_WARN(*** Native GIF support will not be built (GIF library not found) ***),
|
||||
$EXTRA_LIBS)
|
||||
if test "$gif_ok" = yes; then
|
||||
AC_MSG_CHECKING([for gif_lib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <gif_lib.h>],
|
||||
gif_ok=yes,
|
||||
gif_ok=no)
|
||||
AC_MSG_RESULT($gif_ok)
|
||||
if test "$gif_ok" = yes; then
|
||||
GIFLIBS=$gif_libs
|
||||
else
|
||||
AC_MSG_WARN(*** Native GIF support will not be built (GIF header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for zlib
|
||||
AC_CHECK_LIB(z, uncompress,
|
||||
zlib_ok=yes,
|
||||
zlib_ok=no
|
||||
AC_MSG_WARN(*** Native zlib support will not be built (zlib not found) ***), $EXTRA_LIBS -lz)
|
||||
if test "$zlib_ok" = yes; then
|
||||
AC_MSG_CHECKING([for zlib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <zlib.h>],
|
||||
zlib_ok=yes,
|
||||
zlib_ok=no)
|
||||
AC_MSG_RESULT($zlib_ok)
|
||||
if test "$zlib_ok" = yes; then
|
||||
ZLIBLIBS="-lz"
|
||||
else
|
||||
AC_MSG_WARN(*** Native zlib support will not be built (zlib header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test for libbzip2
|
||||
AC_CHECK_LIB(bz2, BZ2_bzRead,
|
||||
bz2_ok=yes,
|
||||
bz2_ok=no
|
||||
AC_MSG_WARN(*** Native bz2 support will not be built (bzip2 library not found) ***), $EXTRA_LIBS -lbz2)
|
||||
if test "$bz2_ok" = yes; then
|
||||
AC_MSG_CHECKING([for bzlib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <bzlib.h>],
|
||||
bz2_ok=yes,
|
||||
bz2_ok=no)
|
||||
AC_MSG_RESULT($bz2_ok)
|
||||
if test "$bz2_ok" = yes; then
|
||||
BZ2LIBS="-lbz2"
|
||||
else
|
||||
AC_MSG_WARN(*** Native bz2 support will not be built (bzip2 header file not found) ***)
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(JPEG_LOADER, test "$jpeg_ok" = yes)
|
||||
AM_CONDITIONAL(PNG_LOADER, test "$png_ok" = yes)
|
||||
AM_CONDITIONAL(TIFF_LOADER, test "$tiff_ok" = yes)
|
||||
AM_CONDITIONAL(GIF_LOADER, test "$gif_ok" = yes)
|
||||
AM_CONDITIONAL(ZLIB_LOADER, test "$zlib_ok" = yes)
|
||||
AM_CONDITIONAL(BZ2_LOADER, test "$bz2_ok" = yes)
|
||||
|
||||
AC_SUBST(JPEGLIBS)
|
||||
AC_SUBST(PNGLIBS)
|
||||
AC_SUBST(TIFFLIBS)
|
||||
AC_SUBST(GIFLIBS)
|
||||
AC_SUBST(ZLIBLIBS)
|
||||
AC_SUBST(BZ2LIBS)
|
||||
AC_SUBST(REQUIREMENTS)
|
||||
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_ldflags)
|
||||
AC_SUBST(x_libs)
|
||||
AC_SUBST(dlopen_libs)
|
||||
AC_SUBST(freetype_libs)
|
||||
AC_SUBST(freetype_cflags)
|
||||
|
||||
dnl AC_SUBST(freetype_libs)
|
||||
dnl AC_SUBST(freetype_includes)
|
||||
|
||||
AC_OUTPUT(imlib2-config imlib2.pc Makefile loaders/Makefile src/Makefile test/Makefile \
|
||||
filters/Makefile demo/Makefile doc/Makefile \
|
||||
,
|
||||
[
|
||||
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h;
|
||||
chmod +x imlib2-config
|
||||
])
|
|
@ -1,6 +1,6 @@
|
|||
Summary: Powerful image loading and rendering library
|
||||
Name: imlib2
|
||||
Version: 1.1.0
|
||||
Version: 1.1.1
|
||||
Release: 1
|
||||
Copyright: BSD
|
||||
Group: System Environment/Libraries
|
||||
|
|
|
@ -7,7 +7,7 @@ MAINTAINERCLEANFILES = Makefile.in loaderpath.h
|
|||
|
||||
LDFLAGS = -L/usr/X11R6/lib
|
||||
INCLUDES = -I. -I$(top_srcdir) -I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/loaders -I$(top_srcdir)/libltdl \
|
||||
-I$(top_srcdir)/loaders \
|
||||
$(freetype_cflags) -I/usr/X11R6/include $(X_CFLAGS) \
|
||||
-I$(prefix)/include -I$(includedir)
|
||||
MMX_SRCS = asm_blend.S asm_rgba.S asm_scale.S asm_rotate.S \
|
||||
|
@ -28,16 +28,16 @@ libImlib2_la_SOURCES = scale.c image.c blend.c file.c rgbadraw.c api.c \
|
|||
EXTRA_libImlib2_la_SOURCES = rend.c ximage.c rgba.c color.c grab.c draw.c \
|
||||
context.c color.h context.h draw.h grab.h rend.h \
|
||||
rgba.h ximage.h $(MMX_SRCS)
|
||||
libImlib2_la_LDFLAGS = -version-info 2:0:1
|
||||
libImlib2_la_LDFLAGS = -version-info 2:1:1
|
||||
|
||||
if HAVE_MMX
|
||||
libImlib2_la_LIBADD = $(X_OBJS) @DLLDFLAGS@ $(MMX_OBJS) \
|
||||
$(top_builddir)/libltdl/libltdlc.la \
|
||||
-lltdl \
|
||||
$(x_libs) $(freetype_libs) $(LDFLAGS) -lm
|
||||
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h $(X_OBJS) $(MMX_OBJS)
|
||||
else
|
||||
libImlib2_la_LIBADD = $(X_OBJS) @DLLDFLAGS@ \
|
||||
$(top_builddir)/libltdl/libltdlc.la \
|
||||
-lltdl \
|
||||
$(x_libs) $(freetype_libs) $(LDFLAGS) -lm
|
||||
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h $(X_OBJS)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue