diff --git a/Makefile.in b/Makefile.in index 6beb156c62..ef80c9d64b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,11 +21,12 @@ srcdir = @srcdir@ libdir = @libdir@ incdir = @includedir@ mandir = @mandir@ -datadir = @datarootdir@/@PACKAGE_NAME@ -sysconfdir=@sysconfdir@ -pkgconfdir=@sysconfdir@/@PACKAGE_NAME@ -libexecdir=@libexecdir@ -pkglibexecdir=@libexecdir@/@PACKAGE_NAME@ +datadir = @datadir@ +pkgdatadir = @pkgdatadir@ +sysconfdir = @sysconfdir@ +pkgsysconfdir = @pkgsysconfdir@ +libexecdir = @libexecdir@ +pkglibexecdir = @pkglibexecdir@ SLINK = @LN_S@ STRIP = @STRIP@ ifdef SPARSE @@ -68,8 +69,8 @@ ALL_CFLAGS = $(CFLAGS) --std=gnu99 -Wall $(COVERAGE_CFLAGS) DEBUG_CPPFLAGS ?= -DDEBUG ALL_CPPFLAGS = $(CPPFLAGS) \ $(DEBUG_CPPFLAGS) \ - -DDATADIR=\"$(datadir)\" \ - -DPKGCONFDIR=\"$(pkgconfdir)\" \ + -DDATADIR=\"$(pkgdatadir)\" \ + -DPKGCONFDIR=\"$(pkgsysconfdir)\" \ -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" include $(srcdir)/source.mak @@ -107,15 +108,15 @@ EMAN = $(ETAGS_PROG).$(manext) # # corpora files # -corporadir = $(datadir)/corpora -pkgconf_corporadir = $(pkgconfdir)/corpora +corporadir = $(pkgdatadir)/corpora +pkgconf_corporadir = $(pkgsysconfdir)/corpora CORPORA = ctags.ctags RFC1213-MIB.txt # # preload # -preloaddir = $(datadir)/preload -pkgconf_preloaddir = $(pkgconfdir)/preload +preloaddir = $(pkgdatadir)/preload +pkgconf_preloaddir = $(pkgsysconfdir)/preload PRELOAD_OPTLIB = \ \ coffee.ctags \ @@ -130,8 +131,8 @@ DEFAULT_PRELOAD_FILE=default.ctags # # config files # -optlibdir = $(datadir)/optlib -pkgconf_optlibdir = $(pkgconfdir)/optlib +optlibdir = $(pkgdatadir)/optlib +pkgconf_optlibdir = $(pkgsysconfdir)/optlib OPTLIB = $(PRELOAD_OPTLIB) # @@ -317,8 +318,8 @@ uninstall-etags: - rm -f $(DEST_ETAGS) $(DEST_EMAN) uninstall-data: uninstall-corpora uninstall-optlib uninstall-preload - - rmdir $(datadir) - - rmdir $(pkgconfdir) + - rmdir $(pkgdatadir) + - rmdir $(pkgsysconfdir) uninstall-corpora: - rm -f $(addprefix $(corporadir)/,$(CORPORA)) diff --git a/configure.ac b/configure.ac index b42e7643ce..b8fd39ed4e 100644 --- a/configure.ac +++ b/configure.ac @@ -204,6 +204,18 @@ AC_ARG_ENABLE(tmpdir, [default directory for temporary files [ARG=/tmp]])], tmpdir_specified=yes) +AC_ARG_WITH([pkgdatadir], + [AS_HELP_STRING([--with-pkgdatadir=DIR], + [ctags read-only architecture-independent data [DATADIR/ctags]])]) + +AC_ARG_WITH([pkgsysconfdir], + [AS_HELP_STRING([--with-pkgsysconfdir=DIR], + [ctags read-only single-machine data [SYSCONFDIR/ctags]])]) + +AC_ARG_WITH([pkglibexecdir], + [AS_HELP_STRING([--with-pkglibexecdir=DIR], + [ctags program executables [LIBEXECDIR/ctags]])]) + AC_ARG_PROGRAM # Process configuration options @@ -213,6 +225,30 @@ if test "$enable_maintainer_mode" = yes ; then AC_MSG_NOTICE(enabling maintainer mode) fi + +case "${with_pkgdatadir+set}"-"$with_pkgdatadir" in #( +"set"-"yes" | "set"-"no") pkgdatadir="${datadir}/ctags" ;; #( +"set"-*) pkgdatadir="${with_pkgdatadir}" ;; #( +*) pkgdatadir="${datadir}/ctags" ;; +esac + +case "${with_pkgsysconfdir+set}"-"$with_pkgsysconfdir" in #( +"set"-"yes" | "set"-"no") pkgsysconfdir="${sysconfdir}/ctags" ;; #( +"set"-*) pkgsysconfdir="${with_pkgsysconfdir}" ;; #( +*) pkgsysconfdir="${sysconfdir}/ctags" ;; +esac + +case "${with_pkglibexecdir+set}"-"$with_pkglibexecdir" in #( +"set"-"yes" | "set"-"no") pkglibexecdir="${libexecdir}/ctags" ;; #( +"set"-*) pkglibexecdir="${with_pkglibexecdir}" ;; #( +*) pkglibexecdir="${libexecdir}/ctags" ;; +esac + +AC_SUBST([pkgdatadir]) +AC_SUBST([pkgsysconfdir]) +AC_SUBST([pkglibexecdir]) + + install_targets="install-ctags install-data install-libexec" AC_MSG_CHECKING(whether to install link to etags) if test yes = "$enable_etags"; then