Added "--with-userdir" to configure script to change the default user settings directory
authordarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 23 Feb 2006 20:17:17 +0000 (20:17 +0000)
committerdarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 23 Feb 2006 20:17:17 +0000 (20:17 +0000)
git-svn-id: http://svn.voria.com/code@127 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/config/configure.ac
synfig-studio/trunk/src/gtkmm/app.cpp

index 02187fd..f40b42d 100755 (executable)
@@ -95,6 +95,22 @@ windowsys="gtkmm"
 AC_DEFINE(STUDIO_WINSYS_H,"gtkmm/winsys.h",[blah])
 AM_CONDITIONAL(WINDOWSYS_GTKMM,true)
 
+AC_ARG_WITH(userdir,[
+  --with-userdir=(dirname)         Relative path to user directory],[
+],[
+case "$host" in
+       *mingw* | *cygwin*)
+               with_userdir="Synfig"
+       ;;
+       *darwin*)
+               with_userdir="Library/Synfig"
+       ;;
+       *)
+               with_userdir="Synfig"
+       ;;
+esac
+])
+AC_DEFINE_UNQUOTED(SYNFIG_USER_APP_DIR,"$with_userdir",[Synfig User Data Directory])
 
 # --- FMOD CHECK -------------
 AC_ARG_WITH(libfmod,[
index 14fc4b1..14c962e 100644 (file)
@@ -131,6 +131,14 @@ using namespace studio;
 
 /* === M A C R O S ========================================================= */
 
+#ifndef SYNFIG_USER_APP_DIR
+#ifdef __APPLE__
+#define SYNFIG_USER_APP_DIR    "Library/Synfig"
+#else
+#define SYNFIG_USER_APP_DIR    "Synfig"
+#endif
+#endif
+
 #ifndef DPM2DPI
 #define DPM2DPI(x)     (float(x)/39.3700787402f)
 #define DPI2DPM(x)     (float(x)*39.3700787402f)
@@ -1340,11 +1348,7 @@ App::~App()
 String
 App::get_user_app_directory()
 {
-#ifdef __APPLE__
-       return Glib::build_filename(Glib::get_home_dir(),"Library/Synfig");
-#else
-       return Glib::build_filename(Glib::get_home_dir(),"Synfig");
-#endif
+       return Glib::build_filename(Glib::get_home_dir(),SYNFIG_USER_APP_DIR);
 }
 
 synfig::String