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, "Enables building of MMX assembly routines", [ 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 ebnalbe 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.4) 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 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_HEADERS(freetype.h freetype/freetype.h,[ break] , ) AC_OUTPUT(Makefile loaders/Makefile src/Makefile test/Makefile demo/Makefile, [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])