1dnl Process this file with autoconf to create configure. 2 3dnl ################################################################ 4dnl # Initialize autoconf 5dnl ################################################################ 6AC_INIT(fyre, 1.0.1, trowbrds@gmail.com) 7AC_PREREQ(2.50) 8AC_CONFIG_SRCDIR(config.h.in) 9AC_COPYRIGHT([Copyright 2004-2006 David Trowbridge and Micah Dowty]) 10 11dnl ################################################################ 12dnl # Initialize automake 13dnl ################################################################ 14VERSION=1.0.1 15PACKAGE=fyre 16AM_INIT_AUTOMAKE($PACKAGE, $VERSION) 17 18AM_CONFIG_HEADER(config.h) 19 20dnl ################################################################ 21dnl # Check for some standard stuff 22dnl ################################################################ 23AC_PROG_CC 24AC_PROG_CXX 25AC_PROG_MAKE_SET 26AC_PROG_LN_S 27AC_PROG_INSTALL 28 29AC_C_CONST 30AC_TYPE_SIZE_T 31AC_EXEEXT 32AC_FUNC_FORK 33 34AM_BINRELOC 35AM_CONDITIONAL([HAVE_BINRELOC], [ test "x$br_cv_binreloc" = "xyes" ]) 36 37AC_PATH_PROG(XDGMIME, update-mime-database, no) 38if test "x$XDGMIME" = "xno"; then 39 enable_xdgmime="no" 40else 41 enable_xdgmime="yes" 42fi 43AM_CONDITIONAL(ENABLE_XDGMIME, test "x$enable_xdgmime" = "xyes") 44 45AC_PATH_PROG(FDODESKTOP, update-desktop-database, no) 46if test "x$FDODESKTOP" = "xno"; then 47 enable_fdodesktop="no" 48else 49 enable_fdodesktop="yes" 50fi 51AM_CONDITIONAL(ENABLE_FDODESKTOP, test "x$enable_fdodesktop" = "xyes") 52 53pkg_modules="glib-2.0 >= 2.0.0, gtk+-2.0 >= 2.0.0, libglade-2.0 >= 2.0" 54PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) 55AC_SUBST(PACKAGE_CFLAGS) 56AC_SUBST(PACKAGE_LIBS) 57 58# Check for windows, enable compiling windows resources if we find it 59AC_MSG_CHECKING([for Win32]) 60case "$host" in 61 *mingw*) 62 WIN32_LIBS=fyre-win32-res.o 63 ;; 64 *) 65 WIN32_LIBS= 66 ;; 67esac 68AC_SUBST(WIN32_LIBS) 69 70# Check for getopt. If we're missing it, include our own version 71AC_CHECK_FUNC(getopt_long, have_getopt=yes) 72AM_CONDITIONAL([HAVE_GETOPT], [test "x$have_getopt" = "xyes"]) 73 74# Check for OpenEXR- we support saving OpenEXR files if the library is available 75AC_ARG_ENABLE(openexr, [ --disable-openexr build without OpenEXR support]) 76if test x$enable_openexr != xno; then 77 PKG_CHECK_MODULES(EXR, OpenEXR, have_exr=yes, have_exr=no) 78 AC_SUBST(EXR_CFLAGS) 79 AC_SUBST(EXR_LIBS) 80 if test "x$have_exr" = "xyes"; then 81 AC_DEFINE(HAVE_EXR, 1,[compile in OpenEXR support]) 82 fi 83 AM_CONDITIONAL([HAVE_EXR], [test "x$have_exr" = "xyes"]) 84else 85 AM_CONDITIONAL([HAVE_EXR], false) 86fi 87 88# Check for gnet, required for cluster and remote control support 89AC_ARG_ENABLE(gnet, [ --disable-gnet build without clustering/remote control]) 90if test x$enable_gnet != xno; then 91 PKG_CHECK_MODULES(GNET, gnet-2.0, have_gnet=yes, have_gnet=no) 92 AC_SUBST(GNET_CFLAGS) 93 AC_SUBST(GNET_LIBS) 94 if test "x$have_gnet" = "xyes"; then 95 AC_DEFINE(HAVE_GNET, 1,[compile in gnet support]) 96 fi 97 AM_CONDITIONAL([HAVE_GNET], [test "x$have_gnet" = "xyes"]) 98else 99 AM_CONDITIONAL([HAVE_GNET], false) 100fi 101 102dnl # Use wall if we have GCC 103dnl # Also disable glibc versions of functions that have faster versions 104dnl # versions as gcc inlines. This should speed up trig on some systems. 105if test "x$GCC" = "xyes"; then 106 CFLAGS="$CFLAGS -D__NO_INLINE__ -Wall" 107fi 108 109dnl # -O3 and -ffast-math should make it go faster on any system 110dnl # But Intel icc doesn't have -ffast-math, just -ffast, which is creepy 111if test "x$CC" = "xicc"; then 112 CFLAGS="$CFLAGS -O3" 113else 114 CFLAGS="$CFLAGS -O3 -ffast-math" 115fi 116 117dnl ### FIXME 118dnl # -march=i686 speeds this up quite a bit on my machine (even more so 119dnl # than -march=athlon-xp) so if this looks like a recent x86 machine, 120dnl # stick that in CFLAGS 121dnl # CFLAGS += $(shell if grep mmx /proc/cpuinfo > /dev/null; then echo -march=i686; fi) 122 123 124dnl ################################################################ 125dnl # Output the Makefiles 126dnl ################################################################ 127AC_CONFIG_FILES([ 128Makefile 129autopackage/default.apspec 130data/Makefile 131data/icons/Makefile 132data/icons/16x16/Makefile 133data/icons/22x22/Makefile 134data/icons/24x24/Makefile 135data/icons/scalable/Makefile 136src/Makefile 137contrib/Makefile 138]) 139 140AC_OUTPUT 141 142echo 143echo $PACKAGE v$VERSION 144echo 145 146if test "x$have_exr" != "xyes"; then 147 echo "Not including support for OpenEXR files" 148else 149 echo "Including support for OpenEXR files" 150fi 151if test "x$have_gnet" != "xyes"; then 152 echo "Not including clustering or remote control support" 153else 154 echo "Including clustering or remote control support" 155fi 156 157echo 158echo "Now type make to compile" 159echo "Then su to root and type: make install" 160echo 161