summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2001-06-04 17:14:30 +0000
committerThomas Roessler <roessler@does-not-exist.org>2001-06-04 17:14:30 +0000
commit5a9210166fdfdb844e1cb5ef5b593965b8fd9b0f (patch)
tree5d8397ca4a4d354735a546580b6eafd7fbcc67db
parent4e1fb3cfd08669a45515f544eb9db7622a23cd10 (diff)
Clean up the sharedir mess. From Lars Hecking.
-rw-r--r--INSTALL4
-rw-r--r--Makefile.am11
-rw-r--r--configure.in23
-rw-r--r--contrib/Makefile.in37
-rw-r--r--doc/Makefile.in52
-rw-r--r--doc/instdoc.sh.in1
-rw-r--r--init.c6
-rw-r--r--main.c2
-rw-r--r--muttbug.sh.in4
-rw-r--r--sendlib.c10
10 files changed, 59 insertions, 91 deletions
diff --git a/INSTALL b/INSTALL
index 38e6049b..f1c294ed 100644
--- 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
diff --git a/Makefile.am b/Makefile.am
index f6bf7e63..4e8c878a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/configure.in b/configure.in
index 4934f8dd..bbc9b072 100644
--- a/configure.in
+++ b/configure.in
@@ -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 \
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index 17877bf3..aaa3b32d 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -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:
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 0069da31..288fb9a9 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -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
diff --git a/doc/instdoc.sh.in b/doc/instdoc.sh.in
index 953d9202..a853f1fd 100644
--- a/doc/instdoc.sh.in
+++ b/doc/instdoc.sh.in
@@ -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 80db87fa..81b494a0 100644
--- 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 8fc82ef0..5c60887f 100644
--- 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
diff --git a/muttbug.sh.in b/muttbug.sh.in
index 805764ac..58e3d7d0 100644
--- a/muttbug.sh.in
+++ b/muttbug.sh.in
@@ -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
diff --git a/sendlib.c b/sendlib.c
index 9e690155..42e3980f 100644
--- 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)