]> granicus.if.org Git - mutt/commitdiff
Clean up the sharedir mess. From Lars Hecking.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 4 Jun 2001 17:14:30 +0000 (17:14 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 4 Jun 2001 17:14:30 +0000 (17:14 +0000)
INSTALL
Makefile.am
configure.in
contrib/Makefile.in
doc/Makefile.in
doc/instdoc.sh.in
init.c
main.c
muttbug.sh.in
sendlib.c

diff --git a/INSTALL b/INSTALL
index 38e6049b56bba666b145615b8591b0d653570fab..f1c294ed568ca3fed0486601554a58ae4afb210d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -61,10 +61,6 @@ to ``configure'' to help it out, or change the default behavior:
 --prefix=DIR
        install Mutt in DIR instead of /usr/local
 
---with-sharedir=DIR
-       specify where to put architecture independent data files
-
-
 --with-curses=DIR
        use the curses lib in DIR/lib.  If you have ncurses, ``configure''
        will automatically look in /usr/include/ncurses for the include
index f6bf7e6381a1bc4e31eec7ffebd6b21a1330e6f1..4e8c878a54f59ef8030038a00cb79d7051dcf222 100644 (file)
@@ -52,7 +52,7 @@ makedoc_DEPENDENCIES =
 
 CPP=@CPP@
 
-DEFS=-DSHAREDIR=\"$(sharedir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
+DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
 
 INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) -Iintl -I$(includedir)
@@ -129,12 +129,11 @@ install-exec-local:
        fi
 
 install-data-local: Muttrc
-       $(srcdir)/mkinstalldirs $(DESTDIR)$(sharedir)
        $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
-       -if [ -f $(DESTDIR)$(sharedir)/Muttrc ] ; then \
-               mv $(DESTDIR)$(sharedir)/Muttrc $(DESTDIR)$(sysconfdir) ; \
-       elif [ -f $(DESTDIR)$(sharedir)/../Muttrc ] ; then \
-               mv $(DESTDIR)$(sharedir)/../Muttrc $(DESTDIR)$(sysconfdir) ; \
+       -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \
+               mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \
+       elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttrc ] ; then \
+               mv $(DESTDIR)$(pkgdatadir)/../Muttrc* $(DESTDIR)$(sysconfdir) ; \
        elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttrc ] ; then \
                $(INSTALL) -m 644 $(srcdir)/Muttrc $(DESTDIR)$(sysconfdir) ; \
        fi
index 4934f8dd18f14a63f6b9933501d585b4a6428e18..bbc9b07282611edab2948286709db29bf8009a9e 100644 (file)
@@ -404,29 +404,6 @@ fi
 
 AC_SUBST(DOTLOCK_TARGET)
 
-
-AC_MSG_CHECKING(where to put architecture-dependent files)
-AC_ARG_WITH(libdir, [  --with-libdir=PATH         Specify where to put arch dependent files],
-        [mutt_cv_libdir=$withval],
-        [mutt_cv_libdir="${mutt_cv_prefix}/lib/mutt"])
-AC_MSG_RESULT($mutt_cv_libdir)
-
-libdir=$mutt_cv_libdir
-AC_SUBST(libdir)
-
-AC_MSG_CHECKING(where to put architecture-independent data files)
-AC_ARG_WITH(sharedir, [  --with-sharedir=PATH       Specify where to put arch independent files],
-        [mutt_cv_sharedir=$withval],
-        [if test -d ${mutt_cv_prefix}/share; then
-                mutt_cv_sharedir="${mutt_cv_prefix}/share/mutt"
-        else
-                mutt_cv_sharedir="$libdir"
-        fi])
-AC_MSG_RESULT($mutt_cv_sharedir)
-
-sharedir=$mutt_cv_sharedir
-AC_SUBST(sharedir)
-
 AC_ARG_WITH(iconv, [  --with-iconv=DIR           Where libiconv is installed ],
        [mutt_cv_iconv=$withval
        if test "$mutt_cv_iconv" != yes -a \
index 17877bf3414301e45d15dd48d6013b029d7dd723..aaa3b32d8bc52ac90563795853196ca9570a2bc5 100644 (file)
@@ -1,34 +1,33 @@
 # $Id$
 
-SHELL=/bin/sh
+SHELL = /bin/sh
 
-PACKAGE=@PACKAGE@
-VERSION=@VERSION@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
 
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-mandir=@mandir@
-sharedir=@sharedir@
-srcdir=@srcdir@
-docdir=@docdir@
-top_srcdir=@top_srcdir@
-top_builddir=..
-INSTALL=@INSTALL@
-VPATH=@srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+mandir = @mandir@
+srcdir = @srcdir@
+docdir = @docdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+INSTALL = @INSTALL@
+VPATH = @srcdir@
 @SET_MAKE@
 
-subdir=contrib
+subdir = contrib
 
-SAMPLES=Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
+SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
        sample.muttrc  sample.mailcap sample.muttrc-tlr
 
-DISTFILES= Makefile.in language.txt language50.txt  \
+DISTFILES = Makefile.in language.txt language50.txt  \
        patch.slang-1.2.2.keypad.1      \
        $(SAMPLES)
 
-ICONV_DISTFILES=README make.sh
+ICONV_DISTFILES = README make.sh
 
 all clean:
 
index 0069da315c7397c3353bbd904e02f499107322ca..288fb9a9045abd25461c0e1c8c0349b2a3e3bd8c 100644 (file)
@@ -1,39 +1,37 @@
 # $Id$
 
-SHELL=/bin/sh
-
-PACKAGE=@PACKAGE@
-VERSION=@VERSION@
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-mandir=@mandir@
-sharedir=@sharedir@
-srcdir=@srcdir@
-docdir=@docdir@
-includedir = @includedir@
+SHELL = /bin/sh
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+mandir = @mandir@
+srcdir = @srcdir@
+docdir = @docdir@
+includedir  =  @includedir@
 top_srcdir=@top_srcdir@
-top_builddir=..
-VPATH=@srcdir@
+top_builddir = ..
+VPATH = @srcdir@
 @SET_MAKE@
 
-INSTALL=@INSTALL@
-CC=@CC@
-CPP=@CPP@
-XCPPFLAGS=-I. @CPPFLAGS@
-CFLAGS=@CFLAGS@ -DSHAREDIR=\"$(sharedir)\" $(XCPPFLAGS)
-LDFLAGS=@LDFLAGS@
+INSTALL = @INSTALL@
+CC = @CC@
+CPP = @CPP@
+XCPPFLAGS = -I. @CPPFLAGS@
+CFLAGS = @CFLAGS@ $(XCPPFLAGS)
+LDFLAGS = @LDFLAGS@
 subdir = doc
 
 CPPFLAGS = @CPPFLAGS@
 
-DEFS=-DSHAREDIR=\"$(sharedir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
-       -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
-INCLUDES=-I. -I.. -I$(includedir) -I$(top_srcdir)
+DEFS = -DSYSCONFDIR=\"$(sysconfdir)\" -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
+INCLUDES = -I. -I.. -I$(includedir) -I$(top_srcdir)
 
-MAKEDOC_CPP=$(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C 
+MAKEDOC_CPP = $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C 
 
 DISTFILES = Makefile.in dotlock.man    \
        muttbug.man                     \
@@ -150,7 +148,7 @@ dist distdir: Makefile $(DISTFILES)
        (cd .. && $(MAKE) makedoc)
 
 # hack around autoconf mixing up patterns.
-at=@
+at = @
 
 update-doc:  ../makedoc stamp-doc-sgml stamp-doc-man manual.txt manual.html
 
index 953d920268c9c6395ef8b6eb5690bf38efb9dc28..a853f1fdfe54ae3c049ec8d78634335abfb92d30 100644 (file)
@@ -5,7 +5,6 @@ exec_prefix=@exec_prefix@
 bindir=@bindir@
 libdir=@libdir@
 mandir=@mandir@
-sharedir=@sharedir@
 srcdir=@srcdir@
 docdir=@docdir@
 includedir=@includedir@
diff --git a/init.c b/init.c
index 80db87fa7036d18e7e025fb461042e1ab700580b..81b494a0b17e5c7a7abab87e4ffbf96a78920dec 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1782,7 +1782,7 @@ void mutt_init (int skip_sys_rc, LIST *commands)
   else
   {
     /* Default search path from RFC1524 */
-    MailcapPath = safe_strdup ("~/.mailcap:" SHAREDIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
+    MailcapPath = safe_strdup ("~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
   }
 
   Tempdir = safe_strdup ((p = getenv ("TMPDIR")) ? p : "/tmp");
@@ -1881,9 +1881,9 @@ void mutt_init (int skip_sys_rc, LIST *commands)
     if (access (buffer, F_OK) == -1)
       snprintf (buffer, sizeof(buffer), "%s/Muttrc", SYSCONFDIR);
     if (access (buffer, F_OK) == -1)
-      snprintf (buffer, sizeof (buffer), "%s/Muttrc-%s", SHAREDIR, MUTT_VERSION);
+      snprintf (buffer, sizeof (buffer), "%s/Muttrc-%s", PKGDATADIR, MUTT_VERSION);
     if (access (buffer, F_OK) == -1)
-      snprintf (buffer, sizeof (buffer), "%s/Muttrc", SHAREDIR);
+      snprintf (buffer, sizeof (buffer), "%s/Muttrc", PKGDATADIR);
     if (access (buffer, F_OK) != -1)
     {
       if (source_rc (buffer, &err) != 0)
diff --git a/main.c b/main.c
index 8fc82ef0494ccb5286e990c6cd163e38657877bc..5c60887fb6b0b373422fd411f4cf1cbb75242bb1 100644 (file)
--- a/main.c
+++ b/main.c
@@ -382,7 +382,7 @@ static void show_version (void)
 
   printf ("SENDMAIL=\"%s\"\n", SENDMAIL);
   printf ("MAILPATH=\"%s\"\n", MAILPATH);
-  printf ("SHAREDIR=\"%s\"\n", SHAREDIR);
+  printf ("PKGDATADIR=\"%s\"\n", PKGDATADIR);
   printf ("SYSCONFDIR=\"%s\"\n", SYSCONFDIR);
   printf ("EXECSHELL=\"%s\"\n", EXECSHELL);
 #ifdef MIXMASTER
index 805764ac5a5ad330051928b162c7c6b2c92deed9..58e3d7d01d09b726d564c560cf7eff573b7ba1e8 100644 (file)
@@ -35,7 +35,7 @@ prefix=@prefix@
 DEBUGGER=@DEBUGGER@
 SENDMAIL=@SENDMAIL@
 sysconfdir=@sysconfdir@
-sharedir=@sharedir@
+pkgdatadir=@pkgdatadir@
 
 include_file ()
 {
@@ -251,7 +251,7 @@ fi
 
 if test "$global" = "yes" ; then
        CANDIDATES="Muttrc-${MUTTVERSION} Muttrc"
-       DIRECTORIES="$sysconfdir $sharedir"
+       DIRECTORIES="$sysconfdir $pkgdatadir"
        MATCHED="none"
        for d in $DIRECTORIES ; do
                for f in $CANDIDATES; do
index 9e690155ab99a4ac1c2272bc170552b4a03a6f9c..42e3980f8d4bcd6098f22f3780eb703945176db1 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -968,14 +968,14 @@ static int lookup_mime_type (BODY *att, const char *path)
        snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(Homedir));
        break;
       case 1:
-        strfcpy (buf, SYSCONFDIR"/mime.types", sizeof(buf));
-        break;
+       strfcpy (buf, SYSCONFDIR"/mime.types", sizeof(buf));
+       break;
       case 2:
-       strfcpy (buf, SHAREDIR"/mime.types", sizeof (buf));
+       strfcpy (buf, PKGDATADIR"/mime.types", sizeof (buf));
        break;
       default:
-        dprint (1, (debugfile, "lookup_mime_type: Internal error, count = %d.\n", count));
-        goto bye;      /* shouldn't happen */
+       dprint (1, (debugfile, "lookup_mime_type: Internal error, count = %d.\n", count));
+       goto bye;       /* shouldn't happen */
     }
 
     if ((f = fopen (buf, "r")) != NULL)