[balsa] Pass install directories on compile command line



commit dd08f5a573c9079ec8b2528406df5ce7a29c0ed8
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Apr 24 19:09:15 2017 -0400

    Pass install directories on compile command line
    
        * configure.ac: pass install directories on the compile command
        line instead of in config.h;
        * libbalsa/files.c: use the directories.

 ChangeLog        |    6 ++++++
 configure.ac     |   27 ++-------------------------
 libbalsa/files.c |    8 ++------
 3 files changed, 10 insertions(+), 31 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3e115a6..cc60c4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-24  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * configure.ac: pass install directories on the compile command
+       line instead of in config.h;
+       * libbalsa/files.c: use the directories.
+
 2017-04-23  Peter Bloomfield  <pbloomfield bellsouth net>
 
        * configure.ac: fix a warning about changing the permissions
diff --git a/configure.ac b/configure.ac
index 582ca21..404b6b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -790,36 +790,13 @@ AC_CHECK_FUNCS(getaddrinfo)
 
 dnl ###########################################################################
 dnl Remember our prefixes
-dnl   The way prefix et al are defined makes us jump through some hoops.
 dnl ###########################################################################
 
 if test "x$prefix" = "xNONE"; then
        prefix=$ac_default_prefix
 fi
-dnl datadir='${prefix}/share', so we must eval it or something. This works
-BALSA_STD_PREFIX=`eval "echo ${prefix}"`
-BALSA_DATA_PREFIX=`eval "echo ${datadir}/balsa"`
-dnl autoconf-2.60 leaves a literal "${prefix}" in BALSA_DATA_PREFIX, so
-dnl we clean it once more.
-BALSA_DATA_PREFIX=`eval "echo ${BALSA_DATA_PREFIX}"`
-AC_SUBST(BALSA_DATA_PREFIX)
-
-dnl Consolidate them!
-AC_PROG_AWK
-BALSA_COMMON_PREFIXES=`sort<<EOF|uniq|${AWK} '{if(l!~/^$/)print l ",";l=$0}END{print l}'
-"${BALSA_STD_PREFIX}"
-"${BALSA_DATA_PREFIX}"
-EOF
-`
-
-dnl Better way to do this?
-AC_DEFINE_UNQUOTED( BALSA_STD_PREFIX, "$BALSA_STD_PREFIX",
-                   [Directory for all balsa files.] )
-AC_DEFINE_UNQUOTED( BALSA_DATA_PREFIX, "$BALSA_DATA_PREFIX",
-                  [Directory for storing balsa data files.] )
-AC_DEFINE_UNQUOTED( BALSA_COMMON_PREFIXES, `echo $BALSA_COMMON_PREFIXES`,
-                  [Common directories for storing balsa icons.] ) 
-dnl bleah
+CPPFLAGS="$CPPFLAGS -DBALSA_STD_PREFIX=\\\"${prefix}\\\""
+CPPFLAGS="$CPPFLAGS -DBALSA_DATA_PREFIX=\\\"${datadir}/balsa\\\""
 
 
 dnl ###########################################################################
diff --git a/libbalsa/files.c b/libbalsa/files.c
index 6472fd8..de37bae 100644
--- a/libbalsa/files.c
+++ b/libbalsa/files.c
@@ -33,12 +33,8 @@
 #include <glib/gi18n.h>
 
 static const gchar *permanent_prefixes[] = {
-/*     BALSA_DATA_PREFIX,
-       BALSA_STD_PREFIX,
-       GNOME_DATA_PREFIX
-       GNOME_STD_PREFIX,
-       GNOME_LIB_PREFIX,*/
-    BALSA_COMMON_PREFIXES,
+    BALSA_DATA_PREFIX,
+    BALSA_STD_PREFIX,
     "src",
     ".",
     NULL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]