forked from old/legacy-imlib2
122 lines
3.5 KiB
Plaintext
122 lines
3.5 KiB
Plaintext
dnl Process this file with autoconf to create configure.
|
|
|
|
AC_INIT(src/Imlib2.h)
|
|
AM_CONFIG_HEADER(config.h)
|
|
AC_CANONICAL_SYSTEM
|
|
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_INIT_AUTOMAKE(imlib2, 0.0.5)
|
|
|
|
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
|
|
|
|
LTLIBOBJS=`echo "$LIBOBJS" | sed 's,.o ,.lo ,g;s,.o$,.lo,'`
|
|
AC_SUBST(LTLIBOBJS)
|
|
|
|
AC_CHECK_LIB(ttf, TT_Init_FreeType, TTF_LIBS=-lttf, [
|
|
echo ""
|
|
echo "ERROR: Imlib 2 needs a system with libttf.so (TrueType Font Library)"
|
|
echo "You can obtain it from:"
|
|
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
|
echo "ftp://www.rasterman.com/pub/enlightenment/"
|
|
echo "You can also obtain it from:"
|
|
echo "http://www.freetype.org/"
|
|
echo "You can obtain some truetype fonts from:"
|
|
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_HEADER(freetype.h, [ ftype=yes ], [ ftype=no ])
|
|
AC_CHECK_HEADER(freetype/freetype.h, [ ftype_ftype=yes ], [ ftype_ftype=no ])
|
|
|
|
if test x$ftype = xno; then
|
|
if test x$ftype_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"
|
|
echo "header files to build Imlib 2. This may mean you have to install the"
|
|
echo "freetype-devel packages for your distribution or if all else fails"
|
|
echo "find the source for freetype and install that somewhere where Imlib 2"
|
|
echo "can find the header files."
|
|
echo ""
|
|
echo "You can obtain it from:"
|
|
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
|
echo "ftp://www.rasterman.com/pub/enlightenment/"
|
|
echo "You can also obtain it from:"
|
|
echo "http://www.freetype.org/"
|
|
echo "You can obtain some truetype fonts from:"
|
|
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
|
|
echo ""
|
|
AC_MSG_ERROR([Fatal Error: no FreeType header files detected.])
|
|
fi
|
|
fi
|
|
|
|
AC_OUTPUT(Makefile loaders/Makefile src/Makefile test/Makefile filters/Makefile demo/Makefile dox/Makefile,
|
|
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
|