From: <hdo...@us...> - 2006-10-30 14:41:19
|
Revision: 1127 http://svn.sourceforge.net/wired/?rev=1127&view=rev Author: hdoomsday Date: 2006-10-30 06:40:22 -0800 (Mon, 30 Oct 2006) Log Message: ----------- resolved some autotools bugs. sysconfdir, libdir, datadir and prefix should be handle correctly. With or without any options, wired and installations directories works. Modified Paths: -------------- trunk/wired/configure.ac trunk/wired/src/data/ihm/settings/Makefile.am trunk/wired/src/data/ihm/splash/Makefile.am trunk/wired/src/engine/Settings.cpp trunk/wired/src/gui/MainApp.cpp trunk/wired/src/gui/MainWindow.cpp Modified: trunk/wired/configure.ac =================================================================== --- trunk/wired/configure.ac 2006-10-30 07:45:19 UTC (rev 1126) +++ trunk/wired/configure.ac 2006-10-30 14:40:22 UTC (rev 1127) @@ -185,6 +185,7 @@ AC_PREFIX_DEFAULT(/usr/local) if [[ $prefix = "NONE" ]] ; then + prefix="/usr/local" AC_DEFINE(INSTALL_PREFIX, "/usr/local", [define as prefix where Wired is installed]) else @@ -192,27 +193,48 @@ [define as prefix where Wired is installed]) fi +if [[ $exec_prefix = "NONE" ]] ; then +exec_prefix=`eval echo ${prefix}` +fi +echo +echo +echo +echo +echo +echo + +echo "EXEC PREFIX : $exec_prefix" +echo " PREFIX : $prefix" +echo +echo +echo +echo +echo + # For include -includedir=`eval echo ${includedir}/wired` -INCLUDE_DIR=${includedir} +includedir="`eval echo ${includedir}/wired`" +INCLUDE_DIR="${includedir}" AC_DEFINE_UNQUOTED(INCLUDEDIR, "$INCLUDE_DIR", [define as includes dir]) # For libdir -LIB_DIR=${libdir}/wired +LIB_DIR="`eval echo ${libdir}/wired`" AC_DEFINE_UNQUOTED(LIB_DIR, "$LIB_DIR", [define as libraries dir]) +# For sysconfdir +sysconfdir="`eval echo ${sysconfdir}/wired`" +SYSCONF_DIR="${sysconfdir}" +AC_DEFINE_UNQUOTED(SYSCONF_DIR, "$SYSCONF_DIR", [define as sysconf dir]) + # For share -DATA_DIR=`eval echo ${datadir}/wired` +DATA_DIR="`eval echo ${datadir}`" AC_DEFINE_UNQUOTED(DATA_DIR, "$DATA_DIR", [define as datas dir]) -# For sysconfdir -sysconfdir=`eval echo ${sysconfdir}/wired` -SYSCONF_DIR=${sysconfdir} -AC_DEFINE_UNQUOTED(SYSCONF_DIR, "$SYSCONF_DIR", [define as sysconf dir]) +# for locale +PACKAGE_LOCALE_DIR="`eval echo ${datadir}/locale`" +AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "$PACKAGE_LOCALE_DIR", [define the locale dir path]) - ################## # Checking Options AC_MSG_CHECKING([for enable-optimize]) @@ -243,12 +265,6 @@ AM_GNU_GETTEXT([use-libtool]) AM_GNU_GETTEXT_VERSION([0.14.4]) -if test "x${prefix}" = "xNONE"; then - AC_DEFINE(PACKAGE_LOCALE_DIR, "/usr/local/share/wired/locale", [define the locale dir path]) -else - AC_DEFINE(PACKAGE_LOCALE_DIR, "${prefix}/share/wired/locale", [define the locale dir path]) -fi - AC_CONFIG_FILES([src/plugins/beatbox/Makefile src/plugins/compressor/Makefile src/plugins/crusher/Makefile @@ -378,8 +394,8 @@ ]) AC_MSG_RESULT([ Installation directories : - - Library directory : ........... ${prefix}/lib - Program directory : ........... ${prefix}/bin - Data directory : .............. ${prefix}/shared/wired + Wired plugins directory: .............. ${LIB_DIR} + Wired binary directory : .............. ${prefix}/bin + Wired data directory : .............. ${DATA_DIR} + Wired conf directory : .............. ${SYSCONF_DIR} ]) Modified: trunk/wired/src/data/ihm/settings/Makefile.am =================================================================== --- trunk/wired/src/data/ihm/settings/Makefile.am 2006-10-30 07:45:19 UTC (rev 1126) +++ trunk/wired/src/data/ihm/settings/Makefile.am 2006-10-30 14:40:22 UTC (rev 1127) @@ -1,3 +1,3 @@ datasdir = ${datadir}/wired//ihm/settings datas_DATA = *.xpm -EXTRA_DIST = ${datas_DATA} \ No newline at end of file +EXTRA_DIST = ${datas_DATA} Modified: trunk/wired/src/data/ihm/splash/Makefile.am =================================================================== --- trunk/wired/src/data/ihm/splash/Makefile.am 2006-10-30 07:45:19 UTC (rev 1126) +++ trunk/wired/src/data/ihm/splash/Makefile.am 2006-10-30 14:40:22 UTC (rev 1127) @@ -1,3 +1,3 @@ -datasdir = ${datadir}/wired//ihm/splash +datasdir = ${datadir}/wired/ihm/splash datas_DATA = *.png *.gif EXTRA_DIST = ${datas_DATA} \ No newline at end of file Modified: trunk/wired/src/engine/Settings.cpp =================================================================== --- trunk/wired/src/engine/Settings.cpp 2006-10-30 07:45:19 UTC (rev 1126) +++ trunk/wired/src/engine/Settings.cpp 2006-10-30 14:40:22 UTC (rev 1127) @@ -32,9 +32,7 @@ PlugConfFile = ConfDir + PLUG_CONF_FILE; } - // basicaly, we don't have to add a '/'. - // after API rewriting, we should remove it. - DataDir = wxString(wxT(DATA_DIR)) + wxT("/"); + DataDir = wxString(wxT(DATA_DIR)) + wxT("/wired/"); f.Assign(DataDir); if (!f.DirExists()) Modified: trunk/wired/src/gui/MainApp.cpp =================================================================== --- trunk/wired/src/gui/MainApp.cpp 2006-10-30 07:45:19 UTC (rev 1126) +++ trunk/wired/src/gui/MainApp.cpp 2006-10-30 14:40:22 UTC (rev 1127) @@ -48,7 +48,7 @@ m_condAllDone = new wxCondition(m_mutex); // splash screen - if (bitmap.LoadFile(wxString(DATA_DIR, *wxConvCurrent) + wxString(wxT("/wired/data/ihm/splash/splash.png")), wxBITMAP_TYPE_PNG)) + if (bitmap.LoadFile(wxString(DATA_DIR, *wxConvCurrent) + wxString(wxT("/wired/ihm/splash/splash.png")), wxBITMAP_TYPE_PNG)) { splash = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT, Modified: trunk/wired/src/gui/MainWindow.cpp =================================================================== --- trunk/wired/src/gui/MainWindow.cpp 2006-10-30 07:45:19 UTC (rev 1126) +++ trunk/wired/src/gui/MainWindow.cpp 2006-10-30 14:40:22 UTC (rev 1127) @@ -444,7 +444,7 @@ { // disable extra output of wx wxLog log(wxLogNull); - wxString prefix = wxString(wxT(DATA_DIR)) + wxString(wxT("/locale/")); + wxString prefix = wxT(PACKAGE_LOCALE_DIR); mLocale = new wxLocale(); mLocale->AddCatalogLookupPathPrefix(prefix); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |