3 # -- I N I T --------------------------------------------------
5 AC_INIT([Synfig Studio],[0.61.07],[http://synfig.org/Bugs],[synfigstudio])
8 AC_CONFIG_AUX_DIR(config)
9 AM_CONFIG_HEADER(config.h)
11 dnl AC_CANONICAL_TARGET
18 # -- V A R I A B L E S ----------------------------------------
20 SVN_REPOSITORY=http://svn.voria.com/code/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)
70 AM_GNU_GETTEXT([external])
71 # This is here so autoreconf will run autopoint
72 AM_GNU_GETTEXT_VERSION([0.14.4])
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"
113 AC_MSG_ERROR([ ** Gtkmm-2.4 Is a required library, aborting.])
115 AC_SUBST(GTKMM_CFLAGS)
118 PKG_CHECK_MODULES(SYNFIG, [synfig >= 0.61.07] [ETL >= 0.04.10] sigc++-2.0,,[
119 AC_MSG_ERROR([ ** Unable to set up dependent libraries (synfig >= 0.61.07, ETL >= 0.04.10)])
121 AC_SUBST(SYNFIG_CFLAGS)
122 AC_SUBST(SYNFIG_LIBS)
125 AC_DEFINE(STUDIO_WINSYS_H,"gtkmm/winsys.h",[blah])
126 AM_CONDITIONAL(WINDOWSYS_GTKMM,true)
128 AC_ARG_WITH(userdir,[
129 --with-userdir=(dirname) Relative path to user directory],[
133 with_userdir="Synfig"
136 with_userdir="Library/Synfig"
139 with_userdir=".synfig"
143 AC_DEFINE_UNQUOTED(SYNFIG_USER_APP_DIR,"$with_userdir",[Synfig User Data Directory])
145 # --- FMOD CHECK -------------
146 AC_ARG_WITH(libfmod,[
147 --with-libfmod Enable support for FMOD],[
149 AC_CHECK_LIB(fmod, FSOUND_Init,[
155 if test $with_libfmod = "yes" ; then {
156 AM_CONDITIONAL(WITH_FMOD,true)
157 FMOD_LIBS="/usr/lib/libfmod.so"
158 AC_DEFINE(WITH_FMOD,"I'm here damnit",[blah])
160 AM_CONDITIONAL(WITH_FMOD,false)
164 # Check for unordered_map or hash_map headers
165 AC_MSG_CHECKING([for unordered_map<int,int>::const_iterator])
168 [#include <tr1/unordered_map>]
170 [std::tr1::unordered_map<int,int>::const_iterator iter;]
173 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.])
174 AC_DEFINE([HASH_MAP_H],[<tr1/unordered_map>],[The header file to include for unordered maps.])
175 AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.])
176 AC_DEFINE([FUNCTIONAL_H],[<tr1/functional>],[The header file for hash<T>.])
177 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.])
180 AC_CHECK_HEADERS([ext/hash_map],[
181 AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.])
182 AC_DEFINE([HASH_MAP_H],[<ext/hash_map>],[The header file to include for unordered maps.])
183 AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.])
184 AC_DEFINE([FUNCTIONAL_H],[<ext/functional>],[The header file for hash<T>.])
186 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
190 # Check for unordered_set or hash_set headers
191 AC_MSG_CHECKING([for unordered_set<int,int>::const_iterator])
194 [#include <tr1/unordered_set>]
196 [std::tr1::unordered_set<int,int>::const_iterator iter;]
199 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.])
200 AC_DEFINE([HASH_SET_H],[<tr1/unordered_set>],[The header file to include for unordered sets.])
201 AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.])
204 AC_CHECK_HEADERS([ext/hash_set],[
205 AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.])
206 AC_DEFINE([HASH_SET_H],[<ext/hash_set>],[The header file to include for unordered sets.])
207 AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.])
209 AC_MSG_ERROR([C++ compiler does not seem to support unordered containers])
213 # -- H E A D E R S --------------------------------------------
215 AC_CHECK_HEADERS([unistd.h signal.h fcntl.h])
216 AC_CHECK_HEADERS([sys/types.h sys/wait.h sys/stat.h sys/time.h sys/resource.h sys/errno.h])
218 # -- T Y P E S & S T R U C T S --------------------------------
220 # -- F U N C T I O N S ----------------------------------------
222 AC_CHECK_FUNCS([fork])
223 AC_CHECK_FUNCS([kill])
224 AC_CHECK_FUNCS([pipe])
225 AC_CHECK_FUNCS([setpriority mkfifo stat])
227 # -- A R G U M E N T S ----------------------------------------
229 # -- O U T P U T ----------------------------------------------
235 AC_SUBST(SVN_REPOSITORY)
237 AC_SUBST(API_VERSION)
245 imagedir="${datadir}/pixmaps/synfigstudio"
257 synfigstudio-thumbnailer.schemas
260 src/synfigapp/Makefile
263 pkg-info/macosx/synfig-studio.info
266 # -- S U M M A R Y --------------------------------------------
269 $PACKAGE_NAME v.$VERSION
270 Configuration Summary
273 Install Prefix -------------------> $prefix
274 Host Platform --------------------> $host
275 Icon Format ----------------------> $imageext
276 Debug Mode -----------------------> $debug
277 Profiling Mode -------------------> $profiling
278 Optimizations --------------------> $optimization
279 Window System --------------------> $windowsys
280 FMOD Enabled ---------------------> $with_libfmod
282 "'$'"CXX ------------------------------> '$CXX'
283 "'$'"CXXFLAGS -------------------------> '$CXXFLAGS'
284 "'$'"LDFLAGS --------------------------> '$LDFLAGS'
285 "'$'"SYNFIG_CFLAGS ---------------------> '$SYNFIG_CFLAGS'
286 "'$'"SYNFIG_LIBS -----------------------> '$SYNFIG_LIBS'
287 "'$'"GTKMM_CFLAGS ---------------------> '$GTKMM_CFLAGS'
288 "'$'"GTKMM_LIBS -----------------------> '$GTKMM_LIBS'