3 # -- I N I T --------------------------------------------------
5 AC_INIT([Synfig Studio],[0.62.01],[http://synfig.org/Bugs],[synfigstudio])
8 AC_CONFIG_AUX_DIR(config)
9 AC_CONFIG_HEADERS([config.h])
11 dnl AC_CANONICAL_TARGET
18 # -- V A R I A B L E S ----------------------------------------
20 SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/synfig-studio
22 # -- P R O G R A M S ------------------------------------------
38 AC_DEFINE(SHOW_EXTRA_INFO,[],[Show extra info in the about dialog])
45 AC_ARG_BRANCH_PROBABILITIES
49 --enable-g5opt enable optimizations specific to G5 proc],[
50 G5OPTFLAGS="-mpowerpc-gpopt -mno-multiple -mno-update -mcpu=970 -mtune=970 -falign-loops=16 -falign-functions=16"
63 AC_SUBST(LIBTOOL_DEPS)
66 ## FIXME: add i18n for .desktop and other non-compiled files
67 ## AM_GLIB_GNU_GETTEXT([external])
68 ## AC_PROG_INTLTOOL(0.11)
69 ALL_LINGUAS="ca fr es it ru de en_GB zh_CN"
70 AM_GNU_GETTEXT([external])
71 # This is here so autoreconf will run autopoint
72 AM_GNU_GETTEXT_VERSION([0.15])
76 AM_CONDITIONAL(WIN32_PKG, true)
77 AM_CONDITIONAL(MACOSX_PKG, false)
80 AM_CONDITIONAL(WIN32_PKG, false)
81 AM_CONDITIONAL(MACOSX_PKG, true)
82 AC_DEFINE(USE_OPEN_FOR_URLS,[],[On MacOS X "open <URL>" works, on Linux it tries to open a virtual console.] )
85 AM_CONDITIONAL(WIN32_PKG, false)
86 AM_CONDITIONAL(MACOSX_PKG, false)
89 # -- L I B R A R I E S ----------------------------------------
91 PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 gthread-2.0,[
92 AC_MSG_CHECKING([for Gtk::AboutDialog::set_program_name])
93 synfigstudio_save_cxxflags="$CXXFLAGS"
94 CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS"
98 [#include <gtkmm/aboutdialog.h>]
100 [Gtk::AboutDialog about; about.set_program_name(PACKAGE_NAME)]
104 AC_DEFINE(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,[],[Define if GTKmm provides Gtk::AboutDialog::set_program_name()] )
105 AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,true)
108 AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,false)
111 CXXFLAGS="$synfigstudio_save_cxxflags"
112 AC_MSG_CHECKING([for Gtk::AboutDialog::set_wrap_license])
113 synfigstudio_save_cxxflags="$CXXFLAGS"
114 CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS"
118 [#include <gtkmm/aboutdialog.h>]
120 [Gtk::AboutDialog about; about.set_wrap_license(true)]
124 AC_DEFINE(HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE,[],[Define if GTKmm provides Gtk::AboutDialog::set_wrap_license()] )
125 AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE,true)
128 AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE,false)
131 CXXFLAGS="$synfigstudio_save_cxxflags"
133 AC_MSG_ERROR([ ** Gtkmm-2.4 Is a required library, aborting.])
135 AC_SUBST(GTKMM_CFLAGS)
138 PKG_CHECK_MODULES(SYNFIG, [synfig >= 0.62.01] [ETL >= 0.04.13] sigc++-2.0,,[
139 AC_MSG_ERROR([ ** Unable to set up dependent libraries (synfig >= 0.62.01, ETL >= 0.04.13)])
141 AC_SUBST(SYNFIG_CFLAGS)
142 AC_SUBST(SYNFIG_LIBS)
145 AC_DEFINE(STUDIO_WINSYS_H,"gtkmm/winsys.h",[blah])
146 AM_CONDITIONAL(WINDOWSYS_GTKMM,true)
148 AC_ARG_WITH(userdir,[
149 --with-userdir=(dirname) Relative path to user directory],[
153 with_userdir="Synfig"
156 with_userdir="Library/Synfig"
159 with_userdir=".synfig"
163 AC_DEFINE_UNQUOTED(SYNFIG_USER_APP_DIR,"$with_userdir",[Synfig User Data Directory])
165 # --- FMOD CHECK -------------
166 AC_ARG_WITH(libfmod,[
167 --with-libfmod Enable support for FMOD],[
169 AC_CHECK_LIB(fmod, FSOUND_Init,[
175 if test $with_libfmod = "yes" ; then {
176 AM_CONDITIONAL(WITH_FMOD,true)
177 FMOD_LIBS="/usr/lib/libfmod.so"
178 AC_DEFINE(WITH_FMOD,"I'm here damnit",[blah])
180 AM_CONDITIONAL(WITH_FMOD,false)
184 # Check for unordered_map or hash_map headers
185 AC_MSG_CHECKING([for unordered_map<int,int>::const_iterator])
188 [#include <tr1/unordered_map>]
190 [std::tr1::unordered_map<int,int>::const_iterator iter;]
193 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.])
194 AC_DEFINE([HASH_MAP_H],[<tr1/unordered_map>],[The header file to include for unordered maps.])
195 AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.])
196 AC_DEFINE([FUNCTIONAL_H],[<tr1/functional>],[The header file for hash<T>.])
197 AC_DEFINE([FUNCTIONAL_HASH_ON_STRING],[1],[Define to 1 if hash<T> needs to use T=String rather than T=char* to hash strings.])
200 AC_CHECK_HEADERS([ext/hash_map],[
201 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.])
202 AC_DEFINE([HASH_MAP_H],[<ext/hash_map>],[The header file to include for unordered maps.])
203 AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.])
204 AC_DEFINE([FUNCTIONAL_H],[<ext/functional>],[The header file for hash<T>.])
206 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
210 # Check for unordered_set or hash_set headers
211 AC_MSG_CHECKING([for unordered_set<int,int>::const_iterator])
214 [#include <tr1/unordered_set>]
216 [std::tr1::unordered_set<int,int>::const_iterator iter;]
219 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.])
220 AC_DEFINE([HASH_SET_H],[<tr1/unordered_set>],[The header file to include for unordered sets.])
221 AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.])
224 AC_CHECK_HEADERS([ext/hash_set],[
225 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.])
226 AC_DEFINE([HASH_SET_H],[<ext/hash_set>],[The header file to include for unordered sets.])
227 AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.])
229 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
233 # -- H E A D E R S --------------------------------------------
235 AC_CHECK_HEADERS([unistd.h signal.h fcntl.h])
236 AC_CHECK_HEADERS([sys/types.h sys/wait.h sys/stat.h sys/time.h sys/resource.h sys/errno.h])
238 # -- T Y P E S & S T R U C T S --------------------------------
240 # -- F U N C T I O N S ----------------------------------------
242 AC_CHECK_FUNCS([fork])
243 AC_CHECK_FUNCS([kill])
244 AC_CHECK_FUNCS([pipe])
245 AC_CHECK_FUNCS([setpriority mkfifo stat])
247 # -- A R G U M E N T S ----------------------------------------
249 # -- O U T P U T ----------------------------------------------
255 AC_SUBST(SVN_REPOSITORY)
257 AC_SUBST(API_VERSION)
265 imagedir="${datadir}/pixmaps/synfigstudio"
268 AC_CONFIG_FILES([Makefile
276 synfigstudio-thumbnailer.schemas
279 src/synfigapp/Makefile
282 pkg-info/macosx/synfig-studio.info
286 # -- S U M M A R Y --------------------------------------------
289 $PACKAGE_NAME v.$VERSION
290 Configuration Summary
293 Install Prefix -------------------> $prefix
294 Host Platform --------------------> $host
295 Icon Format ----------------------> $imageext
296 Debug Mode -----------------------> $debug
297 Profiling Mode -------------------> $profiling
298 Optimizations --------------------> $optimization
299 Window System --------------------> $windowsys
300 FMOD Enabled ---------------------> $with_libfmod
302 "'$'"CXX ------------------------------> '$CXX'
303 "'$'"CXXFLAGS -------------------------> '$CXXFLAGS'
304 "'$'"LDFLAGS --------------------------> '$LDFLAGS'
305 "'$'"SYNFIG_CFLAGS ---------------------> '$SYNFIG_CFLAGS'
306 "'$'"SYNFIG_LIBS -----------------------> '$SYNFIG_LIBS'
307 "'$'"GTKMM_CFLAGS ---------------------> '$GTKMM_CFLAGS'
308 "'$'"GTKMM_LIBS -----------------------> '$GTKMM_LIBS'